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

@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
@mickenordin
mickenordin force-pushed the kano-standrad-discovery branch 2 times, most recently from 5bddf1c to 7c6c50d Compare June 25, 2026 15:00
@AndyScherzinger
AndyScherzinger requested a review from sorbaugh June 25, 2026 15:12
@susnux susnux added the community pull requests from community label Jun 27, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

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 force-pushed the kano-standrad-discovery branch from 7c6c50d to fa0b1d0 Compare July 17, 2026 08:54
@CarlSchwan

Copy link
Copy Markdown
Member

I am not sure where removePublicKey is called?

@mickenordin
mickenordin enabled auto-merge July 17, 2026 09:22
@mickenordin

Copy link
Copy Markdown
Contributor Author

I am not sure where removePublicKey is called?

The idea is that this can be done by an app. If you prefer, I could add a config toggle instead?

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 community pull requests from community feedback-requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants