-
Notifications
You must be signed in to change notification settings - Fork 13
Implement Synapse to MAS migration #454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
1c8e8ad
init syn2mas work
gaelgatelement 41d8aa0
add syn2mas manifests
gaelgatelement a011bbb
document how to use preMigrationSynapseHandlesAuth
gaelgatelement f5c5716
add syn2mas fixture
gaelgatelement 9a49719
mas: add readyToHandleAuth case
gaelgatelement bbc5d94
matrix-tools: add syn2mas capabilities
gaelgatelement 6c2c2dd
add syn2mas role binding
gaelgatelement 2e5dd41
syn2mas: pass templating
gaelgatelement 06782a3
validate syn2mas manifests
gaelgatelement 557ad69
pass manifests tests
gaelgatelement b0e1a37
run integration tests on syn2mas job
gaelgatelement 3421b68
run job but fail as DB is missing
gaelgatelement 1bc868f
synapse: only configure rendez vous if mas is ready to handle auth
gaelgatelement 30d3ed6
syn2mas values: configure password scheme
gaelgatelement 8f90a10
syn2mas job: dryRun as post-hook, actual run as pre-hook
gaelgatelement 438195d
dropme: build matrix tools in tests
gaelgatelement 4b9a19d
tests: verify that access tokens work after migration
gaelgatelement 5038143
matrix-tools: log more during upgrade
gaelgatelement d164e51
syn2mas: run the actual migration as a pre-upgrade hook and enable in…
gaelgatelement 64283cc
run MAS Syn2Mas test manifests
gaelgatelement 204a9fd
fix postgres labels
gaelgatelement 8d3746e
fix job indentation
gaelgatelement 9b0e9b5
fix python lint
gaelgatelement 9e61071
fix copyright dates
gaelgatelement db18391
add newsfragments
gaelgatelement 0e19a26
fix missing extraEnv in syn2mas
gaelgatelement d2cef8a
test syn2mas manifests without the ingress tests
gaelgatelement 6e82b92
test syn2mas in secrets
gaelgatelement c67ab6c
fix syn2mas job idempotency
gaelgatelement 6e80463
fix labels on syn2mas job
gaelgatelement e80b745
syn2mas job: enhance synapse & mas context usage
gaelgatelement e5dcc82
scripts lint
gaelgatelement 8ce0f85
syn2mas: use new render-config helpers
gaelgatelement 6e5edaf
fix tests
gaelgatelement 80cd5e9
fix synapse render-config overrides
gaelgatelement bd62299
index secret based on hash of their names
gaelgatelement 64f89b3
fix tests
gaelgatelement 719e060
Drop required image tag
gaelgatelement 14a1ace
rename syn2mas manifests
gaelgatelement 2e13b7d
mas: fix hook name
gaelgatelement fdfcd70
Add deployment markers for syn2mas
gaelgatelement 4b5c03c
tests: add a deploy_with_values_patch helper
gaelgatelement dab606a
add a helper to get dpeloyment marker
gaelgatelement 6fc4a04
update comment about hook weights in syn2mas
gaelgatelement 8b7c301
syn2mas job: fix worker name
gaelgatelement ffff805
Update syn2mas comment with marker description
gaelgatelement 72a11b5
syn2mas: enable ingress + read only mode
gaelgatelement 514e72b
syn2mas: check auth_metadata
gaelgatelement 6569b3b
add syn2mas docs
gaelgatelement 7640544
syn2mas: test that we can create a mas user after the migration
gaelgatelement af37111
syn2mas roles: only needed when actually migrating
gaelgatelement e4f78e1
syn2mas: use --reuse-values in docs
gaelgatelement a1dea02
syn2mas: make sure we cant migrate twice with the deployment markers
gaelgatelement d3c1474
matrix-tools: test syn2mas args
gaelgatelement 8715597
docs: mention synapse & mas password scheme configuration
gaelgatelement 36658e4
matrix-tools: update to 0.5.0
gaelgatelement File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
6 changes: 0 additions & 6 deletions
6
charts/matrix-stack/ci/fragments/matrix-authentication-service-auth-synapse.yaml
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
charts/matrix-stack/ci/fragments/matrix-authentication-service-migrated-password-scheme.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Copyright 2025 New Vector Ltd | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
matrixAuthenticationService: | ||
additional: | ||
password-scheme.yml: | ||
config: | | ||
passwords: | ||
schemes: | ||
- version: 1 | ||
algorithm: bcrypt | ||
- version: 2 | ||
algorithm: argon2id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
charts/matrix-stack/ci/fragments/matrix-authentication-service-syn2mas-dryrun.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright 2025 New Vector Ltd | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
matrixAuthenticationService: | ||
syn2mas: | ||
enabled: true | ||
dryRun: true | ||
|
||
additional: | ||
password-scheme.yml: | ||
config: | | ||
passwords: | ||
schemes: | ||
- version: 1 | ||
algorithm: bcrypt | ||
- version: 2 | ||
algorithm: argon2id |
18 changes: 18 additions & 0 deletions
18
charts/matrix-stack/ci/fragments/matrix-authentication-service-syn2mas-migrate.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright 2025 New Vector Ltd | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
matrixAuthenticationService: | ||
syn2mas: | ||
enabled: true | ||
dryRun: false | ||
|
||
additional: | ||
password-scheme.yml: | ||
config: | | ||
passwords: | ||
schemes: | ||
- version: 1 | ||
algorithm: bcrypt | ||
- version: 2 | ||
algorithm: argon2id |
22 changes: 0 additions & 22 deletions
22
charts/matrix-stack/ci/matrix-authentication-service-keep-auth-in-synapse-values.yaml
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
...k/ci/matrix-authentication-service-synapse-syn2mas-migrate-secrets-externally-values.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Copyright 2024-2025 New Vector Ltd | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-only | ||
# | ||
# source_fragments: matrix-authentication-service-minimal.yaml matrix-authentication-service-postgres.yaml matrix-authentication-service-postgres-secrets-externally.yaml matrix-authentication-service-secrets-externally.yaml synapse-minimal.yaml synapse-postgres.yaml synapse-postgres-secrets-externally.yaml synapse-secrets-externally.yaml matrix-authentication-service-syn2mas-dryrun.yaml matrix-authentication-service-syn2mas-migrate.yaml | ||
# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values | ||
|
||
# initSecrets, postgres don't have any required properties to be set and defaults to enabled | ||
elementWeb: | ||
enabled: false | ||
matrixAuthenticationService: | ||
additional: | ||
password-scheme.yml: | ||
config: | | ||
passwords: | ||
schemes: | ||
- version: 1 | ||
algorithm: bcrypt | ||
- version: 2 | ||
algorithm: argon2id | ||
encryptionSecret: | ||
secret: '{{ $.Release.Name }}-mas-external' | ||
secretKey: encryption | ||
ingress: | ||
host: mas.ess.localhost | ||
postgres: | ||
database: mas | ||
host: postgres | ||
password: | ||
secret: '{{ $.Release.Name }}-mas-external' | ||
secretKey: postgresPassword | ||
user: mas | ||
privateKeys: | ||
ecdsaPrime256v1: | ||
secret: '{{ $.Release.Name }}-mas-external' | ||
secretKey: keysEcdsaPrime256v1 | ||
ecdsaSecp256k1: | ||
secret: '{{ $.Release.Name }}-mas-external' | ||
secretKey: keysEcdsaSecp256k1 | ||
ecdsaSecp384r1: | ||
secret: '{{ $.Release.Name }}-mas-external' | ||
secretKey: keysEcdsaSecp384r1 | ||
rsa: | ||
secret: '{{ $.Release.Name }}-mas-external' | ||
secretKey: keysRSA | ||
syn2mas: | ||
dryRun: false | ||
enabled: true | ||
synapseOIDCClientSecret: | ||
secret: '{{ $.Release.Name }}-mas-external' | ||
secretKey: synapseOIDC | ||
synapseSharedSecret: | ||
secret: '{{ $.Release.Name }}-mas-external' | ||
secretKey: synapseShared | ||
matrixRTC: | ||
enabled: false | ||
serverName: ess.localhost | ||
synapse: | ||
appservices: | ||
- secret: '{{ $.Release.Name }}-synapse-external' | ||
secretKey: bridge_registration.yaml | ||
ingress: | ||
host: synapse.ess.localhost | ||
macaroon: | ||
secret: '{{ $.Release.Name }}-synapse-external' | ||
secretKey: macaroon | ||
postgres: | ||
database: synapse | ||
host: ess-postgres | ||
password: | ||
secret: '{{ $.Release.Name }}-synapse-external' | ||
secretKey: postgresPassword | ||
user: synapse_user | ||
registrationSharedSecret: | ||
secret: '{{ $.Release.Name }}-synapse-external' | ||
secretKey: registrationSharedSecret | ||
signingKey: | ||
secret: '{{ $.Release.Name }}-synapse-external' | ||
secretKey: signingKey | ||
wellKnownDelegation: | ||
enabled: false |
80 changes: 80 additions & 0 deletions
80
...tack/ci/matrix-authentication-service-synapse-syn2mas-migrate-secrets-in-helm-values.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Copyright 2024-2025 New Vector Ltd | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-only | ||
# | ||
# source_fragments: matrix-authentication-service-minimal.yaml matrix-authentication-service-postgres.yaml matrix-authentication-service-postgres-secrets-in-helm.yaml matrix-authentication-service-secrets-in-helm.yaml synapse-minimal.yaml synapse-postgres.yaml synapse-postgres-secrets-in-helm.yaml synapse-secrets-in-helm.yaml matrix-authentication-service-syn2mas-dryrun.yaml matrix-authentication-service-syn2mas-migrate.yaml | ||
# DO NOT EDIT DIRECTLY. Edit the fragment files to add / modify / remove values | ||
|
||
# initSecrets, postgres don't have any required properties to be set and defaults to enabled | ||
elementWeb: | ||
enabled: false | ||
matrixAuthenticationService: | ||
additional: | ||
password-scheme.yml: | ||
config: | | ||
passwords: | ||
schemes: | ||
- version: 1 | ||
algorithm: bcrypt | ||
- version: 2 | ||
algorithm: argon2id | ||
encryptionSecret: | ||
value: CHANGEME-ahohhohgiavee5Koh8ahwo | ||
ingress: | ||
host: mas.ess.localhost | ||
postgres: | ||
database: mas | ||
host: postgres | ||
password: | ||
value: CHANGEME-ooWo6jeidahhei3Hae0eer9U | ||
user: mas | ||
privateKeys: | ||
ecdsaPrime256v1: | ||
value: | | ||
-----BEGIN EC PRIVATE KEY----- | ||
MHcCAQEEIYjZ789034nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49 | ||
AwEHoUQDQgAE6521bYjZ789034nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49 | ||
AwEAAKBcZW5jb2duZXQwgggYMIINL6Ado018734nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49AwEH | ||
------END EC PRIVATE KEY----- | ||
ecdsaSecp256k1: | ||
value: | | ||
-----BEGIN EC PRIVATE KEY----- | ||
MHcCAQEEZFQZ789034nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49AwEHoUQDQgAE6521bYjZ789034nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49 | ||
------END EC PRIVATE KEY----- | ||
ecdsaSecp384r1: | ||
value: | | ||
-----BEGIN EC PRIVATE KEY----- | ||
MHcCAQEEZFQZ789034nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49AwEHoUQDQgAE6521bYjZ789034nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49 | ||
------END EC PRIVATE KEY----- | ||
rsa: | ||
value: | | ||
-----BEGIN RSA PRIVATE KEY----- | ||
MIIEowIBAAKCAQEA6521bYjZ789034nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49AwEHoUQDQgAE6521bYjZ789034nLz+oXJyVWqgUdDmRlKxvTfHsBhFtGpOaAoGCCqGSM49 | ||
------END RSA PRIVATE KEY----- | ||
syn2mas: | ||
dryRun: false | ||
enabled: true | ||
synapseOIDCClientSecret: | ||
value: CHANGEME-eiv6wae8shooPhie4ief8ru2egahbah0 | ||
synapseSharedSecret: | ||
value: CHANGEME-iaw8eeSef4zeefie8ii3akien9tiaYah | ||
matrixRTC: | ||
enabled: false | ||
serverName: ess.localhost | ||
synapse: | ||
ingress: | ||
host: synapse.ess.localhost | ||
macaroon: | ||
value: CHANGEME-eek3Eigoh8ux8laeTingeej1 | ||
postgres: | ||
database: synapse | ||
host: ess-postgres | ||
password: | ||
value: CHANGEME-ooWo6jeidahhei3Hae0eer9U | ||
user: synapse_user | ||
registrationSharedSecret: | ||
value: CHANGEME-ooWo6jeidahhei3Hae0eer9U | ||
signingKey: | ||
value: ed25519 0 bNQOzBUDszff7Ax81z6w0uZ1IPWoxYaazT7emaZEfpw | ||
wellKnownDelegation: | ||
enabled: false |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.