feat(OCM): Make it possible to have a spec compliant discovery#61580
Open
mickenordin wants to merge 1 commit into
Open
feat(OCM): Make it possible to have a spec compliant discovery#61580mickenordin wants to merge 1 commit into
mickenordin wants to merge 1 commit into
Conversation
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>
7dd4c4e to
5bddf1c
Compare
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.
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-proposal1which 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
3. to review, feature component)stable32)