Repository navigation
feat(auth): store scopes on app passwords - #65268
pringelmann wants to merge 6 commits into
Conversation
f50f496 to
dd472f6
Compare
dd472f6 to
e3ec082
Compare
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
e3ec082 to
3f0d7ab
Compare
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
cc3d87e to
e0353ab
Compare
nickvergessen
left a comment
There was a problem hiding this comment.
Not seeing it here in the diff, so I'm asking. Some things from filesystem e.g. appdata_* need to be always/frequent loadable, e.g. to load identity proof and check for updates, etc.
The other thing I'm wondering is how we could potentially improve the situation for e.g. mobile apps that try to render notifications/activity. It seems they would need at least *:read for all apps/scopes that potentially create activity/notifications as otherwise their resource should not be loadable and they would not be able to render them?
But maybe that is not the idea for now and you simply would use an unscoped token for such cases.
Otherwise while I didn't check the tests files, the general approach looks like we are going into the right direction, so I'm in
Thanks!
|
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Summary
First step towards limited app passwords: a token can now carry a list of scopes. This PR only stores them. Apart from files access nothing enforces them yet, and there's no UI.
How scopes work
scopeskey in the existingscopeJSON column, so no migrationfiles:read,files:sharein files,calendar:read,contacts:writeetc. in davfiles:read, andfiles:readneedsfiles:writeuntil read-only files existscopeskey means full access. That's every existing token, unchangedfiles:read, so code reading it keeps workingapp:<appid>)Change description
Next step
Enforcement on routes and DAV, then the access picker in Settings.
Checklist
3. to review, feature component)stable32)AI (if applicable)