fix(ocm): OCM token refresh and remote detection - #2
Closed
MahdiBaghbani wants to merge 126 commits into
Closed
Conversation
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
…okens Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
…h token rather that request Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
…ing a remote share Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
…en, it may be an access token Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
… get an access token to use as bearer token Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
…urlencoded Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
… requirement, in addition to the exchaange-token capability Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
…ent the IUserSession interface Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
mickenordin
force-pushed
the
master
branch
10 times, most recently
from
May 13, 2026 09:32
f7632f8 to
19f76b9
Compare
mickenordin
force-pushed
the
master
branch
5 times, most recently
from
May 17, 2026 17:05
63f9205 to
e97cfe9
Compare
enriquepablo
force-pushed
the
master
branch
2 times, most recently
from
May 22, 2026 15:19
6c86ce4 to
a90d003
Compare
mickenordin
force-pushed
the
master
branch
11 times, most recently
from
May 29, 2026 10:36
54b788c to
925817e
Compare
Owner
|
outdated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is a part of cs3org/OCM-STA#16
Summary
This work improves OCM interoperability when Nextcloud federates with a Reva peer that supports the authorization code flow.
Bearer tokens obtained through OCM exchange are now stored in the dedicated access-token fields (with persisted expiry), and are reloaded when external shares are remounted. They are no longer carried via the legacy password path.
Token refresh honors the expiry signaled by the sender, avoids duplicate refresh when another process has already renewed the token, and applies backoff on repeated exchange attempts so a failing refresh does not overload the remote token endpoint.
After refresh, cloud-federation share metadata stays consistent with the live OCM response (share URI, permissions, and related fields).
status.phphandling is tightened so a Reva-branded response is not classified as an ownCloud-style peer when it is not, while legitimate OCM discovery continues to succeed.There is also a complementary PR in Reva as well cs3org/reva#5552
Motivation
The issues above appeared in end-to-end testing against a code-flow-capable Reva. Addressing
status.phpmisclassification on the Nextcloud side avoids depending on a long-lived Reva-sidestatus.phpcompatibility shim.For Enrique
This PR is against your branch because that is where the work should land first. You already have a PR from that branch into
nextcloud/servermaster, so once you fold this in, the same commits should show up in that upstream PR without opening a parallel PR from my fork.