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 description of path handling in storage scopes. #48

Merged
merged 1 commit into from
Mar 30, 2024

Conversation

maarten-litmaath
Copy link
Collaborator

This PR proposes additional clarifications for the handling of paths in storage scopes, based on suggestions in #21, as well as an improved formulation of the introductory paragraph about the topic.

Closes: #21


For example, a scope `storage.create:/foo/bar` must **allow** the creation of:
* a leading directory `/foo` if that path does not exist yet;
* a directory or file `/foo/bar` if `/foo` is a directory;
Copy link
Contributor

Choose a reason for hiding this comment

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

I would imagine that the authorising agent (the one deciding on the path) knows whether the AuthZ path should be a file or directory. Moreover, this agent might also care what the client does: they want to authorise creating a directory and not a file, or vice versa.

This would not be possible with the above semantics.

For example, suppose a token should allow the client to create/upload exactly one file. : a token with storage.create:/results/my-result.root would allow the client to create a directory /results/my-result.root and subsequently upload as many files as they want.

An alternative approach would be to use the presence or absence of a trailing slash to indicate what kind of object may be created.

For example, in the scenario where /foo exist as a directory but /foo/bar does not exist, then

  • storage.create:/foo/bar authorises the creation of a file bar but not a directory
  • storage.create:/foo/bar/ authorises the creation of the directory bar but not a file.

Copy link

@federicaagostini federicaagostini Jan 8, 2024

Choose a reason for hiding this comment

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

Hi, we all agree on this PR and Paul's comment.

Just to be super clear: a storage.create:/foo/bar/ scope also authorises the creation of a /foo/bar/qux file for example

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi all,
this proposed semantic change will have to be brought to the attention of all data management MW providers in our community.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hiya @maarten-litmaath , please feel free to drop the suggestion if you don't think it has merit (won't be genuinely useful). It was more an observation (of something that might be of interest) than a request that something is change. I don't want to create necessary work for other people.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think the idea is interesting enough to try to pursue, while hopefully all MW concerned can still be changed without too much hassle.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have opened #50 for continuing this discussion. For now, I will merge the PR as-is, thanks!

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.

Improve storage.*:/path description
3 participants