element-hq / element-hq/synapse

Cannot use UI auth with JWT login

Open
#16,508 0 comments 0 reactions 0 assignees View on GitHub
O-Uncommon S-Major T-Defect
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#16508](https://github.com/matrix-org/synapse/issues/16508).

---

### Description

Hello,
im using dart sdk with JWT token from another auth service and when doing bootstrap i get to this point:
```
flutter: [Matrix] BootstrapState: BootstrapState.loading
flutter: [Matrix] Upload device signing keys.
```
after that i get `flutter: [Matrix] [Bootstrapping] Error setting up cross signing - M_FORBIDDEN: Require additional authentication`

based on information i found it seems like its not dart sdk issue.

this issue is probably related to #15779

### Steps to reproduce

1) use jwt authentication
2) try to do uploadCrossSigningKeys https://pub.dev/documentation/matrix_api_lite/latest/matrix_api_lite/MatrixApi/uploadCrossSigningKeys.html
3) see error

### Homeserver

private synapse

### Synapse Version

1.93.0

### Installation Method

Docker (matrixdotorg/synapse)

### Database

Postgres

### Workers

I don't know

### Platform

ubuntu

### Configuration

```yaml
jwt_config:
enabled: true
secret: |-
-----BEGIN CERTIFICATE-----
REDACTED
-----END CERTIFICATE-----
algorithm: "RS256"
subject_claim: "sub"
issuer: "REDACTED"
audiences:
- "REDACTED"
```

### Relevant log output

```shell
2023-10-17 03:04:10,463 - synapse.access.http.8008 - 465 - INFO - POST-16 - 178.255.168.37 - 8008 - {@REDACTED:REDACTED.com} Processed request: 0.019sec/0.000sec (0.006sec, 0.001sec) (0.002sec/0.012sec/6) 61B 401 "POST /_matrix/client/v3/keys/device_signing/upload HTTP/1.1" "Dart/3.1 (dart:io)" [0 dbevts]
```

### Anything else that would be useful to know?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.