-
Notifications
You must be signed in to change notification settings - Fork 734
New command group: nextflow auth
#6380
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
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for nextflow-docs-staging ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
e9b3f26
to
c01e56b
Compare
be9d924
to
5e79a3b
Compare
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Set TOWER_ACCESS_TOKEN with new PAT. Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
5e79a3b
to
c5a3283
Compare
Struggling to get the tests to pass. Even |
nextflow auth login
nextflow auth
@claude Please review this pull request and provide feedback on:
Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback. Use |
Claude encountered an error —— View job
I'll analyze this and get back to you. |
} else { | ||
// Reset only what was set | ||
if (bold) fmt = fmt.boldOff() | ||
if (dim) fmt = fmt.a(Attribute.INTENSITY_BOLD) // Reset dim |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Colorize Method Incorrectly Applies Bold Formatting
When fullReset
is false, the colorize
method attempts to reset dim
formatting using Attribute.INTENSITY_BOLD
. This applies bold formatting instead of returning the text to normal intensity, causing text to appear bold when it should be undimmed.
// Check if TOWER_WORKFLOW_ID environment variable is set | ||
def envWorkspaceId = System.getenv('TOWER_WORKFLOW_ID') | ||
if (envWorkspaceId) { | ||
println "\nDefault workspace: ${ColorUtil.colorize('TOWER_WORKFLOW_ID environment variable is set', 'yellow')}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Incorrect Environment Variable Check in Nextflow Auth
The nextflow auth
commands incorrectly check for the TOWER_WORKFLOW_ID
environment variable when configuring and displaying the default workspace. This prevents the system from recognizing the intended TOWER_WORKSPACE_ID
environment variable for workspace selection.
Additional Locations (1)
Let's start refactoring this as |
I get confused a bit on how -url is managed. I think it is better to simplify it by -url is for enterprise with PAT and no url is for cloud. Moreover, instead of hardcoding all environments, keep just the production values as default and allow to test in other environments using env variables. In fact, we already have the TOWER_API_ENDPOINT, we just would need to add the ones for auth endpoint and client id. What do you think about it? |
if (isCloudEndpoint(apiUrl)) { | ||
def tokenId = decodeTokenId(existingToken as String) | ||
deleteTokenViaApi(existingToken as String, apiUrl, tokenId) | ||
} else { | ||
println " - Enterprise installation detected - PAT will not be deleted from platform." | ||
} | ||
|
||
removeAuthFromConfig() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if there was a previous token already defined in the config. Could it be deleted by mistake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it will be deleted, by design. Maybe we could add a confirmation prompt?
@jorgee I think that we still need the logic to detect the 3 prod / stage / dev URLs for cloud - it's needed to trigger the logic to try the Auth0 flow rather than just booting people to use a PAT. If we have that logic in the code, then I don't really see a reason to not also include the key and auth0 URL personally, it's only a handful of extra lines of code. And it'd be a swap for env vars. Given that I don't envision ever needing to test with any other auth0 URLs I'm not really sure it'd be any simpler..? |
This PR introduces a complete authentication system for Seqera Platform with multiple subcommands for managing authentication credentials and configuration.
CleanShot.2025-09-21.at.00.32.54.mp4
Features
New
nextflow auth
command with subcommands:nextflow auth login
- Authenticate with Seqera Platform using OAuth2/PKCE flownextflow auth logout
- Remove authentication credentials and clear configurationnextflow auth status
- Show current authentication status and user informationnextflow auth config
- Display current authentication configurationAuth0 Device Flow Authentication
Usage Examples
Technical Implementation
Core Components
Authentication Flow