Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Existing linux users removed when syncing groups #11

Closed
laroo opened this issue Oct 24, 2016 · 2 comments
Closed

Existing linux users removed when syncing groups #11

laroo opened this issue Oct 24, 2016 · 2 comments

Comments

@laroo
Copy link

laroo commented Oct 24, 2016

I've setup keymaker on a AWS EC2 instance with official Ubuntu 14.04.5 LTS AMI and created a IAM group with AWS CLI:

$ aws iam create-group --path "/keymaker/" --group-name keymaker_sudo

When manually syncing the groups with keymaker sync_groups I noticed:

Removing user ubuntu from group sudo

Keymaker did add the IAM user to the sudo group but removed the main user ubuntu! Is it possible to keep existing linux users in the group and remove only IAM users that are not in the attached to the group?

For now i solved it by adding the user ubuntu to IAM (without any keys/rights/policies) and attached it to the group keymaker_sudo. This won't delete this user from the sudo group

@kislyuk
Copy link
Owner

kislyuk commented Nov 2, 2016

Thanks for reporting. Yes, we need to add a check whenever removing users from groups that either the user or the group is under keymaker management (e.g. by checking that the user's PID is in the keymaker assignable range).

@kislyuk kislyuk closed this as completed in 77b74f4 Nov 9, 2016
@kislyuk
Copy link
Owner

kislyuk commented Nov 9, 2016

It turns out this was plainly a bug - I already had the check in place when adding users to groups, but not when removing. I will roll a release shortly.

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

No branches or pull requests

2 participants