Skip to content

feat: hierarchical scope matching for URNs#1415

Merged
sebadob merged 1 commit intosebadob:mainfrom
chbgdn:feat/wildcard-scopes
Feb 18, 2026
Merged

feat: hierarchical scope matching for URNs#1415
sebadob merged 1 commit intosebadob:mainfrom
chbgdn:feat/wildcard-scopes

Conversation

@chbgdn
Copy link
Copy Markdown
Contributor

@chbgdn chbgdn commented Feb 16, 2026

Adds support for flexible scope matching. This is required for Matrix (MSC3861) to handle dynamic URNs, like urn:matrix:device:some_id. It now correctly matches base URNs (e.g., urn:matrix:device) with their hierarchical extensions.

This logic is opt-in via the new [matrix] config section (MATRIX_SUPPORT_ENABLE).

Also improved validation by splitting the CSV scope string, which avoids accidental substring matches (e.g., api matching matrix:api).

@chbgdn chbgdn force-pushed the feat/wildcard-scopes branch 4 times, most recently from eede781 to 9f7843e Compare February 17, 2026 04:10
@chbgdn chbgdn changed the title feat: implementation of wildcard scope matching in login flow feat: hierarchical scope matching for URNs Feb 17, 2026
@sebadob
Copy link
Copy Markdown
Owner

sebadob commented Feb 17, 2026

(...) which avoids accidental substring matches.

Thanks. I had that on my TODO already.

When the Matrix flow is fully working it would be very nice if you could add it to the docs about it. Just shortly mention the setup and necessary config options to set. I would create a "Guides" or "Example Configs", section or something like that. I wanted to start this since a long time already, I just did not have the time. Matrix however requires a bit more setup and this would be very helpful for others I guess.

@chbgdn chbgdn force-pushed the feat/wildcard-scopes branch 2 times, most recently from 980ba28 to ae7ac6d Compare February 18, 2026 00:03
@chbgdn
Copy link
Copy Markdown
Contributor Author

chbgdn commented Feb 18, 2026

When the Matrix flow is fully working it would be very nice if you could add it to the docs about it. Just shortly mention the setup and necessary config options to set. I would create a "Guides" or "Example Configs", section or something like that. I wanted to start this since a long time already, I just did not have the time. Matrix however requires a bit more setup and this would be very helpful for others I guess.

I actually managed to get a successful login with one more small tweak on top of this PR, so the proof of concept is working. I'll start with the guide once I've polished the remaining parts and made sure the whole flow is 100% solid.

@chbgdn chbgdn force-pushed the feat/wildcard-scopes branch 3 times, most recently from 7c98369 to 089496c Compare February 18, 2026 15:47
@chbgdn chbgdn force-pushed the feat/wildcard-scopes branch from 089496c to 1dfe235 Compare February 18, 2026 15:49
@sebadob sebadob merged commit b6568bf into sebadob:main Feb 18, 2026
1 check passed
@chbgdn chbgdn deleted the feat/wildcard-scopes branch February 18, 2026 18:04
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