Navigation Menu

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

aws - add ssh-key management for iam-users #6365

Merged
merged 7 commits into from Jan 5, 2021

Conversation

ajkerrigan
Copy link
Member

Add SSH key operations to the "iam-user" resource:

  • An "ssh-key" filter to match user keys
  • A "remove-ssh-keys" action to remove/disable keys by age or matches against the "ssh-key" filter

Note that there is some risk of confusing these operations with access key operations. My aim here is to keep the two totally separate with clear enough naming to minimize that risk.

c7n/resources/iam.py Outdated Show resolved Hide resolved
tests/test_iam.py Outdated Show resolved Hide resolved
tests/test_iam.py Outdated Show resolved Hide resolved
- filters.ssh-key: Value filter against SSH key properties
- actions.remove-ssh-keys: Remove or disable SSH keys
Choose an action name that is more in line with the underlying API and
permissions.
- Cosolidate redundant tests
- Use a config source to eliminate noise
I had derived from ConfigTest thinking I would use that class's features
for subscribing to the config change stream. I didn't end up using
that, so the change in base class isn't needed.
Copy link
Collaborator

@kapilt kapilt left a comment

Choose a reason for hiding this comment

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

thanks, lgtm

@kapilt kapilt merged commit 724bbd8 into cloud-custodian:master Jan 5, 2021
@ajkerrigan ajkerrigan deleted the iam-user-ssh-keys branch January 5, 2021 14:32
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

Successfully merging this pull request may close these issues.

None yet

2 participants