open-vault/builtin/logical
Joel Thompson ac18a44fae secret/aws: Pass policy ARNs to AssumedRole and FederationToken roles (#6789)
* secret/aws: Pass policy ARNs to AssumedRole and FederationToken roles

AWS now allows you to pass policy ARNs as well as, and in addition to,
policy documents for AssumeRole and GetFederationToken (see
https://aws.amazon.com/about-aws/whats-new/2019/05/session-permissions/).
Vault already collects policy ARNs for iam_user credential types; now it
will allow policy ARNs for assumed_role and federation_token credential
types and plumb them through to the appropriate AWS calls.

This brings along a minor breaking change. Vault roles of the
federation_token credential type are now required to have either a
policy_document or a policy_arns specified. This was implicit
previously; a missing policy_document would result in a validation error
from the AWS SDK when retrieving credentials. However, it would still
allow creating a role that didn't have a policy_document specified and
then later specifying it, after which retrieving the AWS credentials
would work. Similar workflows in which the Vault role didn't have a
policy_document specified for some period of time, such as deleting the
policy_document and then later adding it back, would also have worked
previously but will now be broken.

The reason for this breaking change is because a credential_type of
federation_token without either a policy_document or policy_arns
specified will return credentials that have equivalent permissions to
the credentials the Vault server itself is using. This is quite
dangerous (e.g., it could allow Vault clients access to retrieve
credentials that could modify Vault's underlying storage) and so should
be discouraged. This scenario is still possible when passing in an
appropriate policy_document or policy_arns parameter, but clients should
be explicitly aware of what they are doing and opt in to it by passing
in the appropriate role parameters.

* Error out on dangerous federation token retrieval

The AWS secrets role code now disallows creation of a dangerous role
configuration; however, pre-existing roles could have existed that would
trigger this now-dangerous code path, so also adding a check for this
configuration at credential retrieval time.

* Run makefmt

* Fix tests

* Fix comments/docs
2019-08-20 12:34:41 -07:00
..
aws secret/aws: Pass policy ARNs to AssumedRole and FederationToken roles (#6789) 2019-08-20 12:34:41 -07:00
cassandra Merge multiple functions for creating consul containers into one. (#6612) 2019-04-22 12:26:10 -04:00
consul Standardize how we format deprecated values in traditional path-help (#7007) 2019-06-27 14:52:52 -04:00
database Combined Database backend: Add Static Account support to MongoDB (#7003) 2019-07-05 14:57:01 -04:00
mongodb Merge multiple functions for creating consul containers into one. (#6612) 2019-04-22 12:26:10 -04:00
mssql Update to api 1.0.1 and sdk 0.1.8 2019-04-15 14:10:07 -04:00
mysql Merge multiple functions for creating consul containers into one. (#6612) 2019-04-22 12:26:10 -04:00
nomad Merge multiple functions for creating consul containers into one. (#6612) 2019-04-22 12:26:10 -04:00
pki Don't try to revoke certs from PKI on perf standby (#7173) 2019-07-23 08:40:08 -04:00
postgresql Merge multiple functions for creating consul containers into one. (#6612) 2019-04-22 12:26:10 -04:00
rabbitmq Merge multiple functions for creating consul containers into one. (#6612) 2019-04-22 12:26:10 -04:00
ssh UI - add kmip engine (#6936) 2019-06-21 16:05:45 -05:00
totp Update to api 1.0.1 and sdk 0.1.8 2019-04-15 14:10:07 -04:00
transit Add maximum amount of random entropy requested (#7144) 2019-07-24 18:22:23 -07:00