Skip to content

Accept SciTokens-profile JWT #2223

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

h2zh
Copy link
Contributor

@h2zh h2zh commented Apr 21, 2025

Pelican’s client today only recognizes WLCG tokens (i.e. JWTs with a wlcg.ver claim). When a user supplies a SciTokens‑profile JWT (with ver: "scitokens:2.0"), Pelican will reject it as “unacceptable”. This PR extends the token profiles Pelican support from WLCG to SciTokens. Check out the linked issue for more details.

Close #2130

@h2zh h2zh added bug Something isn't working client Issue affecting the OSDF client critical High priority for next release plugin Issue affecting the file transfer plugin create-patch labels Apr 21, 2025
@turetske turetske added this to the v7.16 milestone Apr 22, 2025
@@ -497,3 +505,61 @@ func TestParseRemoteAsPUrl(t *testing.T) {
})
}
}

// mustURL parses a string into *url.URL or fails the test.
func mustURL(t *testing.T, s string) *url.URL {
Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems very odd to have this as a separate function for something that is only used once. Why isn't this check done before the dirResp assignment and then have the result places in the slice rather than doing a separate function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My bad. That's an overthinking. Just reorganized the code.

@jhiemstrawisc jhiemstrawisc modified the milestones: v7.16, v7.17 Apr 22, 2025
@h2zh h2zh force-pushed the verify-scitokens-jwt branch from 91ba8d7 to 82390ed Compare April 25, 2025 14:22
@h2zh h2zh requested a review from turetske April 25, 2025 18:04
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 create-patch critical High priority for next release plugin Issue affecting the file transfer plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Client token selection logic ignores Scitokens JWTs
3 participants