element-hq / element-hq/matrix-authentication-service
Verify Session with MAS not working
- Dominant language
- Rust
- Stars
- 280
- Forks
- 111
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 25
Description
**Describe the bug**
I set up MAS (matrix-authentication-service) with keycloak backend.
When i login with element X i can login.
Next step, verify Session:
I get the notification on another client (Element, Schildichat, both on Android and Linux desktop)
But element X stuck forever in "Waiting for another Device"
When i try to login with element oder Element-web, the verification-process works fluently with MAS and keycloak-backend also on the same device.
**To Reproduce**
Steps to reproduce the behavior:
1. Login with OIDC on Element X (MAS is configured for synapse)
2. Verify Device/Session
3. Accept verification-request on another device (Element/Schildichat...)
4. Wait forever on Element X to get the next screen.
**Expected behavior**
Verification on Element X working.
**Screenshots**
--
**Desktop (please complete the following information):**
--
**Smartphone (please complete the following information):**
- Device: Samsung A53
- OS: Android 14
- Browser: --
- Version: --
**Additional context**
Matrix-synapse 1.114.0 with integrated sliding-sync
matrix-authentication-service: v0.12.0
Identity-Provider: keycloak
When element x tries to start the verification-process for the new session i get this in homeserver.log
```
2024-09-17 09:48:00,744 - synapse.api.auth.msc3861_delegated - 338 - ERROR - POST-4041 - Failed to introspect token
Traceback (most recent call last):
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/http/client.py", line 425, in request
response = await make_deferred_yieldable(request_deferred)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
twisted.internet.defer.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/api/auth/msc3861_delegated.py", line 336, in get_user_by_access_token
introspection_result = await self._introspect_token(token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/api/auth/msc3861_delegated.py", line 227, in _introspect_token
response = await self._http_client.request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/http/client.py", line 442, in request
e.args[0],
~~~~~~^^^
IndexError: tuple index out of range
2024-09-17 09:48:00,747 - synapse.http.server - 782 - WARNING - POST-4041 - Not sending response to request , already disconnected.
2024-09-17 09:48:00,856 - synapse.http.server - 782 - WARNING - POST-4042 - Not sending response to request , already disconnected.
2024-09-17 09:48:01,109 - synapse.api.auth.msc3861_delegated - 338 - ERROR - POST-4049 - Failed to introspect token
Traceback (most recent call last):
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/http/client.py", line 425, in request
response = await make_deferred_yieldable(request_deferred)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
twisted.internet.defer.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/api/auth/msc3861_delegated.py", line 336, in get_user_by_access_token
introspection_result = await self._introspect_token(token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/api/auth/msc3861_delegated.py", line 227, in _introspect_token
response = await self._http_client.request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/http/client.py", line 442, in request
e.args[0],
~~~~~~^^^
IndexError: tuple index out of range
```
Contributor guide
Assessment
This issue has not been assessed yet.