Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Set is admin to be explicitly false when not true
Browse files Browse the repository at this point in the history
Update IAM principal meta data to have is_admin = false rather than having be missing when it does not have admin permissions.
  • Loading branch information
fieldju authored Apr 4, 2017
1 parent 3100ee9 commit a1e93dd
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ public IamRoleAuthResponse authenticate(IamRoleCredentialsV2 credentials) {
if (getAdminRoleArnSet().contains(iamRoleArn)) {
meta.put(VaultAuthPrincipal.METADATA_KEY_IS_ADMIN, Boolean.toString(true));
groups.add("admin-iam-principals");
} else {
meta.put(VaultAuthPrincipal.METADATA_KEY_IS_ADMIN, Boolean.toString(false));
}
meta.put(VaultAuthPrincipal.METADATA_KEY_GROUPS, StringUtils.join(groups, ','));

Expand Down

0 comments on commit a1e93dd

Please sign in to comment.