Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b257c7a

Browse files
authoredDec 3, 2024
Be able to test /login/sso/redirect in Complement (#17986)
Be able to test `/login/sso/redirect` in Complement Spawning from element-hq/sbg#421 (comment) where we have a proxy that intercepts responses to `/_matrix/client/v3/login/sso/redirect(/{idpId})` in order to upgrade them to use OAuth 2.0 Pushed Authorization Requests (PAR). We have some Complement tests in that codebase that go over this flow and these changes are required [in order for the URL's to line up](https://github.com/element-hq/synapse/blob/d648c8ce3f4cbf61191b9f5302e405f7b0288677/synapse/rest/client/login.py#L652-L673).
1 parent d648c8c commit b257c7a

File tree

5 files changed

+8
-1
lines changed

5 files changed

+8
-1
lines changed
 

‎changelog.d/17986.misc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix Docker and Complement config to be able to use `public_baseurl`.

‎docker/complement/conf/workers-shared-extra.yaml.j2

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#}
88

99
## Server ##
10+
public_baseurl: http://127.0.0.1:8008/
1011
report_stats: False
1112
trusted_key_servers: []
1213
enable_registration: true

‎docker/conf-workers/nginx.conf.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ server {
4242
{% endif %}
4343
proxy_set_header X-Forwarded-For $remote_addr;
4444
proxy_set_header X-Forwarded-Proto $scheme;
45-
proxy_set_header Host $host;
45+
proxy_set_header Host $host:$server_port;
4646
}
4747
}

‎scripts-dev/complement.sh

+4
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ if [ -z "$skip_docker_build" ]; then
195195
# Build the unified Complement image (from the worker Synapse image we just built).
196196
echo_if_github "::group::Build Docker image: complement/Dockerfile"
197197
$CONTAINER_RUNTIME build -t complement-synapse \
198+
`# This is the tag we end up pushing to the registry (see` \
199+
`# .github/workflows/push_complement_image.yml) so let's just label it now` \
200+
`# so people can reference it by the same name locally.` \
201+
-t ghcr.io/element-hq/synapse/complement-synapse \
198202
-f "docker/complement/Dockerfile" "docker/complement"
199203
echo_if_github "::endgroup::"
200204

‎synapse/config/logger.py

+1
Original file line numberDiff line numberDiff line change
@@ -360,5 +360,6 @@ def setup_logging(
360360
"Licensed under the AGPL 3.0 license. Website: https://github.com/element-hq/synapse"
361361
)
362362
logging.info("Server hostname: %s", config.server.server_name)
363+
logging.info("Public Base URL: %s", config.server.public_baseurl)
363364
logging.info("Instance name: %s", hs.get_instance_name())
364365
logging.info("Twisted reactor: %s", type(reactor).__name__)

0 commit comments

Comments
 (0)