Skip to content

[feature] add an option to output credentials instead of starting a shell #171

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

Open
T0MASD opened this issue Mar 4, 2025 · 2 comments
Open

Comments

@T0MASD
Copy link
Contributor

T0MASD commented Mar 4, 2025

Please add an option to output the credentials for the export instead of starting the shell.
So it's possible to use it in automation like so:

export $(RH_AWS_SESSION_TIMEOUT=350 rh-aws-saml-login osd-staging-2 -o env)

in the future it could be extended to support things like

export $(RH_AWS_SESSION_TIMEOUT=350 rh-aws-saml-login osd-staging-2 -o json) 

etc.

@chassing
Copy link
Member

chassing commented Mar 10, 2025

May I ask what is your use case? Do you know that you can run any arbitrary command instead of opening a shell?

E.g.:

rh-aws-saml-login osd-staging-2 my-shell-script.sh

@T0MASD
Copy link
Contributor Author

T0MASD commented Mar 14, 2025

I run rh-aws-saml-login inside the container followed by
export $(osdctl account cli -i $ACCOUNT -o env -r $REGION -S) which assumes new account role, then I use rosa and aws cli, so having the current env populated instead of spawning new shell is highly desirable

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