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

Adding the OverrideINIReader for SciTokens #1860

Merged
merged 2 commits into from
Dec 13, 2022

Conversation

djw8605
Copy link
Contributor

@djw8605 djw8605 commented Dec 13, 2022

The default INI reader will concat duplicate section+name settings with a '\n' separator. The new OverrideINIReader will simply take the last value in the INI configuration file.

For example:

[Issuer https://chtc.cs.wisc.edu/icecube]
issuer = https://chtc.cs.wisc.edu/icecube
base_path = /icecube/path1

[Issuer https://chtc.cs.wisc.edu/icecube]
issuer = https://chtc.cs.wisc.edu/icecube
base_path = /icecube/path2

Will result in a configuration with base_path set to /icecube/path2

Replaces #1859

  • Builds
  • Tested

The default INI reader will concat duplicate section+name settings
with a '\n' separator.  The new OverrideINIReader will simply take
the last value in the INI configuration file.
@biozit
Copy link
Contributor

biozit commented Dec 13, 2022

Please, let me know when this is ready to test.

@abh3 abh3 marked this pull request as ready for review December 13, 2022 20:58
Copy link
Member

@abh3 abh3 left a comment

Choose a reason for hiding this comment

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

Looks OK to me. Looks like that the only place INIReader is used.

@abh3 abh3 merged commit cdae187 into xrootd:master Dec 13, 2022
@abh3
Copy link
Member

abh3 commented Dec 13, 2022 via email

brianhlin added a commit to brianhlin/topology that referenced this pull request Dec 15, 2022
This commit consolidates sections for the https://osg-htc.org/ospool
in the scitokens.conf generated by Topology so that caches will
respect the OSPool issuer + multiple base paths.

xrootd-scitokens has multiple problems with duplicate issuers in its
config (both the section name and the attribute name).

1.  Duplicate `[Issuer ]` sections currently yield malformed values for
    attributes that are specified across these duplicate sections (values
    are `\n` separated). This is addressed but not yet released by
    choosing the last value for the duplicated section + attribute:

    - xrootd/xrootd#1860
    - xrootd/xrootd#1862

2.  Even with the fix for (1), this will result in only the last value
    of the duplicate sections being respected, which could cause
    transfers for end users to fail

So to work around all that, we hack this all into a single namespace
entry, which is fine since we don't use X.509 credentials and Path is
only used for namespaces that respect X.509.
brianhlin added a commit to brianhlin/topology that referenced this pull request Dec 15, 2022
This commit consolidates sections for the https://osg-htc.org/ospool
in the scitokens.conf generated by Topology so that caches will
respect the OSPool issuer + multiple base paths.

xrootd-scitokens has multiple problems with duplicate issuers in its
config (both the section name and the attribute name).

1.  Duplicate `[Issuer ]` sections currently yield malformed values
    for attributes that are specified across these duplicate
    sections (values are merged and `\n` separated). This is addressed by
    choosing the last value for the duplicated section + attribute:

    - xrootd/xrootd#1860
    - xrootd/xrootd#1862

    These changes have not yet been released.

2.  Even with the fix for (1), this will result in only the last value
    of the duplicate sections being respected, which could cause
    transfers for end users to fail

So to work around all that, we hack this all into a single namespace
entry, which is fine since we don't use X.509 credentials and Path is
only used for namespaces that respect X.509.
brianhlin added a commit to brianhlin/topology that referenced this pull request Dec 15, 2022
This commit consolidates sections for the https://osg-htc.org/ospool
in the scitokens.conf generated by Topology so that caches will
respect the OSPool issuer + multiple base paths.

xrootd-scitokens has multiple problems with duplicate issuers in its
config (both the section name and the attribute name).

1.  Duplicate `[Issuer ]` sections currently yield malformed values
    for attributes that are specified across these duplicate
    sections (values are merged and `\n` separated). This is addressed by
    choosing the last value for the duplicated section + attribute:

    - xrootd/xrootd#1860
    - xrootd/xrootd#1862

    These changes have not yet been released.

2.  Even with the fix for (1), this will result in only the last value
    of the duplicate sections being respected, which could cause
    transfers for end users to fail

So to work around all that, we hack this all into a single namespace
entry, which is fine since we don't use X.509 credentials and Path is
only used for namespaces that respect X.509.
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.

None yet

3 participants