Skip to content

Add support for ForwardAuth protected _synapse/admin API via CORS withCredentials option. #655

@jwmay2012

Description

@jwmay2012

I have my matrix.domain.com/_synapse/admin protected behind Authelia. It would be nice to allow me to keep that protection and authenticate with Authelia on these CORS requests by using the withCredentials = true option.
This allows the Cookie header to be sent along with the CORS requests to the matrix API, authenticating with Authelia (or any other Forward Auth).

https://stackoverflow.com/questions/54718199/cookie-based-authentication-via-rest-api-in-react-admin

Should be as simple as including
options.credentials = 'include'
https://github.com/Awesome-Technologies/synapse-admin/blob/master/src/synapse/dataProvider.ts#L16
and
credentials: 'include'
https://github.com/Awesome-Technologies/synapse-admin/blob/master/src/synapse/authProvider.ts#L20

Perhaps with a config flag to optionally switch it on.

Great project, thanks :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions