Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trade in shared secret for an OAuth-grade refresh/access token? #81

Closed
michielbdejong opened this issue Mar 7, 2024 · 4 comments
Closed

Comments

@michielbdejong
Copy link
Contributor

We could benefit from OAuth best practices if we frame OCM as a pro-active flavour of OAuth.
The resource owner pro-actively gives the client access and sends them a shared secret via OCM.
After that, the current practice is that the client would then use this secret as-is to access the resource API (WebDAV or otherwise).
It might be better if we use the OAuth framework to make sure this client secret is not included in each network request.

@michielbdejong
Copy link
Contributor Author

See also #80

@michielbdejong
Copy link
Contributor Author

So we would remove

OCM-API/spec.yaml

Lines 465 to 469 in b45c7a0

sharedSecret:
type: string
description: |
An optional secret to be used to access the resource,
such as a bearer token.

And then instead the flows would be something like this:

  • invite-first, and public-link and share-with flows happen the same way as usual, with the difference that sharedSecret is left out
  • the receiving server requests access to the resource, acting as an OAuth client at this point
  • the sending server recognises the domain name of the receiving server and gives out access
  • The Client Credentials Grant seems appropriate here, but there might be other options - to be discussed
  • the receiving server can now access the resource

@michielbdejong
Copy link
Contributor Author

I'm not sure if we should push for this without a proactive ask for it from vendors. Will close it until someone asks for this option to be added.

@butonic
Copy link

butonic commented Apr 12, 2024

This is a blocker for oCIS. I'll try to clarify our requirements next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants