feat(OCM): Make it possible to have a spec compliant discovery#61580
feat(OCM): Make it possible to have a spec compliant discovery#61580mickenordin wants to merge 1 commit into
Conversation
5bddf1c to
7c6c50d
Compare
|
Hello there, 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>
7c6c50d to
fa0b1d0
Compare
|
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? |
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)