Skip to content

Fix --private-key flag for pelican origin token create#2641

Merged
jhiemstrawisc merged 4 commits into
PelicanPlatform:mainfrom
h2zh:use-specified-key
Sep 15, 2025
Merged

Fix --private-key flag for pelican origin token create#2641
jhiemstrawisc merged 4 commits into
PelicanPlatform:mainfrom
h2zh:use-specified-key

Conversation

@h2zh

@h2zh h2zh commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

In the PR #2314 that introduced pelican token create command, we changed the function signature of CreateToken from

func (tokenConfig *TokenConfig) CreateToken() (string, error) { ... }

to

func (tokenConfig *TokenConfig) CreateToken(signingKey ...string) (string, error) { ... }

However, we forgot to change the token creation code in the legacy pelican origin token create command, which causes the problem in this issue - it uses the private key in IssuerKeysDirectory to sign the token, instead of the key specified in the command.

Close #2163

@h2zh h2zh added this to the v7.20 milestone Sep 11, 2025
@h2zh h2zh added bug Something isn't working client Issue affecting the OSDF client labels Sep 11, 2025
@h2zh h2zh force-pushed the use-specified-key branch from 9dd9fbc to beb2091 Compare September 11, 2025 20:38
@h2zh h2zh force-pushed the use-specified-key branch from 2c8937c to d700e8a Compare September 11, 2025 21:23
@h2zh h2zh requested a review from jhiemstrawisc September 15, 2025 15:16

@jhiemstrawisc jhiemstrawisc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I followed the steps in BrianA's reproducer and confirmed this change does generate the token with the correct key. Thanks!

@jhiemstrawisc jhiemstrawisc merged commit b5c896b into PelicanPlatform:main Sep 15, 2025
25 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working client Issue affecting the OSDF client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--private-key flag no longer works for pelican origin token create -- maybe backwards compat bug w/ IssuerKey

2 participants