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

Improve the use of the X-Pelican-* responses #48

Merged
merged 4 commits into from
Aug 30, 2023

Conversation

bbockelm
Copy link
Collaborator

This:

  1. Converts the client to look for X-Pelican-* instead of X-Osdf-*.
  2. Has the director always set X-Pelican-Namespace, even when the credential generation isn't known.
  3. Avoids a panic when the X-Pelican-Namespace header is missing.
  4. Slightly improves the debugging experience when a panic is raised.

Since we never released a production version of the director using
the `X-Osdf-*` headers, take the time to switch the internals to
'Pelican' instead.

This additionally fixes a potential panic when the `X-Osdf-Namespace`
header is missing from the director response.
The `X-Pelican-Namespace` header is needed to let the remote client
know whether or not to use a token.  It should always be set, even
if there's not enough information available on how it should *generate*
a credential.
Previously, the panic was logged at the Error level; this wasn't useful
as the string gets printed out twice to stderr (as the panic is converted
to an error and re-raised).  With this, clients that have debugging
enabled will have far more useful information on panics for the dev team.
@bbockelm
Copy link
Collaborator Author

Merging this without review -- right now, focusing on getting most of the PRs in to allow a reformat.

@bbockelm bbockelm merged commit 9cbf418 into PelicanPlatform:main Aug 30, 2023
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.

1 participant