Review stops a Synapse password provider next to MAS

The playbook fails when REST auth, Shared Secret Auth, LDAP auth or
Corporal (which turns on the first two) run while MAS does the logins,
and every Synapse preset has MAS. Review now lists it before deploying.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
vvvomitandClaude Opus 5.5 committed 2026-10-29 17:31:08 +03:30
1 parent c890ae78ff
commit 9898e89e4e
3 files changed
+21 -1

No files matched your search

+4
View File
@@ -311,6 +311,10 @@ func (c *Config) Missing() []string {
if !c.Enabled(comp) {
continue
}
// The playbook refuses Synapse's password providers once MAS does the logins.
if c.UsesMAS() && (comp.ID == "rest-auth" || comp.ID == "shared-secret-auth" || comp.ID == "ldap-auth" || comp.ID == "corporal") {
out = append(out, comp.Name+": doesn't work with MAS logins; untick one")
}
if h := c.Values[comp.HostVar()]; h != "" && !ValidHost(h) {
out = append(out, comp.Name+": address "+h+" isn't a hostname")
}
+16
View File
@@ -18,3 +18,19 @@ func TestMissingFlagsInvalidExtraYAML(t *testing.T) {
t.Fatalf("valid extra YAML reported: %v", m)
}
}
// The playbook fails on a Synapse password provider next to MAS.
func TestMissingFlagsPasswordProviderWithMAS(t *testing.T) {
c := Default()
c.Domain = "example.org"
c.Components = map[string]bool{"mas": true, "ldap-auth": true}
c.Values["matrix_synapse_ext_password_provider_ldap_uri"] = "ldap://ldap.example.org"
c.Values["matrix_synapse_ext_password_provider_ldap_base"] = "dc=example,dc=org"
if got := strings.Join(c.Missing(), "\n"); !strings.Contains(got, "doesn't work with MAS logins") {
t.Fatalf("LDAP next to MAS not reported: %q", got)
}
c.Components["mas"] = false
if m := c.Missing(); len(m) != 0 {
t.Fatalf("LDAP without MAS reported: %v", m)
}
}
+1 -1
View File
@@ -66,7 +66,7 @@ func TestShot(t *testing.T) {
for i, ids := range [][]string{
{"coturn", "exim", "ddclient"},
{"element", "cinny", "sable", "fluffychat"},
{"mas", "ketesa", "shared-secret-auth", "ldap-auth"},
{"uvs", "mas", "ketesa", "element-admin"},
{"s3-provider"},
{"double-puppet", "bridges-e2ee", "telegram", "whatsapp", "signal", "postmoogle"},
{"reminder-bot", "honoroit", "baibot", "draupnir"},