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

Authorization Database format: composite id spec incompatible between documentation and implementation. #1325

Closed
aoanla opened this issue Nov 10, 2020 · 2 comments

Comments

@aoanla
Copy link
Contributor

aoanla commented Nov 10, 2020

At present (and, it appears, for as long as the feature has been implemented), there is a discrepancy between how the documentation tells you to configure "composite ids" for authdb files, and how the code validates them.

In the documentation (ie: https://xrootd.slac.stanford.edu/doc/dev50/sec_config.htm#_Toc42289936 )
The example says:

Example

= atlddm o atlas r production u ddm

= atlprod o atlas r production

x atlddm /atlas ld

x atlprod /atlas lrw

o atlas /atlas lr

A client whose name is ddm and is a member of the atlas organization and has a role of production is allowed to lookup and delete files in /atlas. A client who is a member of the atlas organization and has a role of production is allowed to lookup, read and write files in /atlas. Otherwise, client’s who are members of the atlas organization can only lookup and read file in /atlas.

And further up, the description of the idspec values is:

idspec

is a single letter indicating the type of entity identifier that follows. You must specify one or more of them.

This will not work, however, as the code is looking for

// Id's are of the form 'c:', make sure we have that (don't validate it)
//
if (strlen(pp) != 2 || !index("ghoru", *pp))

That is, it wants something that looks like "o:" not "o".

Changing the provided specifiers in the Example to

= atlddm o: atlas r: production u: ddm
= atlprod o: atlas r: production

(and not altering the x lines)

successfully removes the error.

Could either the documentation be changed to agree with the code, or the code be changed to agree with the documentation, whichever is out of sync with the design intent?

@abh3
Copy link
Member

abh3 commented Nov 10, 2020 via email

@abh3
Copy link
Member

abh3 commented Nov 13, 2020

The documentation should now be fixed but only for the latest document version. Unfortunately, we cannot update old documents that are still listed on the web page as these versions have long since gone.

@abh3 abh3 closed this as completed Nov 13, 2020
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

No branches or pull requests

2 participants