j_security_check not supporting POST

382 views
Skip to first unread message

Henk de Vries

unread,
Mar 13, 2023, 12:33:40 PM3/13/23
to WildFly
I am trying to run an application that is working fine on Weblogic on Wildfly 26. I am expecting to be able to logon using our existing login.html, which performs a post against j_security_check, which I think is some kind of Java EE standard. However, I am unable to configure Wildfly in such a way as to accept POST requests to this endpoint. I always get an error: HTTP method POST is not supported by this URL. I am using a jdbc-realm which I have called jdbcrealm.

Below are what I think the relevant sections from my current config:

web.xml:
<login-config>
<auth-method>FORM</auth-method>
<realm-name>myappdomain</realm-name>
<form-login-config>
<form-login-page>/login.xhtml</form-login-page>
<form-error-page>/login.xhtml</form-error-page>
</form-login-config>
</login-config>

jboss--web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web xmlns="http://www.jboss.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
http://www.jboss.org/j2ee/schema/jboss-web_10_0.xsd"
version="10.0">
<security-domain>myappdomain</security-domain>
</jboss-web>


Snippets from standalone.xml:
                <security-domain name="mydomain" default-realm="jdbcrealm">
                    <realm name="jdbcrealm"/>
                </security-domain>

 <subsystem xmlns="urn:jboss:domain:ejb3:9.0">
          [cut]
            <default-security-domain value="myappdomain"/>
            <application-security-domains>
                <application-security-domain name="myappdomain" security-domain="mydomain"/>
            </application-security-domains>
            <default-missing-method-permissions-deny-access value="true"/>
            <statistics enabled="${wildfly.ejb3.statistics-enabled:${wildfly.statistics-enabled:false}}"/>
            <log-system-exceptions value="true"/>
        </subsystem>

            <http>
[cut]
                <http-authentication-factory name="http-db-auth" security-domain="mydomain" http-server-mechanism-factory="global">
                    <mechanism-configuration>
                        <mechanism mechanism-name="FORM"/>
                    </mechanism-configuration>
                </http-authentication-factory>
                <provider-http-server-mechanism-factory name="global"/>
            </http>

So far I have configured everything using the web interface,

Is anyone able to tell me what I am missing to get this working correctly? I have not been able to find out by reading the manual or using Google so far.







Henk de Vries

unread,
Mar 13, 2023, 5:08:51 PM3/13/23
to WildFly
Since posting this question originally I have been able to get this working. So please disregard my original question.
Reply all
Reply to author
Forward
0 new messages