Skip to content

Conversation

@AlainODea
Copy link
Contributor

Problem Statement

Issue #59 states:

This was talked about in the recent AWS CLI talk at re:Invent

By supporting returning a specific JSON object, as described here: http://docs.aws.amazon.com/cli/latest/topic/config-vars.html#sourcing-credentials-from-external-processes okta-aws-cli-assume-role can integrate better with the aws-cli command.

See example here: https://github.com/awslabs/awsprocesscreds

/cc: @AlainODea @mraible @rdegges @joelfranusic-okta

Solution

Resolves #59

 - Add CredentialProcess entry-point

 - Move logging/console interaction to STDERR (allow 2>/dev/null)

 - Depends on oktadev#201 unless you only have one AWS role assigned in Okta

Resolves oktadev#59
@AlainODea
Copy link
Contributor Author

@mmahadevan-okta are you up for code-reviewing this?

@mmahadevan-okta
Copy link
Contributor

I would not be the right person to code review it. :( But perhaps @tom-smith-okta can help? Tom?

Copy link
Contributor

@tom-smith-okta tom-smith-okta left a comment

Choose a reason for hiding this comment

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

Sure, @mmahadevan-okta @AlainODea, where would the CredentialProcess get called from? Or can you tell me what you mean by "Add CredentialProcess entry-point"? How does it get invoked?

Copy link
Contributor

@mmahadevan-okta mmahadevan-okta left a comment

Choose a reason for hiding this comment

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

From my cursory overview, it LGTM. :)

@AlainODea
Copy link
Contributor Author

AlainODea commented Sep 13, 2018

CredentialProcess would be run from the command-line. I suppose it’s probably a good idea to create awscreds-okta bash script and Bat file or something similar to make this easier to consume.

@tom-smith-okta
Copy link
Contributor

@AlainODea I'm sure your code is greta. The nice thing about the credential_process keyword is that it allows you to keep the "regular" aws commands and profile system in place. So I can set up my ~/.aws/config file with an entry like:

[profile okta01]
credential_process = okta-aws-cli-1.0.3.jar -param1 xyz -param2 123

and then I can invoke this profile by using
aws s3 ls --profile okta01
I just wasn't sure if your setup would allow this kind of invocation.

@AlainODea
Copy link
Contributor Author

@tom-smith-okta you are right. The more people use this, the more I realize overriding the aws command was a bad idea. I’m going to remove that from the installer in an upcoming PR.

@AlainODea
Copy link
Contributor Author

java -jar okta-aws-cli.jar com.okta.tools.CredentialProcess would run this entry point. I’m also realizing that I should support command-line options for all the env and config file options to make this kind of use really practical.

@AlainODea
Copy link
Contributor Author

@tom-smith-okta are you okay with me merging this and following up with the installer fix. Is there anything essential I should do before merging it?

@tom-smith-okta
Copy link
Contributor

tom-smith-okta commented Sep 24, 2018 via email

@AlainODea AlainODea merged commit 9f680a2 into oktadev:master Sep 24, 2018
@AlainODea AlainODea deleted the ao-SEEDLING-credential_process branch September 29, 2018 16:21
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.

3 participants