-
Notifications
You must be signed in to change notification settings - Fork 374
Support stable endpoint and scopes from the MSC3861 family #18549
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
base: develop
Are you sure you want to change the base?
Conversation
@@ -65,9 +64,10 @@ | |||
|
|||
# Scope as defined by MSC2967 | |||
# https://github.com/matrix-org/matrix-spec-proposals/pull/2967 | |||
SCOPE_MATRIX_API = "urn:matrix:org.matrix.msc2967.client:api:*" | |||
SCOPE_MATRIX_GUEST = "urn:matrix:org.matrix.msc2967.client:api:guest" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reference, this guest scope was removed from MSC2967 in the rework commit
@@ -432,9 +432,6 @@ async def _wrapped_get_user_by_req( | |||
if access_token != self._admin_token(): | |||
await self._record_request(request, requester) | |||
|
|||
if not allow_guest and requester.is_guest: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we get rid of all of the allow_guest
stuff in this file now that's unused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meh, it's still in the base 'auth' API, and this code is soon to go away anyway. The new stable integration doesn't have that anymore: https://github.com/element-hq/synapse/blob/develop/synapse/api/auth/mas.py
@MadLittleMods re-requesting reviews as I merged develop back in this since #18759 is merged. So I did the support for the stable scope also in the stable integration |
("urn:matrix:client:device:", "urn:matrix:client:api:*"), | ||
( | ||
"urn:matrix:org.matrix.msc2967.client:device:", | ||
"urn:matrix:org.matrix.msc2967.client:api:*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could replace these with constants
UNSTABLE_SCOPE_MATRIX_API = "urn:matrix:org.matrix.msc2967.client:api:*" | ||
UNSTABLE_SCOPE_MATRIX_DEVICE_PREFIX = "urn:matrix:org.matrix.msc2967.client:device:" | ||
STABLE_SCOPE_MATRIX_API = "urn:matrix:client:api:*" | ||
STABLE_SCOPE_MATRIX_DEVICE_PREFIX = "urn:matrix:client:device:" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the same as the ones below synapse/api/auth/msc3861_delegated.py
. We should have these shared from a single source of truth.
This adds stable APIs for both MSC2965 and MSC2967