-
Notifications
You must be signed in to change notification settings - Fork 4
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
Does the API base path require authorization? #66
Comments
Does this conflict with our trailing slash rules? Or is more wording required to clarify the text?
An empty string would be no permission and should be excluded from the token since it could not match anything with the regex equivalent. |
An empty regex matches everything, I believed? Since the docs currently say "all path specifiers MUST start after the API version and its trailing slash", I would say that the path closest to the root that can be expressed is therefore Since the It's slightly awkward that |
Just to check, do you still think a token should be necessary to access paths before the trailing slash, or should these not require a token at all? If the former, would paths like |
Sorry, yes, I meant to offer auth not being required at all 'above' |
I don't believe there's a downside to the Auth header being present when it's not required, unless of course you send it to a 'rogue system' which could re-use the token until it expires. I don't think it's a big deal to not require auth for the base path, but it does mean that resource server testing will need to be subtly specialised for each specification under test. This may be most challenging for the Registration API which doesn't offer a GET path which is guaranteed to exist beyond the base path. |
By 'base path', do you mean What's the need in the tests for a GET path that's guaranteed to exist? The pattern (And I suppose there ought to be tests to make sure that |
By base path I meant If we say that The issue that remains is that if you don't want to put |
Adding |
I'm not sure it needs to be in conflict with the trailing slash policy? |
Yes, says google My Terminology
Is there a use case were permission should be revoked for the API base path? Does that make sense? I could not image one... Perhaps the permission should always given when the Scenarios thus far
|
Hmm, are we not transforming it to |
Depends on the regex implementation some do not require it. |
|
The empty regex matches every string, the |
Does that make sense to do? Yes that's fine if we do it, but I would never expect it in a deployment.
Did you mean to include the API base path? Ie, so only API base path and all paths with 'sender' |
I meant: (only) all paths with 'sender' |
Perhaps it's worth thinking about this another way. I can't currently see any reasons why it makes sense to restrict access to the API base path if you are granting access to some other paths in the same API. On that basis, is it really worth increasing the size of every token by adding an empty string element to each claims array (which also has the potential to get forgotten) for the sake of being explicit? |
Yes, it would seem very reasonable that everything up to (As an aside, was there any discussion about use cases for separately authorizing different API versions?) |
Yes, I think words certainly need adding if we define a special case regarding the path matching. I don't believe there has been any discussion of separately authorising different versions. |
If the API scope is granted, resource servers SHALL permit the API base path You have to have the scope to have the private claim, I don't think we need an extra statement in that case. |
Sounds about right, although I think we may be able to avoid the * at the start of paths. I think this boils down to:
Does that sound reasonable? |
Yes, ^ that! Very clear, Andrew. Not sure what you mean by "I think we may be able to avoid the * at the start of paths"? |
I was reading |
And I was wondering if we could define |
Paths such as
/x-nmos/connection/v1.1
could require a token to access, and this is what the testing tool is currently assuming. However, the claims path structure which uses paths likesingle/senders/*
means it's not obvious how you would provide or constrain access to this base path.Is this path 'special' in that it provides an implicit read permission if any valid token is presented to it? Does the empty string
""
signify permission to access this path? Or does this path not require authorization at all?The text was updated successfully, but these errors were encountered: