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

Make synapse-admin work with matrix-authentication-service #38

Open
xundeenergie opened this issue Sep 23, 2024 · 4 comments
Open

Make synapse-admin work with matrix-authentication-service #38

xundeenergie opened this issue Sep 23, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@xundeenergie
Copy link

xundeenergie commented Sep 23, 2024

Matrix-authrntication-service (MAS) is a real OIDC authentication system and you could authorize users with optional client-scope urn:synapse:admin:* to gain synapse admin privileges for a session to be able to use synapse-admin when MAS is configerd on a homeserver as auth-service.

Here is a referencing issue, what clients need.
element-hq/matrix-authentication-service#2187

And an upstream issue
Awesome-Technologies/synapse-admin#429


updated by maintainers

Temporary workaround - generate a correct access token using MAS CLI and use it with "access token" login in Synapse Admin:

mas-cli manage issue-compatibility-token --yes-i-want-to-grant-synapse-admin-privileges [username]

If you are using MAS with docker, you probably should use the following command (replace the NAME_OR_ID with actual container name/id):

docker exec -it NAME_OR_ID manage issue-compatibility-token --yes-i-want-to-grant-synapse-admin-privileges [username]
@aine-etke aine-etke added the enhancement New feature or request label Sep 24, 2024
@sandhose
Copy link

We recently added a client implementation guide on areweoidcyet.com which should greatly help understand how the new login API work: https://areweoidcyet.com/client-implementation-guide/

The general API is very similar to m.login.sso, with some extra steps.
The other difficulty might come from the fact that access tokens have a low TTL (5min by default) and need to be refreshed regularly.

@aine-etke
Copy link
Member

Updated the issue's description to include access token workaround

@xundeenergie
Copy link
Author

I tried this but the token does not work.
Is there something to know, how to paste the token?
Some quoting or make a json out of the output from mas-cli?

@aine-etke aine-etke pinned this issue Dec 2, 2024
@aine-etke
Copy link
Member

@xundeenergie not sure what's wrong, but there are reports this approach with compatibility token works as expected.
Unfortunately, we at etke.cc do not use MAS at all, so we can't help with identifying the room cause, but you may try #synapse-admin:etke.cc - there are people who confirmed it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants