0

Configure Wildfly-17 for LDAP Authentication failed to run with exception telling that properties tag not allowed under authentication which is not reasonable As the exception says that the only allowed tags under authentication are:


|                 jaas        local       truststore  
|                 kerberos    plug-in     users       
|                 ldap        ***properties***

I tried to refresh the server then restart it, but still get the same exception here is my standalone-full.xml configuration file:

<security-realm name="ManagementRealm">
                <authentication>
                    <local default-user="$local" skip-group-loading="true"/>
                    <ldap connection="EC2" base-dn="CN=Users,DC=mydc1,DC=mydc2,DC=org">
                        <username-filter attribute="sAMAccountName" />
                    </ldap>
                    <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>
                </authentication>
                <authorization map-groups-to-roles="false">
                    <properties path="mgmt-groups.properties" relative-to="jboss.server.config.dir"/>
                </authorization>
            </security-realm>

Here is the Exception message:

OPVDX001: Validation error in standalone-full.xml ------------------------------
|
|  50:         <username-filter attribute="sAMAccountName" />
|  51:     </ldap>
|  52:     <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>
|          ^^^^ 'properties' isn't an allowed element here
|               
|               Elements allowed here are: 
|                 jaas        local       truststore  
|                 kerberos    plug-in     users       
|                 ldap        properties  
|
|  53: </authentication>
|  54: <authorization map-groups-to-roles="false">
|  55:     <properties path="mgmt-groups.properties" relative-to="jboss.server.config.dir"/>
|
| 'properties' is allowed in elements: 
| - server > management > security-realms > security-realm > authentication
| - server > management > security-realms > security-realm > authentication > plug-in
| - server > management > security-realms > security-realm > authorization
| - server > management > security-realms > security-realm > authorization > plug-in
| - server > management > outbound-connections > ldap
4
  • Just in case, did you try to edit the file ensuring there is no special character left except \n and whitespaces between </ldap> and <properties path=..., same for the string 'prOOoperties' ;) Commented Jul 29, 2019 at 11:50
  • yes I ensure there is no special character not even any of white spaces Commented Jul 29, 2019 at 12:13
  • @EricLavault I will update my question including the configuration code Commented Jul 29, 2019 at 12:14
  • Try adding the properties element as the first entry. Generally speaking too it's best to use the management console or CLI to make changes as well. Commented Jul 29, 2019 at 18:52

1 Answer 1

0

putting the properties element first solve the problem

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.