Nike-Inc / gimme-aws-creds

A CLI that utilizes Okta IdP via SAML to acquire temporary AWS credentials
Apache License 2.0
925 stars 263 forks source link

Cannot use a different config directory #388

Open drefrome opened 1 year ago

drefrome commented 1 year ago

I need to be able to keep the credentials for one project/client separate from others. Though the documentation says the config file is stored in the user's home directory "by default", the code reveals that there is no way to point the gimme-aws-creds to a different directory.

Expected Behavior

I expect given the language in the README here that there would be either a command-line argument to gimme-aws-creds or an environment variable I could to point the script to another directory.

Current Behavior

The code appears to read that FILE_ROOT is always the user's HOME directory and that there are no such configuration options.

Possible Solution

Add either a command-line argument or environment variable that allows the user to set a different FILE_ROOT for the config file if desired.

Your Environment

This is based on trying version 2.5.0 (most recent release) and reading the code at HEAD on master (as of 3/19/2023).

schlueter commented 8 months ago

The README states:

A configuration wizard will prompt you to enter the necessary configuration parameters for the tool to run, the only one that is required is the okta_org_url. The configuration file is written to ~/.okta_aws_login_config, but you can change the location with the environment variable OKTA_CONFIG.

Does setting the environment variable OKTA_CONFIG to the full path of the alternate config file work?