summary refs log tree commit diff
path: root/tests/handlers/test_oauth_delegation.py
diff options
context:
space:
mode:
authorV02460 <git@kaialexhiller.de>2025-02-04 19:45:33 +0100
committerGitHub <noreply@github.com>2025-02-04 12:45:33 -0600
commite41174cae3a74a2e6f9cb1386eb6e0b5510d6fce (patch)
treecc91a1574d62419d5847a130fa98ec02782282b5 /tests/handlers/test_oauth_delegation.py
parent1.124.0rc1 (diff)
downloadsynapse-e41174cae3a74a2e6f9cb1386eb6e0b5510d6fce.tar.xz
Add MSC3861 config options admin_token_path and client_secret_path (#18004)
Another PR on my quest to a `*_path` variant for every secret. Adds two
config options `admin_token_path` and `client_secret_path` to the
experimental config under `experimental_features.msc3861`. Also includes
tests.

I tried to be a good citizen here by following `attrs` conventions and
not rewriting the corresponding non-path variants in the class, but
instead adding methods to retrieve the value.

Reading secrets from files has the security advantage of separating the
secrets from the config. It also simplifies secrets management in
Kubernetes. Also useful to NixOS users.
Diffstat (limited to 'tests/handlers/test_oauth_delegation.py')
-rw-r--r--tests/handlers/test_oauth_delegation.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/handlers/test_oauth_delegation.py b/tests/handlers/test_oauth_delegation.py

index 5f73469daa..ba2f8ff510 100644 --- a/tests/handlers/test_oauth_delegation.py +++ b/tests/handlers/test_oauth_delegation.py
@@ -795,7 +795,7 @@ class MSC3861OAuthDelegation(HomeserverTestCase): req = SynapseRequest(channel, self.site) # type: ignore[arg-type] req.client.host = MAS_IPV4_ADDR req.requestHeaders.addRawHeader( - "Authorization", f"Bearer {self.auth._admin_token}" + "Authorization", f"Bearer {self.auth._admin_token()}" ) req.requestHeaders.addRawHeader("User-Agent", MAS_USER_AGENT) req.content = BytesIO(b"")