Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b72a23cf0d | ||
|
|
6cfdea8b6d | ||
|
|
25f398eda9 | ||
|
|
c6be4b9e11 | ||
|
|
f2efa0ace4 | ||
|
|
3efa89f92b | ||
|
|
fe51b493d4 | ||
|
|
85186e353f | ||
|
|
d294beaf99 | ||
|
|
40c4dfc7af |
24
CHANGELOG.md
24
CHANGELOG.md
@@ -1369,3 +1369,27 @@
|
|||||||
* Add worker_replication_secret_path config option. (#18191)
|
* Add worker_replication_secret_path config option. (#18191)
|
||||||
* Add support for specifying/overriding redirect_uri in the authorization and token requests against an OpenID identity provider. (#18197)
|
* Add support for specifying/overriding redirect_uri in the authorization and token requests against an OpenID identity provider. (#18197)
|
||||||
|
|
||||||
|
[1.107.0]
|
||||||
|
* Update base image to 5.0.0
|
||||||
|
|
||||||
|
[1.108.0]
|
||||||
|
* Update synapse to 1.127.0
|
||||||
|
* [Full Changelog](https://github.com/element-hq/synapse/releases/tag/v1.127.0)
|
||||||
|
* Update MSC4140 implementation to no longer cancel a user's own delayed state events with an event type & state key that match a more recent state event sent by that user. (#17810)
|
||||||
|
* Fixed a minor typo in the Synapse documentation. Contributed by @karuto12. (#18224)
|
||||||
|
* Remove undocumented SYNAPSE_USE_FROZEN_DICTS environment variable. (#18123)
|
||||||
|
* Fix detection of workflow failures in the release script. (#18211)
|
||||||
|
* Add caching support to media endpoints. (#18235)
|
||||||
|
|
||||||
|
[1.108.1]
|
||||||
|
* Update synapse to 1.127.1
|
||||||
|
* [Full Changelog](https://github.com/element-hq/synapse/releases/tag/v1.127.1)
|
||||||
|
* Fix CVE-2025-30355 / GHSA-v56r-hwv5-mxg6. High severity vulnerability affecting federation. The vulnerability has been exploited in the wild.
|
||||||
|
|
||||||
|
[1.109.0]
|
||||||
|
* Update synapse to 1.128.0
|
||||||
|
* [Full Changelog](https://github.com/element-hq/synapse/releases/tag/v1.128.0)
|
||||||
|
* Add an access token introspection cache to make Matrix Authentication Service integration (MSC3861) more efficient. (#18231)
|
||||||
|
* Add background job to clear unreferenced state groups. (#18254)
|
||||||
|
* Hashes of media files are now tracked by Synapse. Media quarantines will now apply to all files with the same hash. (#18277, #18302, #18296)
|
||||||
|
|
||||||
|
|||||||
@@ -5,15 +5,23 @@
|
|||||||
"description": "file://DESCRIPTION.md",
|
"description": "file://DESCRIPTION.md",
|
||||||
"changelog": "file://CHANGELOG.md",
|
"changelog": "file://CHANGELOG.md",
|
||||||
"tagline": "Secure & decentralized communication",
|
"tagline": "Secure & decentralized communication",
|
||||||
"version": "1.106.0",
|
"version": "1.109.0",
|
||||||
"upstreamVersion": "1.126.0",
|
"upstreamVersion": "1.128.0",
|
||||||
"healthCheckPath": "/",
|
"healthCheckPath": "/",
|
||||||
"httpPort": 8008,
|
"httpPort": 8008,
|
||||||
|
"httpPorts": {
|
||||||
|
"MAS_DOMAIN": {
|
||||||
|
"title": "Matrix Authentication Service Domain",
|
||||||
|
"description": "Matrix Authentication Service domain",
|
||||||
|
"containerPort": 8080,
|
||||||
|
"defaultValue": "auth"
|
||||||
|
}
|
||||||
|
},
|
||||||
"memoryLimit": 536870912,
|
"memoryLimit": 536870912,
|
||||||
"addons": {
|
"addons": {
|
||||||
"localstorage": {},
|
"localstorage": {},
|
||||||
"oidc": {
|
"oidc": {
|
||||||
"loginRedirectUri": "/_synapse/client/oidc/callback"
|
"loginRedirectUri": "/_synapse/client/oidc/callback, /upstream/callback/000000000000000000C10WDR0N"
|
||||||
},
|
},
|
||||||
"postgresql": {},
|
"postgresql": {},
|
||||||
"sendmail": {
|
"sendmail": {
|
||||||
|
|||||||
33
Dockerfile
33
Dockerfile
@@ -1,32 +1,41 @@
|
|||||||
FROM cloudron/base:4.2.0@sha256:46da2fffb36353ef714f97ae8e962bd2c212ca091108d768ba473078319a47f4
|
FROM cloudron/base:5.0.0@sha256:04fd70dbd8ad6149c19de39e35718e024417c3e01dc9c6637eaf4a41ec4e596c
|
||||||
|
|
||||||
RUN mkdir -p /app/pkg
|
RUN mkdir -p /app/pkg
|
||||||
|
|
||||||
WORKDIR /app/code
|
WORKDIR /app/code
|
||||||
|
|
||||||
# https://pythonspeed.com/articles/activate-virtualenv-dockerfile/
|
# https://github.com/element-hq/synapse/blob/master/docs/setup/installation.md?plain=1#L202
|
||||||
RUN virtualenv -p python3 /app/code/env
|
RUN python3 -m venv /app/code/env
|
||||||
ENV VIRTUAL_ENV=/app/code/env
|
|
||||||
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
|
||||||
|
|
||||||
# renovate: datasource=github-releases depName=element-hq/synapse versioning=semver extractVersion=^v(?<version>.+)$
|
# renovate: datasource=github-releases depName=element-hq/synapse versioning=semver extractVersion=^v(?<version>.+)$
|
||||||
ARG SYNAPSE_VERSION=1.126.0
|
ARG SYNAPSE_VERSION=1.128.0
|
||||||
|
|
||||||
# renovate: datasource=github-releases depName=matrix-org/synapse-s3-storage-provider versioning=semver extractVersion=^v(?<version>.+)$
|
# renovate: datasource=github-releases depName=matrix-org/synapse-s3-storage-provider versioning=semver extractVersion=^v(?<version>.+)$
|
||||||
ARG S3PROVIDER_VERSION=1.5.0
|
ARG S3PROVIDER_VERSION=1.5.0
|
||||||
|
|
||||||
|
# renovate: datasource=github-releases depName=element-hq/matrix-authentication-service versioning=semver extractVersion=^v(?<version>.+)$
|
||||||
|
ARG MAS_VERSION=0.15.0
|
||||||
|
|
||||||
# Synapse (https://github.com/matrix-org/synapse/blob/master/INSTALL.md)
|
# Synapse (https://github.com/matrix-org/synapse/blob/master/INSTALL.md)
|
||||||
# lxml - required for previews
|
# lxml - required for previews
|
||||||
RUN pip install --upgrade pip && \
|
RUN source /app/code/env/bin/activate && \
|
||||||
pip install --upgrade setuptools && \
|
pip3 install --no-cache-dir matrix-synapse==v${SYNAPSE_VERSION} psycopg2-binary python-ldap matrix-synapse-ldap3 lxml publicsuffix2 git+https://github.com/matrix-org/synapse-s3-storage-provider.git@v${S3PROVIDER_VERSION} matrix-synapse[oidc]
|
||||||
pip install matrix-synapse==v${SYNAPSE_VERSION} psycopg2-binary python-ldap matrix-synapse-ldap3 lxml publicsuffix2 git+https://github.com/matrix-org/synapse-s3-storage-provider.git@v${S3PROVIDER_VERSION} matrix-synapse[oidc]
|
|
||||||
|
|
||||||
# Updated suffix list
|
# Updated suffix list
|
||||||
RUN curl -L https://publicsuffix.org/list/public_suffix_list.dat -o /app/code/env/lib/python3.10/site-packages/publicsuffix2/public_suffix_list.dat
|
RUN curl -L https://publicsuffix.org/list/public_suffix_list.dat -o /app/code/env/lib/python3.12/site-packages/publicsuffix2/public_suffix_list.dat
|
||||||
|
|
||||||
RUN ln -sf /app/data/index.html /app/code/env/lib/python3.10/site-packages/synapse/static/index.html
|
# matrix-authentication-service
|
||||||
|
RUN mkdir -p /app/code/mas && \
|
||||||
|
curl -L https://github.com/element-hq/matrix-authentication-service/releases/download/v${MAS_VERSION}/mas-cli-x86_64-linux.tar.gz | tar zxf - --strip-components 1 -C /app/code/mas
|
||||||
|
ENV PATH=$PATH:/app/code/mas
|
||||||
|
|
||||||
RUN chown -R cloudron.cloudron /app/code
|
RUN ln -sf /app/data/index.html /app/code/env/lib/python3.12/site-packages/synapse/static/index.html
|
||||||
|
|
||||||
|
# Add supervisor configs
|
||||||
|
COPY supervisor/* /etc/supervisor/conf.d/
|
||||||
|
RUN ln -sf /run/synapse/supervisord.log /var/log/supervisor/supervisord.log
|
||||||
|
|
||||||
|
RUN chown -R cloudron:cloudron /app/code
|
||||||
|
|
||||||
ADD index.html homeserver.yaml.template start.sh /app/pkg/
|
ADD index.html homeserver.yaml.template start.sh /app/pkg/
|
||||||
|
|
||||||
|
|||||||
142
start.sh
142
start.sh
@@ -2,7 +2,95 @@
|
|||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
mkdir -p /app/data/data /app/data/configs /run/synapse
|
mkdir -p /app/data/data /app/data/configs/policies /run/synapse
|
||||||
|
|
||||||
|
source /app/code/env/bin/activate
|
||||||
|
|
||||||
|
mas_client_id="0000000000000000000SYNAPSE"
|
||||||
|
cloudron_client_id="000000000000000000C10WDR0N" # a valid ULID excludes I, L, O, and U
|
||||||
|
mas_client_secret=$(openssl rand -hex 32)
|
||||||
|
matrix_secret=$(openssl rand -hex 32)
|
||||||
|
|
||||||
|
function mas_config() {
|
||||||
|
export MAS_CONFIG=/run/synapse/mas-config.yaml
|
||||||
|
|
||||||
|
echo "MAS configuration"
|
||||||
|
if [[ ! -f /app/data/configs/mas.yaml ]]; then
|
||||||
|
mas-cli config generate > /app/data/configs/mas.yaml
|
||||||
|
|
||||||
|
yq eval -i ".email.from=\"${CLOUDRON_MAIL_FROM_DISPLAY_NAME:-Matrix} <${CLOUDRON_MAIL_FROM}>\"" /app/data/configs/mas.yaml
|
||||||
|
yq eval -i ".email.reply_to=\"${CLOUDRON_MAIL_FROM_DISPLAY_NAME:-Matrix} <${CLOUDRON_MAIL_FROM}>\"" /app/data/configs/mas.yaml
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat /app/data/configs/mas.yaml > ${MAS_CONFIG}
|
||||||
|
|
||||||
|
# http
|
||||||
|
yq eval -i ".http.public_base=\"https://${MAS_DOMAIN}\"" ${MAS_CONFIG}
|
||||||
|
|
||||||
|
# database
|
||||||
|
yq eval -i ".database.uri=\"${CLOUDRON_POSTGRESQL_URL}\"" ${MAS_CONFIG}
|
||||||
|
# yq eval -i ".database.user=\"${CLOUDRON_POSTGRESQL_USERNAME}\"" ${MAS_CONFIG}
|
||||||
|
# yq eval -i ".database.password=\"${CLOUDRON_POSTGRESQL_PASSWORD}\"" ${MAS_CONFIG}
|
||||||
|
# yq eval -i ".database.database=\"${CLOUDRON_POSTGRESQL_DATABASE}\"" ${MAS_CONFIG}
|
||||||
|
# yq eval -i ".database.host=\"${CLOUDRON_POSTGRESQL_HOST}\"" ${MAS_CONFIG}
|
||||||
|
# yq eval -i ".database.port=${CLOUDRON_POSTGRESQL_PORT}" ${MAS_CONFIG}
|
||||||
|
|
||||||
|
# email
|
||||||
|
yq eval -i ".email.transport=\"smtp\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".email.mode=\"plain\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".email.hostname=\"${CLOUDRON_MAIL_SMTP_SERVER}\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".email.port=${CLOUDRON_MAIL_SMTP_PORT}" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".email.username=\"${CLOUDRON_MAIL_SMTP_USERNAME}\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".email.password=\"${CLOUDRON_MAIL_SMTP_PASSWORD}\"" ${MAS_CONFIG}
|
||||||
|
|
||||||
|
# provision client for the homeserver
|
||||||
|
yq eval -i ".clients[0].client_id=\"${mas_client_id}\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".clients[0].client_auth_method=\"client_secret_basic\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".clients[0].client_secret=\"${mas_client_secret}\"" ${MAS_CONFIG}
|
||||||
|
|
||||||
|
# connection to the homeserver
|
||||||
|
yq eval -i ".matrix.homeserver=\"localhost:8008\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".matrix.secret=\"${matrix_secret}\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".matrix.endpoint=\"http://localhost:8008\"" ${MAS_CONFIG}
|
||||||
|
|
||||||
|
# setup cloudron OIDC as upstrem SSO provider
|
||||||
|
if [[ -n "${CLOUDRON_OIDC_ISSUER:-}" ]]; then
|
||||||
|
yq eval -i ".upstream_oauth2.providers[0].id=\"${cloudron_client_id}\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".upstream_oauth2.providers[0].human_name=\"${CLOUDRON_OIDC_PROVIDER_NAME:-Cloudron}\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".upstream_oauth2.providers[0].issuer=\"${CLOUDRON_OIDC_ISSUER}\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".upstream_oauth2.providers[0].client_id=\"${CLOUDRON_OIDC_CLIENT_ID}\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".upstream_oauth2.providers[0].client_secret=\"${CLOUDRON_OIDC_CLIENT_SECRET}\"" ${MAS_CONFIG}
|
||||||
|
|
||||||
|
yq eval -i ".upstream_oauth2.providers[0].scope=\"openid, email, profile\"" ${MAS_CONFIG}
|
||||||
|
|
||||||
|
# How the provider configuration and endpoints should be discovered
|
||||||
|
# Possible values are:
|
||||||
|
# - `oidc`: discover the provider through OIDC discovery,
|
||||||
|
# with strict metadata validation (default)
|
||||||
|
# - `insecure`: discover through OIDC discovery, but skip metadata validation
|
||||||
|
# - `disabled`: don't discover the provider and use the endpoints below
|
||||||
|
yq eval -i ".upstream_oauth2.providers[0].discovery_mode=\"oidc\"" ${MAS_CONFIG}
|
||||||
|
|
||||||
|
yq eval -i ".upstream_oauth2.providers[0].authorization_endpoint=\"${CLOUDRON_OIDC_AUTH_ENDPOINT}\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".upstream_oauth2.providers[0].token_endpoint=\"${CLOUDRON_OIDC_TOKEN_ENDPOINT}\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".upstream_oauth2.providers[0].userinfo_endpoint=\"${CLOUDRON_OIDC_PROFILE_ENDPOINT}\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".upstream_oauth2.providers[0].jwks_uri=\"${CLOUDRON_OIDC_KEYS_ENDPOINT}\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".upstream_oauth2.providers[0].token_endpoint_auth_method=\"client_secret_post\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".upstream_oauth2.providers[0].response_mode=\"query\"" ${MAS_CONFIG}
|
||||||
|
|
||||||
|
yq eval -i ".claims_imports.subject.template=\"{{ user.sub }}\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".claims_imports.localpart.action=\"force\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".claims_imports.localpart.template=\"{{ user.preferred_username }}\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".claims_imports.displayname.action=\"suggest\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".claims_imports.displayname.template=\"{{ user.name }}\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".claims_imports.email.action=\"suggest\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".claims_imports.email.template=\"{{ user.email }}\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".claims_imports.set_email_verification=\"import\"" ${MAS_CONFIG}
|
||||||
|
yq eval -i ".claims_imports.account_name.template=\"@{{ user.preferred_username }}\"" ${MAS_CONFIG}
|
||||||
|
fi
|
||||||
|
|
||||||
|
mas-cli -c ${MAS_CONFIG} database migrate
|
||||||
|
}
|
||||||
|
|
||||||
if [[ ! -f /app/data/configs/homeserver.yaml ]]; then
|
if [[ ! -f /app/data/configs/homeserver.yaml ]]; then
|
||||||
echo "==> Detected first run"
|
echo "==> Detected first run"
|
||||||
@@ -43,6 +131,7 @@ if [[ ! -f /app/data/configs/homeserver.yaml ]]; then
|
|||||||
yq eval -i ".password_config.pepper=\"$(pwgen -1s 12)\"" /app/data/configs/homeserver.yaml # always set this so that users can enable password login if needed
|
yq eval -i ".password_config.pepper=\"$(pwgen -1s 12)\"" /app/data/configs/homeserver.yaml # always set this so that users can enable password login if needed
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo "==> Ensure we log to console"
|
echo "==> Ensure we log to console"
|
||||||
yq eval -i ".root.handlers=[\"console\"]" /app/data/configs/log.config
|
yq eval -i ".root.handlers=[\"console\"]" /app/data/configs/log.config
|
||||||
yq eval -i ".loggers.twisted.handlers=[\"console\"]" /app/data/configs/log.config
|
yq eval -i ".loggers.twisted.handlers=[\"console\"]" /app/data/configs/log.config
|
||||||
@@ -68,22 +157,23 @@ yq eval -i ".email.notif_from=\"${CLOUDRON_MAIL_FROM_DISPLAY_NAME:-Matrix} <${CL
|
|||||||
# oidc
|
# oidc
|
||||||
if [[ -n "${CLOUDRON_OIDC_ISSUER:-}" ]]; then
|
if [[ -n "${CLOUDRON_OIDC_ISSUER:-}" ]]; then
|
||||||
yq eval -i "del(.password_providers)" /app/data/configs/homeserver.yaml # remove old ldap config
|
yq eval -i "del(.password_providers)" /app/data/configs/homeserver.yaml # remove old ldap config
|
||||||
echo " ==> Configuring OIDC auth"
|
yq eval -i "del(.oidc_providers[0])" /app/data/configs/homeserver.yaml # remove old oidc config
|
||||||
yq eval -i ".oidc_providers[0].idp_id=\"cloudron\"" /app/data/configs/homeserver.yaml
|
# echo " ==> Configuring OIDC auth"
|
||||||
yq eval -i ".oidc_providers[0].idp_name=\"${CLOUDRON_OIDC_PROVIDER_NAME:-Cloudron}\"" /app/data/configs/homeserver.yaml
|
# yq eval -i ".oidc_providers[0].idp_id=\"cloudron\"" /app/data/configs/homeserver.yaml
|
||||||
yq eval -i ".oidc_providers[0].issuer=\"${CLOUDRON_OIDC_ISSUER}\"" /app/data/configs/homeserver.yaml
|
# yq eval -i ".oidc_providers[0].idp_name=\"${CLOUDRON_OIDC_PROVIDER_NAME:-Cloudron}\"" /app/data/configs/homeserver.yaml
|
||||||
yq eval -i ".oidc_providers[0].client_id=\"${CLOUDRON_OIDC_CLIENT_ID}\"" /app/data/configs/homeserver.yaml
|
# yq eval -i ".oidc_providers[0].issuer=\"${CLOUDRON_OIDC_ISSUER}\"" /app/data/configs/homeserver.yaml
|
||||||
yq eval -i ".oidc_providers[0].client_secret=\"${CLOUDRON_OIDC_CLIENT_SECRET}\"" /app/data/configs/homeserver.yaml
|
# yq eval -i ".oidc_providers[0].client_id=\"${CLOUDRON_OIDC_CLIENT_ID}\"" /app/data/configs/homeserver.yaml
|
||||||
|
# yq eval -i ".oidc_providers[0].client_secret=\"${CLOUDRON_OIDC_CLIENT_SECRET}\"" /app/data/configs/homeserver.yaml
|
||||||
yq eval -i ".oidc_providers[0].scopes=[\"openid\", \"email\", \"profile\"]" /app/data/configs/homeserver.yaml
|
#
|
||||||
yq eval -i ".oidc_providers[0].authorization_endpoint=\"${CLOUDRON_OIDC_AUTH_ENDPOINT}\"" /app/data/configs/homeserver.yaml
|
# yq eval -i ".oidc_providers[0].scopes=[\"openid\", \"email\", \"profile\"]" /app/data/configs/homeserver.yaml
|
||||||
yq eval -i ".oidc_providers[0].token_endpoint=\"${CLOUDRON_OIDC_TOKEN_ENDPOINT}\"" /app/data/configs/homeserver.yaml
|
# yq eval -i ".oidc_providers[0].authorization_endpoint=\"${CLOUDRON_OIDC_AUTH_ENDPOINT}\"" /app/data/configs/homeserver.yaml
|
||||||
yq eval -i ".oidc_providers[0].userinfo_endpoint=\"${CLOUDRON_OIDC_PROFILE_ENDPOINT}\"" /app/data/configs/homeserver.yaml
|
# yq eval -i ".oidc_providers[0].token_endpoint=\"${CLOUDRON_OIDC_TOKEN_ENDPOINT}\"" /app/data/configs/homeserver.yaml
|
||||||
# https://s3lph.me/ldap-to-oidc-migration-3-matrix.html
|
# yq eval -i ".oidc_providers[0].userinfo_endpoint=\"${CLOUDRON_OIDC_PROFILE_ENDPOINT}\"" /app/data/configs/homeserver.yaml
|
||||||
yq eval -i ".oidc_providers[0].allow_existing_users=true" /app/data/configs/homeserver.yaml
|
# # https://s3lph.me/ldap-to-oidc-migration-3-matrix.html
|
||||||
yq eval -i ".oidc_providers[0].skip_verification=true" /app/data/configs/homeserver.yaml
|
# yq eval -i ".oidc_providers[0].allow_existing_users=true" /app/data/configs/homeserver.yaml
|
||||||
yq eval -i ".oidc_providers[0].user_mapping_provider.config.localpart_template=\"{{ user.sub }}\"" /app/data/configs/homeserver.yaml
|
# yq eval -i ".oidc_providers[0].skip_verification=true" /app/data/configs/homeserver.yaml
|
||||||
yq eval -i ".oidc_providers[0].user_mapping_provider.config.display_name_template=\"{{ user.name }}\"" /app/data/configs/homeserver.yaml
|
# yq eval -i ".oidc_providers[0].user_mapping_provider.config.localpart_template=\"{{ user.sub }}\"" /app/data/configs/homeserver.yaml
|
||||||
|
# yq eval -i ".oidc_providers[0].user_mapping_provider.config.display_name_template=\"{{ user.name }}\"" /app/data/configs/homeserver.yaml
|
||||||
else
|
else
|
||||||
yq eval -i ".password_config.localdb_enabled=true" /app/data/configs/homeserver.yaml
|
yq eval -i ".password_config.localdb_enabled=true" /app/data/configs/homeserver.yaml
|
||||||
# just setting enabled to false is not enough. see https://github.com/matrix-org/matrix-synapse-ldap3/issues/123
|
# just setting enabled to false is not enough. see https://github.com/matrix-org/matrix-synapse-ldap3/issues/123
|
||||||
@@ -98,9 +188,23 @@ if [[ -n "${CLOUDRON_TURN_SERVER:-}" ]]; then
|
|||||||
yq eval -i ".turn_shared_secret=\"${CLOUDRON_TURN_SECRET}\"" /app/data/configs/homeserver.yaml
|
yq eval -i ".turn_shared_secret=\"${CLOUDRON_TURN_SECRET}\"" /app/data/configs/homeserver.yaml
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
mas_config
|
||||||
|
|
||||||
|
# Configure the homeserver to delegate authentication to the MAS
|
||||||
|
# https://element-hq.github.io/matrix-authentication-service/setup/homeserver.html#configure-the-homeserver-to-delegate-authentication-to-the-service
|
||||||
|
yq eval -i ".experimental_features.msc3861.enabled=true" /app/data/configs/homeserver.yaml
|
||||||
|
yq eval -i ".experimental_features.msc3861.issuer=\"http://localhost:8080/\"" /app/data/configs/homeserver.yaml
|
||||||
|
yq eval -i ".experimental_features.msc3861.client_id=\"${mas_client_id}\"" /app/data/configs/homeserver.yaml
|
||||||
|
yq eval -i ".experimental_features.msc3861.client_auth_method=\"client_secret_basic\"" /app/data/configs/homeserver.yaml
|
||||||
|
# Matches the `client_secret` in the auth service config
|
||||||
|
yq eval -i ".experimental_features.msc3861.client_secret=\"${mas_client_secret}\"" /app/data/configs/homeserver.yaml
|
||||||
|
# Matches the `matrix.secret` in the auth service config
|
||||||
|
yq eval -i ".experimental_features.msc3861.admin_token=\"${matrix_secret}\"" /app/data/configs/homeserver.yaml
|
||||||
|
|
||||||
# fix permissions
|
# fix permissions
|
||||||
echo "==> Fixing permissions"
|
echo "==> Fixing permissions"
|
||||||
chown -R cloudron.cloudron /app/data /run/synapse
|
chown -R cloudron:cloudron /app/data /run/synapse
|
||||||
|
|
||||||
echo "==> Starting synapse"
|
echo "==> Starting synapse"
|
||||||
gosu cloudron:cloudron python3 -m synapse.app.homeserver --config-path /app/data/configs/homeserver.yaml -n
|
#exec gosu cloudron:cloudron python3 -m synapse.app.homeserver --config-path /app/data/configs/homeserver.yaml -n
|
||||||
|
exec /usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf --nodaemon -i Synapse
|
||||||
|
|||||||
11
supervisor/homeserver.conf
Normal file
11
supervisor/homeserver.conf
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[program:homeserver]
|
||||||
|
priority=10
|
||||||
|
user=cloudron
|
||||||
|
directory=/app/code
|
||||||
|
command=bash -c "source /app/code/env/bin/activate && python3 -m synapse.app.homeserver --config-path /app/data/configs/homeserver.yaml -n"
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
11
supervisor/mas.conf
Normal file
11
supervisor/mas.conf
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[program:mas]
|
||||||
|
priority=12
|
||||||
|
directory=/app/code/mas
|
||||||
|
user=cloudron
|
||||||
|
command=mas-cli -c /run/synapse/mas-config.yaml server
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
16
test/package-lock.json
generated
16
test/package-lock.json
generated
@@ -9,10 +9,10 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chromedriver": "^134.0.2",
|
"chromedriver": "^135.0.0",
|
||||||
"expect.js": "^0.3.1",
|
"expect.js": "^0.3.1",
|
||||||
"mocha": "^11.1.0",
|
"mocha": "^11.1.0",
|
||||||
"selenium-webdriver": "^4.29.0"
|
"selenium-webdriver": "^4.31.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@bazel/runfiles": {
|
"node_modules/@bazel/runfiles": {
|
||||||
@@ -301,9 +301,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/chromedriver": {
|
"node_modules/chromedriver": {
|
||||||
"version": "134.0.2",
|
"version": "135.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-134.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-135.0.0.tgz",
|
||||||
"integrity": "sha512-r1yIHP0Lo61CdFGjZXITSY2ZGYBS5B/qwOs8NMm0r31qnyS4MAuSmMiIiZKhu+ThxfcT8zPrGPGT6RmM0LWljQ==",
|
"integrity": "sha512-ilE3cIrIieiRU/a6MNpt0CL0UZs2tu0lQAes+el5SV03MB1zYIEXy+dDeueid/g8AmT1loy7TB2fjWwcHLY8lg==",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -1451,9 +1451,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/selenium-webdriver": {
|
"node_modules/selenium-webdriver": {
|
||||||
"version": "4.29.0",
|
"version": "4.31.0",
|
||||||
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.29.0.tgz",
|
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.31.0.tgz",
|
||||||
"integrity": "sha512-8XPGtDoji5xk7ZUCzFT1rqHmCp67DCzESsttId7DzmrJmlTRmRLF6X918rbwclcH89amcBNM4zB3lVPj404I0g==",
|
"integrity": "sha512-0MWEwypM0+c1NnZ87UEMxZdwphKoaK2UJ2qXzKWrJiM0gazFjgNVimxlHTOO90G2cOhphZqwpqSCJy62NTEzyA==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "github",
|
"type": "github",
|
||||||
|
|||||||
@@ -9,9 +9,9 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chromedriver": "^134.0.2",
|
"chromedriver": "^135.0.0",
|
||||||
"expect.js": "^0.3.1",
|
"expect.js": "^0.3.1",
|
||||||
"mocha": "^11.1.0",
|
"mocha": "^11.1.0",
|
||||||
"selenium-webdriver": "^4.29.0"
|
"selenium-webdriver": "^4.31.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user