I wonder is fomebody can tell me what I have wrong...
I'm deploying a ear containing multiple wars - some of which (e.g CalDAV) require BASIC auth and others FORM. This works fine in Wildfly 17.
Trying to set up 21.0.0 I've followed a bunch of examples but BASIC auth is not available. The error message I see on startup is
"jboss.deployment.subunit.\"bw-cal-3.13.3-SNAPSHOT.ear\".\"bw-calendar-engine-userws-3.13.3-SNAPSHOT.war\".undertow-deployment" => "java.lang.RuntimeException: java.lang.IllegalStateException: The required mechanism 'BASIC' is not available in mechanisms [FORM] from the HttpAuthenticationFactory.
My config contains:
<ldap-realm name="bedeworkRealm" dir-context="bedeworkLdapConnection">
<identity-mapping rdn-identifier="uid" search-base-dn="ou=accounts,dc=bedework,dc=org">
<attribute-mapping>
<attribute from="uid" to="Roles" filter="(uniqueMember={1})" filter-base-dn="ou=groups,dc=bedework,dc=org"/>
</attribute-mapping>
</identity-mapping>
</ldap-realm>
...
<http-authentication-factory name="bedeworkAuth" security-domain="bedeworkSD" http-server-mechanism-factory="global">
<mechanism-configuration>
<mechanism mechanism-name="BASIC">
<mechanism-realm realm-name="bedework"/>
</mechanism>
<mechanism mechanism-name="FORM"/>
</mechanism-configuration>
</http-authentication-factory>
<provider-http-server-mechanism-factory name="global"/>
</http>
...
<subsystem xmlns="urn:jboss:domain:undertow:11.0" default-server="default-server" default-virtual-host="default-host" default-servlet-container="default" statistics-enabled="${wildfly.undertow.statistics-enabled:${wildfly.statistics-enabled:false}}">
...
<application-security-domains>
<application-security-domain name="other" security-domain="ApplicationDomain"/>
<application-security-domain name="bedework" http-authentication-factory="bedeworkAuth"/>
</application-security-domains>
</subsystem>
If I look at this with the cli I get this:
ls subsystem=elytron/http-authentication-factory=bedeworkAuth
available-mechanisms=["FORM"]
http-server-mechanism-factory=global
mechanism-configurations=[{"mechanism-name" => "BASIC","mechanism-realm-configurations" => [{"realm-name" => "bedework"}]},{"mechanism-name" => "FORM"}]
security-domain=bedeworkSD
Sure enough - FORM is there but no BASIC
I tried configuring a new one with just BASIC with the following result:
/subsystem=elytron/http-authentication-factory=bedeworkAuthentication:add(\
> http-server-mechanism-factory=global,\
> security-domain=bedeworkSD,\
> mechanism-configurations=[{mechanism-name=BASIC,mechanism-realm-configurations=[{realm-name=bedework}]}])
{"outcome" => "success"}
ls subsystem=elytron/http-authentication-factory=bedeworkAuthentication
available-mechanisms=undefined
http-server-mechanism-factory=global
mechanism-configurations=[{"mechanism-name" => "BASIC","mechanism-realm-configurations" => [{"realm-name" => "bedework"}]}]
security-domain=bedeworkSD
There are apparently no server mechanisms