-
Bug
-
Resolution: Done
-
Major
-
25.0.0.Beta1
-
None
It looks like there is a web based authentication enforced by default in current configuration of WildFly when I configure the 2way TLS authentication.
Maybe I'm missing something or understand things wrongly but here is what I do and what are my expectations:
1/ Take WildFly 25.0.0.Beta1 server and deploy an app there.
2/ Configure 2way TLS authentication (both server and client exchanges TLS certificates so both ends know that they are among the trustworth parties). Keep the default application-security-domain in Undertow as is.
3/ I can successfully connect to my app via HTTPS providing correct client certificate - no actual (extra?) authentication is required since I didn't specify anything more anywhere.
Actual server behavior:
After the 2way TLS authentication configuration is performed, then with the default application-security-domain configured in Undertow subsystem:
[standalone@localhost:9990 /] ls /subsystem=undertow/application-security-domain=other setting enable-jaspi=true integrated-jaspi=true referencing-deployments=["sessionCounter.war"] enable-jacc=false http-authentication-factory=undefined override-deployment-config=false security-domain=ApplicationDomain
I get 401 HTTP response from the server with www-authenticate header.
As I understand it, I'm requested by server to perform some authentication now. When I simply undefine the Undertow's application-security-domain element, everything starts to work as expected (2way TLS auth still in place in this case).
Same happens also, when I disable the need-client-auth in my server-ssl-context element. But this effectively disables the 2way TLS authentication I want. And also per description of this element, there should not be any connection with an actual application authentication:
"need-client-auth" => { "type" => BOOLEAN, "description" => "To require a client certificate on SSL handshake. Connection without trusted client certificate (see trust-manager) will be rejected.",
So, there is either something I'm missing here or there is some unwanted correlation between the `need-client-auth` attribute, which should affect only TLS configuration (per my understanding), and an actual application level authentication?
Documentation 4.3.2. Enable Two-way SSL/TLS in WildFly for Applications in https://docs.wildfly.org/24/WildFly_Elytron_Security.html#configure-ssltls didn't provide much help. But truth is that this is still for WildFly 24 release where the legacy security was still present and the default application-security-domain in Undertow was undefined.
- is caused by
-
ELYWEB-155 Don't override the deployment's authentication mechanisms when overrideDeploymentConfig is false and the loginConfig is null
- Resolved