Skip to content
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

Add SSO credentials provider from AWS SDK v2 #4045

Merged
merged 5 commits into from
Jul 5, 2023

Conversation

bentsherman
Copy link
Member

Close #2295

I currently can't test it properly because we don't use SSO internally, but we will try to set up a test environment.

@multimeric feel free to give it a try in the meantime.

Signed-off-by: Ben Sherman <[email protected]>
@pditommaso
Copy link
Member

Look great. Let's add @bebosudo and @enekui to test it and include the corresponding documentation please

Signed-off-by: Ben Sherman <[email protected]>
@bentsherman
Copy link
Member Author

Okay, I got it to work with our test SSO user.

Run aws configure sso and provide the SSO start URL and SSO region. It will create a profile in ~/.aws/config that looks like this:

[profile my-sso-profile]
sso_session = 'my-sso-session'
sso_account_id = '...'
sso_role_name = '...'
[sso-session my-sso-session]
sso_start_url = '...'
sso_region = '...'
sso_registration_scopes = 'sso:account:access'

You can then run a Nextflow pipeline with aws.profile = 'my-sso-profile' in your Nextflow configuration.

You can also run aws configure sso --profile default to make it the default profile.

The SSO region is just the region where the SSO user is authenticated. It is separate from the AWS region, so you can use the SSO profile and then specify any other region via aws.region.

@bentsherman bentsherman marked this pull request as ready for review June 28, 2023 22:14
@pditommaso
Copy link
Member

Excellent. Let's add a section in the docs after "security credentials" about this

@bentsherman
Copy link
Member Author

Yes, it is documented there.

Also, tests are passing but this "snyk" test is failing, however I can't access it.

docs/aws.md Outdated Show resolved Hide resolved
docs/aws.md Outdated
:::
4. Java System Properties - `aws.accessKeyId`, `aws.secretKey`, and `aws.sessionToken`.

5. Web Identity Token credentials.
Copy link
Member

Choose a reason for hiding this comment

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

Not sure about this

docs/aws.md Outdated Show resolved Hide resolved
@bentsherman
Copy link
Member Author

@pditommaso regarding your comments, I have no idea if these auth methods work or are practical with Nextflow

  • AWS_SESSION_TOKEN
  • Java system properties
  • Web identity token

I documented them because they are implemented in Nextflow, but I have no attachment to them. Ideally we should either document them or remove them.

@bentsherman
Copy link
Member Author

I think AWS_SESSION_TOKEN and web identity token are both related to temporary credentials, so probably not practical for Nextflow. Java system properties should work fine but you might as well use environment variables or Nextflow config.

So I'm fine with not documenting these but then we should also remove them from the code 😄

@pditommaso
Copy link
Member

The rationale is to document what's expected to be a feature. Some features can be indirectly implemented by the inherited library, but they should not be documented if there are not meant to be exposed as a supported feature.

Signed-off-by: Paolo Di Tommaso <[email protected]>
@netlify
Copy link

netlify bot commented Jul 5, 2023

Deploy Preview for nextflow-docs-staging ready!

Name Link
🔨 Latest commit 6f6bfd0
🔍 Latest deploy log https://app.netlify.com/sites/nextflow-docs-staging/deploys/64a529d2b93b73000845a7bf
😎 Deploy Preview https://deploy-preview-4045--nextflow-docs-staging.netlify.app/aws
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@pditommaso pditommaso merged commit 53e33cd into master Jul 5, 2023
@pditommaso pditommaso deleted the 2295-aws-sso-authentication branch July 5, 2023 09:05
abhi18av pushed a commit to abhi18av/nextflow that referenced this pull request Oct 28, 2023

Signed-off-by: Ben Sherman <[email protected]>
Signed-off-by: Paolo Di Tommaso <[email protected]>
Co-authored-by: Paolo Di Tommaso <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SSO authentication not working
2 participants