forked from xrootd/xrootd
-
Notifications
You must be signed in to change notification settings - Fork 0
Redirtoken #29
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
Jo-stfc
wants to merge
20
commits into
stfc:v5.7.3patched
Choose a base branch
from
bbockelm:redirtoken
base: v5.7.3patched
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Redirtoken #29
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Map various connection-related errors in XrdCl in XCache all the
way through to the HTTP layer.
This allows a failure to connect to the origin to be represented
with the correct status code ("Bad Gateway"); currently, a down
origin results in a 500 ("Internal Server Error") which is misleading
for users.
Seen on hppa Linux where EBADE is 160.
In function ‘int {anonymous}::initErrTable()’,
inlined from ‘void __static_initialization_and_destruction_0()’ at /<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc:92:28,
inlined from ‘(static initializers for /<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc)’ at /<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc:128:1:
/<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc:70:26: warning: array subscript 160 is above array bounds of ‘const char* [144]’ [-Warray-bounds=]
70 | if (Errno2String[EBADE]) {
| ~~~~~~~~~~~~~~~~~~^
/<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc: In function ‘(static initializers for /<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc)’:
/<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc:48:28: note: while referencing ‘{anonymous}::Errno2String’
48 | const char* Errno2String[errSlots] = {0};
| ^~~~~~~~~~~~
In function ‘int {anonymous}::initErrTable()’,
inlined from ‘void __static_initialization_and_destruction_0()’ at /<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc:92:28,
inlined from ‘(static initializers for /<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc)’ at /<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc:128:1:
/<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc:74:22: warning: array subscript 160 is above array bounds of ‘const char* [144]’ [-Warray-bounds=]
74 | Errno2String[EBADE] = "authentication failed - possible invalid exchange";
| ~~~~~~~~~~~~~~~~~~^
/<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc: In function ‘(static initializers for /<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc)’:
/<<PKGBUILDDIR>>/src/XrdSys/XrdSysE2T.cc:48:28: note: while referencing ‘{anonymous}::Errno2String’
48 | const char* Errno2String[errSlots] = {0};
| ^~~~~~~~~~~~
The XrdSutCacheArg_t type is used to pass arguments of different types. The type used must be wide enough to fit the widest of the types passed. One of the types passed is time_t, which can be 64 bits wide also on 32-bit systems. So a long, which is 32 bits wide on a 32-bit system is not sufficient. This commit changes the type to long long. Fixes: xrootd#2272
Without the patch, Mac OS X is missing the macros for the json-c library.
When `http.redirtoken` is enabled, a valid SciToken in the URL as an `authz` argument will be replaced with a sufficient Macaroon. The redirected Macaroon will have a few-second lifetime and be specific to the path being accessed.
Given the handler and the SciTokens plugin will want to invoke the macaroon generation code, extract it out into a standalone class in the XrdMacaroons directory. The intent of this code is to keep the libmacaroons code inside the XrdMacaroons directory. The cmake changes to build this code will eventually be replaced with a plugin interface. A subsequent commit will switch XrdMacaroons library to utilize this generator code.
This migrates the handler class to use the new XrdMacaroonsGenerator class for its HTTP plugin.
This commit consolidates all the invocations of the Macaroons configuration to a single implementation, ensuring that the logic is only invoked once per process.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
token to macaroon conversion for redirection