ma1uta / ma1sd

Federated Matrix Identity Server (formerly fork of kamax/mxisd)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

M_UNAUTHORIZED: Supplied credentials are invalid

T3chTobi opened this issue · comments

Hello! I want to use ma1sd as an identity server with registering and inviting users enabled. This is the configuration I'm using:

dns:
    overwrite:
        homeserver:
            client:
            -   name: matrix.domain.com
                value: http://matrix-corporal:41080
hashing:
    algorithms:
    - none
    - sha256
    delay: 2m
    enabled: true
    hashStorageType: sql
    pepperLength: 20
    requests: 10
    rotationPolicy: per_requests
key:
    path: /var/ma1sd/sign.key
matrix:
    domain: domain.com
    v1: true
    v2: true
server:
    name: matrix.domain.com
storage:
    provider:
        sqlite:
            database: /var/ma1sd/ma1sd.db
synapseSql:
    connection: //matrix-postgres/homeserver?user=my-user&password=top-secret-123
    enabled: true
    type: postgresql
threepid:
    medium:
        email:
            connectors:
                smtp:
                    host: matrix-mailer
                    login: null
                    password: null
                    port: 8025
                    tls: 0
            identity:
                from: info@domain.com

I can register a new user. But when I want to invite a user to a room or when I want to add an email to the user in the settings, I'm getting this error:

POST https://matrix.domain.com/_matrix/identity/v2/account/register 401
M_UNAUTHORIZED: Supplied credentials are invalid

What can I do? Can someone send my a full configuration that I can use?

Could you please provide an exception log when try invoke POST https://matrix.domain.com/_matrix/identity/v2/account/register?

I think the important part is this:

Dec 07 23:07:47 domain.com matrix-ma1sd[415320]: [XNIO-1 task-3] INFO io.kamax.mxisd.http.undertow.handler.auth.v2.AccountRegisterHandler - Registration from domain: domain.com, expired at Mon Dec 07 23:07:50 GMT 2020
Dec 07 23:07:47 domain.com matrix-ma1sd[415320]: [XNIO-1 task-3] INFO io.kamax.mxisd.auth.AccountManager - Registration from the server: domain.com
Dec 07 23:07:47 domain.com matrix-ma1sd[415320]: [XNIO-1 task-3] INFO io.kamax.mxisd.matrix.HomeserverFederationResolver - No DNS overwrite for domain.com
Dec 07 23:07:47 domain.com matrix-ma1sd[415320]: [XNIO-1 task-3] DEBUG io.kamax.mxisd.matrix.HomeserverFederationResolver - Performing Well-known lookup for domain.com
Dec 07 23:07:47 domain.com matrix-ma1sd[415320]: [XNIO-1 task-3] DEBUG io.kamax.mxisd.matrix.HomeserverFederationResolver - Found well-known entry: matrix.domain.com:8448
Dec 07 23:07:47 domain.com matrix-ma1sd[415320]: [XNIO-1 task-3] INFO io.kamax.mxisd.matrix.HomeserverFederationResolver - Resolution of domain.com via well-known to https://matrix.domain.com:8448
Dec 07 23:07:47 domain.com matrix-ma1sd[415320]: [XNIO-1 task-3] INFO io.kamax.mxisd.auth.AccountManager - Domain resolved: domain.com => https://matrix.domain.com:8448
Dec 07 23:07:47 domain.com matrix-ma1sd[415320]: [XNIO-1 task-3] ERROR io.kamax.mxisd.auth.AccountManager - Wrong response status: 502
Dec 07 23:07:47 domain.com matrix-ma1sd[415320]: [XNIO-1 task-3] INFO io.kamax.mxisd.http.undertow.handler.BasicHttpHandler - Request POST http://matrix.domain.com/_matrix/identity/v2/account/register - Error M_UNAUTHORIZED: Supplied credentials are invalid
Dec 07 23:07:47 domain.com matrix-ma1sd[415320]: [XNIO-1 task-3] INFO io.kamax.mxisd.http.undertow.handler.RequestDumpingHandler -

Is this the log you were looking for or do you need another log?

I see you've closed the issue, did you manage to solve the problem? If yes then how?

+1 here