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

OIDC-awareness #850

Merged
merged 7 commits into from
Jan 12, 2025
Merged

OIDC-awareness #850

merged 7 commits into from
Jan 12, 2025

Conversation

KitsuneRal
Copy link
Member

@KitsuneRal KitsuneRal commented Jan 11, 2025

This implements matrix-org/matrix-spec-proposals#3824, using the unstable prefix for delegated_oidc_compatibility. Mainly driven by https://matrix.org/blog/2025/01/06/authentication-changes/. Strictly speaking, adding this new flag to LoginFlow breaks ABI compatibility because it changes the structure size; so I guess it will have to land in 0.10. The good news is that the current libQuotient code already satisfies the "must" feature set described in MSC3824 so we don't need to race against January, 15.

The key change is actually in the last commit: when the mentioned flag is detected, Connection::supportsPasswordAuth() will return false even if the password flow is still there. You can still check for the password flow by using the newly introduced Connection::getLoginFlow().

Ideally, GTAD/Mustache templates should deal with unstable and stable
("m.*") versions interchangeably (stable preferred, unstable as
a fallback) but that's a bit away if at all possible.
Appends "action=register" to the URL query; see also MSC3824.
Because the supported toolchains only have std::ranges::contains on
Linux.
This commit also introduces Connection::getLoginFlow() that returns the
entire LoginFlow object by its type (that still doesn't include any
extra fields not in the spec but that's for another day).
@KitsuneRal KitsuneRal added the enhancement A feature or change request for the library label Jan 11, 2025
@TobiasFella
Copy link
Member

Looks good. I started using it in https://invent.kde.org/network/neochat/-/merge_requests/2106, but it's not entirely working as supposed yet, due to what's apparently a bug in MAS

TobiasFella
TobiasFella previously approved these changes Jan 11, 2025
@KitsuneRal
Copy link
Member Author

While at it - I wonder if it makes sense to change the callback URL path from /returnToApplication to something more descriptive, like the application name. I guess some may consider it a leak. It could be a device name instead, which the server already knows, but then having a URL like https://localhost:2345/returnToWork would be hardly better than the current one.

@KitsuneRal
Copy link
Member Author

Going forward without changing the callback URL; it can be changed separately any time.

@KitsuneRal KitsuneRal merged commit c191d56 into dev Jan 12, 2025
7 checks passed
@KitsuneRal KitsuneRal deleted the kitsune/oidc-aware branch January 12, 2025 10:30
@KitsuneRal
Copy link
Member Author

Aand this effectively splits dev from 0.9.x. The stable branch will come in a moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A feature or change request for the library
Projects
Status: 0.10 - Done
Development

Successfully merging this pull request may close these issues.

2 participants