Skip to content

Conversation

sandhose
Copy link
Member

@sandhose sandhose commented Jun 13, 2025

This adds stable APIs for both MSC2965 and MSC2967

@sandhose sandhose marked this pull request as ready for review June 13, 2025 09:45
@sandhose sandhose requested a review from a team as a code owner June 13, 2025 09:45
@@ -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"
Copy link
Contributor

@MadLittleMods MadLittleMods Jul 11, 2025

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:
Copy link
Contributor

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?

Copy link
Member Author

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

@sandhose sandhose enabled auto-merge (squash) August 4, 2025 16:19
@sandhose sandhose disabled auto-merge August 4, 2025 16:20
@sandhose sandhose requested a review from MadLittleMods August 4, 2025 16:21
@sandhose
Copy link
Member Author

sandhose commented Aug 4, 2025

@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

Comment on lines +113 to +116
("urn:matrix:client:device:", "urn:matrix:client:api:*"),
(
"urn:matrix:org.matrix.msc2967.client:device:",
"urn:matrix:org.matrix.msc2967.client:api:*",
Copy link
Contributor

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

Comment on lines +60 to +63
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:"
Copy link
Contributor

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.

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

Successfully merging this pull request may close these issues.

2 participants