Commit Graph

26 Commits

Author SHA1 Message Date
Jeff Mitchell
eb0e7cd0d2 Don't write salts in initialization, look up on demand (#2702) 2017-05-09 17:51:09 -04:00
Jeff Mitchell
2fbd973001 Add logic to skip initialization in some cases and some invalidation logic 2017-05-05 15:01:52 -04:00
Joel Thompson
5a934e6b2f Create unified aws auth backend (#2441)
* Rename builtin/credential/aws-ec2 to aws

The aws-ec2 authentication backend is being expanded and will become the
generic aws backend. This is a small rename commit to keep the commit
history clean.

* Expand aws-ec2 backend to more generic aws

This adds the ability to authenticate arbitrary AWS IAM principals using
AWS's sts:GetCallerIdentity method. The AWS-EC2 auth backend is being to
just AWS with the expansion.

* Add missing aws auth handler to CLI

This was omitted from the previous commit

* aws auth backend general variable name cleanup

Also fixed a bug where allowed auth types weren't being checked upon
login, and added tests for it.

* Update docs for the aws auth backend

* Refactor aws bind validation

* Fix env var override in aws backend test

Intent is to override the AWS environment variables with the TEST_*
versions if they are set, but the reverse was happening.

* Update docs on use of IAM authentication profile

AWS now allows you to change the instance profile of a running instance,
so the use case of "a long-lived instance that's not in an instance
profile" no longer means you have to use the the EC2 auth method. You
can now just change the instance profile on the fly.

* Fix typo in aws auth cli help

* Respond to PR feedback

* More PR feedback

* Respond to additional PR feedback

* Address more feedback on aws auth PR

* Make aws auth_type immutable per role

* Address more aws auth PR feedback

* Address more iam auth PR feedback

* Rename aws-ec2.html.md to aws.html.md

Per PR feedback, to go along with new backend name.

* Add MountType to logical.Request

* Make default aws auth_type dependent upon MountType

When MountType is aws-ec2, default to ec2 auth_type for backwards
compatibility with legacy roles. Otherwise, default to iam.

* Pass MountPoint and MountType back up to the core

Previously the request router reset the MountPoint and MountType back to
the empty string before returning to the core. This ensures they get set
back to the correct values.
2017-04-24 15:15:50 -04:00
vishalnayak
e4d98dfc9b rename credential/aws as credential/aws-ec2 2016-05-30 14:11:15 -04:00
vishalnayak
a8134338c9 Re-enable rollback triggers for auth backends 2016-05-26 14:29:41 -04:00
vishalnayak
83adda998d Naming of the locked and nonLocked methods 2016-05-17 20:39:24 -04:00
vishalnayak
b53f0cb624 Rename 'role_name' to 'role' 2016-05-13 14:31:13 -04:00
vishalnayak
4aa01d390a Update docs and path names to the new patterns 2016-05-12 11:45:10 -04:00
Jeff Mitchell
e83dbbe532 Fix HMAC being overwritten. Also some documentation, and add a lock to role operations 2016-05-05 14:51:09 -04:00
Jeff Mitchell
e7c5966da8 Guard tidy functions 2016-05-05 14:28:46 -04:00
Jeff Mitchell
c41b024f36 More updates to mutexes and adjust blacklisted roletag default safety buffer 2016-05-05 14:12:22 -04:00
Jeff Mitchell
68b76b99c8 Rename identity whitelist and roletag blacklist api endpoints 2016-05-05 13:34:50 -04:00
vishalnayak
ef83605f58 Change image/ to a more flexible /role endpoint 2016-05-03 23:36:59 -04:00
vishalnayak
57e6361b24 Remove unnecessary append call 2016-04-30 03:20:21 -04:00
vishalnayak
1a3c0a1f3e Change all time references to UTC 2016-04-28 10:19:29 -04:00
vishalnayak
05c10dad94 minor updates 2016-04-28 00:35:49 -04:00
vishalnayak
36193850fd Remove recreate parameter from clientEC2 2016-04-27 20:01:39 -04:00
vishalnayak
2582e5d0ee Added tests 2016-04-26 10:22:29 -04:00
vishalnayak
06a174c2f0 tidy endpoint fixes 2016-04-26 10:22:29 -04:00
vishalnayak
4f46bbaa32 Added cooldown period for periodic tidying operation 2016-04-26 10:22:29 -04:00
vishalnayak
81e4235fc0 Support periodic tidy callback and config endpoints. 2016-04-26 10:22:29 -04:00
vishalnayak
22c0ad94ba Removed region parameter from config/client endpoint.
Region to create ec2 client objects is fetched from the identity document.
Maintaining a map of cached clients indexed by region.
2016-04-26 10:22:29 -04:00
vishalnayak
cd3e9e3b5b Support providing multiple certificates.
Append all the certificates to the PKCS#7 parser during signature verification.
2016-04-26 10:22:29 -04:00
vishalnayak
7a437d139e Rename 'name' to 'ami_id' for clarity 2016-04-26 10:22:29 -04:00
Jeff Mitchell
7efc5eceb9 Add environment and EC2 instance metadata role providers for AWS creds. 2016-04-26 10:22:28 -04:00
vishalnayak
e886d5aab9 AWS EC2 instances authentication backend 2016-04-26 10:22:28 -04:00