-
Notifications
You must be signed in to change notification settings - Fork 129
Delete STS roles regularly #2344
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
Conversation
print(f"Role {role} is from today, skipping it.") | ||
else: | ||
print(f"{i} DELETE role {role}. An old role") | ||
delete_role(client, role) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Users should be cleaned up as well.
Please refer to def real_s3_sts_clean_up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed! We had >3000 active users!
I wonder why the roles not being cleaned up by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks low risk so approving. Needs Phoebus' approval too.
Reference Issues/PRs
What does this implement or fix?
Due to limitation of STS roles number we should constantly do cleaning of failed to delete roles. The PR contains a scheduled job that would do that every Sa. The python script can also be executed at any time and will delete only roles created prior of today, leaving all currently running jobs unaffected
As roles cannot be guaranteed to be cleaned after tests execution due to many factors, we should take them out on regular bases, and perhaps this is the quickest and most reliable approach
Any other comments?
Checklist
Checklist for code changes...