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

Tag-Files-Allowed semantics #29

Open
emetsger opened this issue May 21, 2020 · 1 comment
Open

Tag-Files-Allowed semantics #29

emetsger opened this issue May 21, 2020 · 1 comment

Comments

@emetsger
Copy link

Hi everyone (Timmo!),

If Tag-Files-Allowed is specified, can it be interpreted to have an implicit * at the end of the list? That is, putting something in Tag-Files-Allowed doesn't exclude other tag files. For example:

In my profile, I have:

"Tag-Files-Allowed": [
  "metadata/foo/*"
]

If metadata/bar.txt was present in the bag, it would still conform to my profile, even though it isn't mentioned in Tag-Files-Allowed, correct?

So, processors may interpret it as having an implicit * at the end:

"Tag-Files-Allowed": [
  "metadata/foo/*",
  "*"
]

Or, is the intent of Tag-Files-Allowed more along the lines of:

When processing a bag conforming to my profile, the processor ought to interpret the contents of metadata/foo/* according to the semantics of my profile? That is to say, if files are present in metadata/foo, they "belong" to my profile and should be interpreted accordingly? Does that make sense?

If that is the case, then the implicit * wouldn't make sense (because it wouldn't make sense for a single profile to advertise that all possible tag files are conformant).

Practically, it seems to be a mix-and-match: files specified in Tag-Files-Allowed "belong" to my profile, but the implicit * only applies to the "allowed" part, not the "belonging" part.

@ruebot
Copy link
Member

ruebot commented Jun 15, 2020

If metadata/bar.txt was present in the bag, it would still conform to my profile, even though it isn't mentioned in Tag-Files-Allowed, correct?

I'd say no here. Because if we look at 2.12 -- If Tag-Files-Allowed is not provided, its value is assumed to be ['*'], i.e. all tag files are allowed. -- that's taking the case where nothing is declared. In your example, you have metadata/foo/* declared. I'd interpret that as being everything residing in metadata/foo. metadata/bar.txt resides outside that, so it would not conform.

The second example is essentially 2.12 again, but the root wildcard is declared.

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