Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

Authorizing users based on AWS IAM User Groups #23

Conversation

shinenelson
Copy link
Contributor

(Resolves comment #281132929)

aws iam get-ssh-public-key --user-name "$SaveUserName" --ssh-public-key-id "$KeyId" --encoding SSH --query "SSHPublicKey.SSHPublicKeyBody" --output text
# Specify IAM group(s) separated by spaces to import users.
# Specify "##ALL##" (including the double quotes) to import all users
IAMGroup=("##ALL##")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I would do this in import_users.sh instead of here. Putting it here makes logging in with ssh even slower. And it is already slow because of the API calls.

While it works, this script does a lot now that it doesn't have to do. If you only import the users in the IAM groups, you also limit the amount of users on the system.

So I would suggest moving this code to the import_users.sh. The code itself looks good to me :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you. I'm of the same opinion too. The ultimate call is with owner of the repository. I just implemented their suggestion. 😉

@michaelwittig michaelwittig mentioned this pull request Mar 28, 2017
@michaelwittig
Copy link
Contributor

#24 was merged as discussed in #28

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants