Describe the bug
MAS installation fails when following config is used
To Reproduce
My vars.yml file looks like this:
matrix_authentication_service_enabled: true
matrix_authentication_service_migration_in_progress: true
matrix_synapse_oidc_enabled: true
The issue is the validation
|
- name: Fail if OpenID Connect is enabled for Synapse when auth is delegated to Matrix Authentication Service |
|
ansible.builtin.fail: |
|
msg: "When Synapse is delegating authentication to Matrix Authentication Service (`matrix_synapse_matrix_authentication_service_enabled: true`), it doesn't make sense to enable OpenID Connect (`matrix_synapse_oidc_enabled: true`), because it is not Synapse that is handling authentication. Synapse will refuse to start otherwise." |
|
when: matrix_synapse_matrix_authentication_service_enabled and matrix_synapse_oidc_enabled |
Expected behavior
The MAS installation should go through since it will not be activated because of matrix_authentication_service_migration_in_progress: true
Possible fix
validate_config.yml
- name: Fail if OpenID Connect is enabled for Synapse when auth is delegated to Matrix Authentication Service
ansible.builtin.fail:
msg: "When Synapse is delegating authentication to Matrix Authentication Service (`matrix_synapse_matrix_authentication_service_enabled: true`), it doesn't make sense to enable OpenID Connect (`matrix_synapse_oidc_enabled: true`), because it is not Synapse that is handling authentication. Synapse will refuse to start otherwise."
when: matrix_synapse_matrix_authentication_service_enabled and matrix_synapse_oidc_enabled and not matrix_authentication_service_migration_in_progress
homeserver.yaml.j2
{% if matrix_synapse_matrix_authentication_service_enabled and not matrix_authentication_service_migration_in_progress %}
matrix_authentication_service:
enabled: true
endpoint: {{ matrix_synapse_matrix_authentication_service_endpoint | to_json }}
secret: {{ matrix_synapse_matrix_authentication_service_secret | to_json }}
{% endif %}
Describe the bug
MAS installation fails when following config is used
To Reproduce
My
vars.ymlfile looks like this:The issue is the validation
matrix-docker-ansible-deploy/roles/custom/matrix-synapse/tasks/validate_config.yml
Lines 186 to 189 in 93e45e6
Expected behavior
The MAS installation should go through since it will not be activated because of
matrix_authentication_service_migration_in_progress: truePossible fix
validate_config.yml
homeserver.yaml.j2