-
Notifications
You must be signed in to change notification settings - Fork 4
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
Allow custom token expiration #19
Comments
Creating a global configuration option to change the token length would be simple enough. Making the configuration more granular poses some challenges:
What is your use-case? If you are seeking to increase the STS token lifetimes then there is another issue: how to quickly revoke user access. One of the first questions I get from auditors or managers is how to revoke access quickly. Currently, STS tokens are 1 hour and this generally seems to be fast enough. If a user has an STS token which lasts 12 hours, this is more concerning if there is a perceived risk to the user retaining access for that long. |
This request comes directly from some of our users who cannot use a dedicated IAM user account/instance role and must use CloudGate. This PR is to see how feasible or how much of a security-hole it would be to have a configuration flag in the static-config.yml where admins can set a flag to have CG either continue to enforce the IAM role of 1hr (default) or respect the maximum token expiration as defined by the IAM role when CG looks it up. Having a maximum flag to check against the default user_defined_limit "how to expose the configuration without complicating the WebUI" "how to express different timeouts for different accounts or roles in cg-client" For the overall security and integrity of this, I agree, having a way to kill tokens is important. That said, AWS account admins should be aware regardless if they use CG or not is of how to revoke tokens using something like this https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_revoke-sessions.html (Granted I have not tested this myself with CG generated tokens but I assume it would work). I am not expecting CG to have this kill feature, this is about proposing custom token lengths or at least altering the hard limit. |
Any more thoughts on this ? |
Instead of the hardcoded 1 hour token expiration time is it possible to have cloudgate query token expiration from a given role instead?
https://aws.amazon.com/about-aws/whats-new/2018/03/longer-role-sessions/
https://docs.amazonaws.cn/en_us/IAM/latest/UserGuide/id_credentials_temp_request.html
That way not every role used by cloudgate is governed by a single expiration time and can allow each account/role-owner to have granular controls over token expiration
The text was updated successfully, but these errors were encountered: