Repository navigation
Description
Description
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 /dav/public-files/{sharetoken}
- authenticated clients accessing an internal link are redirected to the "real" resource (`/dav/spaces/{target-resource-id}
authenticated clients accessing a pubic link (password protected or not) for a resource they already have access to are also redirected to the "real" resource. (and always need to supply the password)(this is case is handled by the client, no server redirect involved here)- unauthenticated clients accessing an internal link get a 401 returned with
WWW-Authenticateset toBearer(so that the client knows that it need to get a token via the IDP login page. - unauthenticated clients accessing a password protected link get a 401 returned with
WWW-Authenticateset toBasicto indicate the requirement for needing the link's password.
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.
User Stories
-
As a client, i want to understand the context of my link (internal, public, password-protected) to give my users the best User Experience
Value
UX
Acceptance Criteria
- The requirements from above are fulfillable with WebDAV
Definition of ready
- Everybody needs to understand the value written in the user story
- Acceptance criteria have to be defined
- All dependencies of the user story need to be identified
- Feature should be seen from an end user perspective
- Story has to be estimated
- Story points need to be less than 20
Definition of done
- Functional requirements
- Functionality described in the user story works
- Acceptance criteria are fulfilled
- Quality
- Code review happened
- CI is green (that includes new and existing automated tests)
- Critical code received unit tests by the developer
- Non-functional requirements
- No sonar cloud issues
- Configuration changes
- The next branch of the ocis charts is compatible
Metadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
rhafer commentedon Apr 17, 2024
I've adjusted the initial description a bit. In the discussion in #8617 we agreed on the initial WebDAV endpoint for public links being
/dav/public-files/{sharetoken}to avoid more usage of hardcoded server uuid's. (See #8617 (comment))2403905 commentedon Apr 23, 2024
@micbar @rhafer @kobergj Please have a look at the POC.
It still needs to change the response format for the internal link
PROPFINDrequest.Against the public link response:
rhafer commentedon Apr 29, 2024
I think the intention for internal links was to have the
/dav/public-files/endpoint reply with a HTTP redirect (Status code 301 or 302) pointing the client to the correct location at/dav/files/<resourceid>.2403905 commentedon May 2, 2024
Do you mean the redirect to the
/dav/spaces/<resourceid>?refactor: remove tokeninfo endpoint usage
2403905 commentedon May 2, 2024
@micbar @rhafer Based on @JammingBen suggestion I removed the WWW-Authenticate Basic header in case when unauthenticated clients accessing a password protected link.
micbar commentedon May 2, 2024
Ok, fine for me.
refactor: remove tokeninfo endpoint usage
rhafer commentedon May 28, 2024
#8926 was merged
refactor: remove tokeninfo endpoint usage
refactor: remove tokeninfo endpoint usage