-
Notifications
You must be signed in to change notification settings - Fork 186
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
[Sharing NG] Tokeninfo endpoint #8617
Comments
To add a bit more detail on how Web uses the tokeninfo endpoint: When resolving a public link, Web needs to know if the link is internal or external to properly redirect the user to either the resolved public page or the internal location (after user login).
|
I have a graph implementation ready, currently just the logic, no tests, no bells and whistles… we can use it as basis for discussion. not at my desk right now but I’ll add the pr tomorrow. Thanks to everyone that was part of the brainstorming! |
Apart from just re-implementing the tokeninfo logic for sharing-ng, we could try to find a cleaner way to get the same functionality. After some some discussion we came up with this, which should not need a tokeninfo endpoint at all and could purely work with webdav. It is still somewhat rough and we would have to prove that it does actually work: The client should basically always sent a PROPFIND to
This would however require some changes our ocdav service (it does not handled the above request on the publicstorageids yet) and AFAICS also in the way we handle authentication for ocdav. So it requires some more research. |
Yes I like that approach more than the old one. But some parts are not really clear to me.
Where does it get that URL from? It might only have the public link
As much as that would be a smooth user experience, I am not sure we can do this. We are giving away information from a password protected link, without knowing the password. Might be better if we avoid this. |
The public storage and space ids are currently hardcoded AFAIK, so those would basically come from configuration. Alternatively to
AFAIK this is already the current behavior of the web client when resolving a password-protected link via the tokeninfo endpoint. And if the user does already have access to that resource we're not giving anymore access that the user would already have. |
Yes better 👍 I would like to avoid clients having to learn server id logic
True, but that doesn't mean that the behaviour is currently secure. We do not disclose access to the file, that is true, but we are giving away information about the link to a user who might not have that information otherwise. I agree the attack vector here is very small, but we should try to avoid such cases completely. |
Password protected links always prompt the user for a password currently, no matter if they are authenticated or if they have access to that resource or not. After the password has been successfully entered, the server responds with all necessary information to resolve that link to its internal location (for authenticated users that have access). IMO this behaviour is fine for the future. I also don't understand the security concern with this approach since Web asks for a password in any case 🤔 |
Yeah, maybe I'm exaggerating the security impact. My point is only that I'm not happy with giving away information (in this case the fileid) to a user who has not yet provided the password. |
I'm totally with you, hence my suggestion to leave the UX as it already is and not give away anything until the user has entered a valid password. Web can still redirect the user to whatever location necessary afterwards. |
@JammingBen Just for clarification (so that I can update the requirements/spec). When an authenticated user is accessing a password protected public link the user needs to enter the password for that link? |
Correct 👍 |
Follow Up Ticket #8858 |
Description
Web needs to be able to resolve public links and prompt the users for proper authentication.
Current implementation (ocs)
The OCS API provides a tokeninfo endpoint for public links (
ocs/v1.php/apps/files_sharing/api/v1/tokeninfo/unprotected/{token}
) which can be queried unauthenticated. The server responds with same basic data that the Web client uses to correctly resolve a public link.Sharing NG
Therefore Web needs something similar with Sharing NG. The relevant information:
Requirements
cc @micbar @kobergj @butonic
The text was updated successfully, but these errors were encountered: