Skip to content

Implement API token generation command#2958

Merged
patrickbrophy merged 6 commits into
PelicanPlatform:mainfrom
patrickbrophy:fix-issue-2956
Jan 26, 2026
Merged

Implement API token generation command#2958
patrickbrophy merged 6 commits into
PelicanPlatform:mainfrom
patrickbrophy:fix-issue-2956

Conversation

@patrickbrophy

Copy link
Copy Markdown
Contributor

Fixes #2956. This PR implements a new command pelican api-key generate. This command generates an API token for a specified server. You must specify the scopes of the token and other fields have defaults if they are not specified.

@patrickbrophy patrickbrophy added enhancement New feature or request infrastructure GitHub Actions, Release management, and CI labels Jan 7, 2026
@patrickbrophy patrickbrophy requested a review from h2zh January 7, 2026 20:44
Comment thread cmd/cmd_utils.go Dismissed

@h2zh h2zh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code quality is good. Some unit tests would be appreciated!

Comment thread cmd/api_key.go
Comment thread cmd/api_key.go Outdated
Comment thread cmd/api_key_generate.go Outdated
Comment thread cmd/api_key_generate.go Outdated
@turetske turetske added this to the v7.24 milestone Jan 13, 2026
@patrickbrophy patrickbrophy requested a review from h2zh January 20, 2026 18:37

@h2zh h2zh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! Thanks for bringing this api token feature to the CLI land

This command generates an API token. You are required to set scope and
all of the other parameters have defaults that are overridable with
flags.

This command also respects the --json flag so that you can get
structured output when enabled.
@patrickbrophy patrickbrophy merged commit c408700 into PelicanPlatform:main Jan 26, 2026
26 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request infrastructure GitHub Actions, Release management, and CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API key generation command

4 participants