Skip to content

Commit

Permalink
Also handle role tags
Browse files Browse the repository at this point in the history
  • Loading branch information
joelthompson committed Sep 9, 2017
1 parent 23390e4 commit ef6ca2c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions builtin/credential/aws/path_role_tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ func (b *backend) pathRoleTagUpdate(
resp.AddWarning("Role does not allow instance migration. Login will not be allowed with this tag unless the role value is updated.")
}

if disallowReauthentication && allowInstanceMigration {
return logical.ErrorResponse("cannot set both disallow_reauthentication and allow_instance_migration"), nil
}

// max_ttl for the role tag should be less than the max_ttl set on the role.
maxTTL := time.Duration(data.Get("max_ttl").(int)) * time.Second

Expand Down
4 changes: 3 additions & 1 deletion website/source/api/auth/aws/index.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -842,9 +842,11 @@ given instance can be allowed to gain in a worst-case scenario.
the metadata document, so essentially, this disables the client nonce check
whenever the instance is migrated to a new host and pendingTime is newer than
the previously-remembered time. Use with caution. Defaults to 'false'.
Mutually exclusive with `disallow_reauthentication`.
- `disallow_reauthentication` `(bool: false)` - If set, only allows a single
token to be granted per instance ID. This can be cleared with the
auth/aws/identity-whitelist endpoint. Defaults to 'false'.
auth/aws/identity-whitelist endpoint. Defaults to 'false'. Mutually exclusive
with `allow_instance_migration`.

### Sample Payload

Expand Down

0 comments on commit ef6ca2c

Please sign in to comment.