File based authentication challenge and SASL_DISALLOWED_MECHANISMS / JBOSS-LOCAL-USER on JBoss EAP 7 / 6
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 7
- 6.4
Issue
- File based authentication challenge and SASL_DISALLOWED_MECHANISMS / JBOSS-LOCAL-USER on JBoss EAP 7 / 6
Resolution
File based authentication challenge
Disabling the file based authentication challenge at the server level
/core-service=management/security-realm=ApplicationRealm/authentication=local:remove()
Or remove the <local ... line from the ApplicationRealm
<security-realm name="ApplicationRealm">
...
<authentication>
<local default-user="$local" allowed-users="*" skip-group-loading="true"/>
Disabling the file based authentication challenge at the client level
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY, "org.wildfly.naming.client.WildFlyInitialContextFactory");
p.put(Context.PROVIDER_URL, "remote+http://localhost:8080");
p.put("java.naming.factory.url.pkgs", "org.jboss.ejb.client.naming");
p.put(Context.SECURITY_PRINCIPAL, "ejbuser");
p.put(Context.SECURITY_CREDENTIALS, "redhat1!");
p.put("jboss.naming.client.connect.options.org.xnio.Options.SASL_DISALLOWED_MECHANISMS", "JBOSS-LOCAL-USER");
Related Solutions
Components
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.