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

Fix director responses #92

Merged
merged 2 commits into from
Sep 5, 2023

Conversation

bbockelm
Copy link
Collaborator

@bbockelm bbockelm commented Sep 2, 2023

This fixes up the header generation for the director response. Now, when I try the command from @jhiemstrawisc in #68, I get the following in the response headers:

...
< location: https://dtn-pas.cinc.nrp.internet2.edu:8443/ospool/PROTECTED/justin.hiemstra
< x-pelican-authorization: issuer=https://osg-htc.org/ospool
< x-pelican-namespace: namespace=/ospool/PROTECTED, require-token=true
< x-pelican-token-generation: issuer=https://osg-htc.org/ospool, max-scope-depth=4, strategy=OAuth2

Fixes #68

The client is looking for an attribute named `require-token`; the
server was replying with `use-token-on-read`.  Now both are using
`require-token`.
When generating the origin record, we need the full namespace object
filled out (including the authorization and token-generation info).
This is because the origin's policy is used when later responding to
clients.

The same thing is not needed for the cache ads; the cache namespace
info is only used for determining whether or not a cache supports
a particular namespace.
@bbockelm bbockelm force-pushed the fix_director_response branch from ff460a9 to 52efca8 Compare September 2, 2023 13:57
Copy link
Member

@jhiemstrawisc jhiemstrawisc left a comment

Choose a reason for hiding this comment

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

Ah, good catch with the originNS --> nsAd bug.

@jhiemstrawisc jhiemstrawisc merged commit 3a25fb4 into PelicanPlatform:main Sep 5, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate X-Pelican-* header response from Director
2 participants