Matrix-authentication-service with keycloak as idp

Hi!

I’m running a matrix-synapse server and authentication directly with oidc and keycloak works best for a long time.
But i migrated the authentication for matrix-synapse to the new matrix-authentication-service (MAS), where i use keycloak also as backend.

There exists an administration-frontend for matrix-synapse called “synapse-admin”

This one supports login via OIDC also as synapse directly, but with more finegrained permissions.

To user MAS, you have to deactivate all authentification-mechanisms in synapse. All authentication and authorization runs via oidc and MAS-Server.

After migrating to MAS, i can not login to the admin-dashboard synapse-admin anymore.

When i debugged the problem i found, that something is wrong with the oidc-token.
To get admin-permissions to matrix-synapse the oidc-token need a urn:synapse:admin:* scope…

Look, here is the description:

(for admin-permissions on the MAS-server itself a scope urn:mas:admin:* has to be added to the token)

And i have NO idea, what i should configure in my keycloak to get this working. The docs from MAS are still very… simple.

so i created an issue there: How to configure keycloak to get admin-rights on synapse server · Issue #3211 · element-hq/matrix-authentication-service · GitHub

But i think, it’s a keycloak-issue…

Please can someone give me an advise, what i have to do here or point me to the place, to get this issue resolved?

Thank you very much

Jakob