defiant/matrix-synapse: Add keycloak oidc

This commit is contained in:
2024-06-12 14:48:16 +02:00
parent d74714095f
commit 158f0cb7ee
2 changed files with 25 additions and 3 deletions

View File

@@ -6,6 +6,12 @@
group = "matrix-synapse";
};
sops.secrets."matrix/synapse/oidcsecret" = {
restartUnits = [ "matrix-synapse.service" ];
owner = "matrix-synapse";
group = "matrix-synapse";
};
services.matrix-synapse-next = {
enable = true;
enableNginx = true;
@@ -69,6 +75,21 @@
tls_certificate_path = "/etc/ssl-snakeoil/matrix_feal_no.crt";
tls_private_key_path = "/etc/ssl-snakeoil/matrix_feal_no.key";
oidc_providers = [
{
idp_id = "keycloak";
idp_name = "Keycloak";
issuer = "https://iam.feal.no/realms/feal.no";
client_id = "matrix-synapse";
client_secret_path = config.sops.secrets."matrix/synapse/oidcsecret".path;
user_mapping_provicer.config = {
localpart_template = "{{ user.preferred_username }}";
display_name_template = "{{ user.name }}";
};
backchannel_logout_enabled = true;
enable_registration = false;
}
];
};
};