Skip to content

feat(OCM): Make it possible to have a spec compliant discovery#61580

Open
mickenordin wants to merge 1 commit into
masterfrom
kano-standrad-discovery
Open

feat(OCM): Make it possible to have a spec compliant discovery#61580
mickenordin wants to merge 1 commit into
masterfrom
kano-standrad-discovery

Conversation

@mickenordin

Copy link
Copy Markdown
Contributor

The current discovery document have non standard elements, which are required for backwards compatibility with old Nextcloud versions.

There may however be deployments, that are up to date, and do not require backwards compatibility but instead value spec compliance and adding two new knobs to LocalOCMDiscoveryEvent can make that happen.

The new knobs are removeVersion which removes the non standard version field from the discovery and sets the correct apiVersion instead. Nextcloud prior to version 28 had an equality check for apiVersion and the hard coded string 1.0-proposal1 which is not at all the version that Nextcloud actually supports.

Along side this change a new function removePublicKey is also added. The publicKey in the discovery document is no longer used with the RFC9421 style http-signatures, and only the old legacy signatures use that key, since version 35 Nextcloud supports RFC9421 signatures, and the legacy publicKey can now be removed from the discovery if you don't require backwards compatibility with older Nextcloud versions.

Resolves: #52754

Note: For context #52758 may be of interest.

Checklist

The current discovery document have non standard elements, which are
required for backwards compatibility with old Nextcloud versions.

There may however be deployments, that are up to date, and do not require
backwards compatibility but instead value spec compliance and adding two
new knobs to LocalOCMDiscoveryEvent can make that happen.

The new knobs are removeVersion which removes the non standard version
field from the discovery and sets the correct apiVersion instead.
Nextcloud prior to version 28 had an equality check for apiVersion and
the hard coded string `1.0-proposal1` which is not at all the version
that Nextcloud actually supports.

Along side this change a new function removePublicKey is also added. The
publicKey in the discovery document is no longer used with the RFC9421
style http-signatures, and only the old legacy signatures use that key,
since version 35 Nextcloud supports RFC9421 signatures, and the legacy
publicKey can now be removed from the discovery if you don't require
backwards compatibility with older Nextcloud versions.

Fixes: #52754

Signed-off-by: Micke Nordin <kano@sunet.se>
@mickenordin mickenordin added this to the Nextcloud 35 milestone Jun 24, 2026
@mickenordin mickenordin requested review from a team and nickvergessen as code owners June 24, 2026 22:45
@mickenordin mickenordin added the 3. to review Waiting for reviews label Jun 24, 2026
@mickenordin mickenordin requested review from Altahrim, ArtificialOwl, leftybournes and salmart-dev and removed request for a team June 24, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove "1.0-proposal1" from OCM discovery and advertise real version

1 participant