【发布时间】:2015-02-17 18:25:55
【问题描述】:
我有一个应用程序客户端正在尝试使用远程 JNDI(http-remoting)协议连接到 WildFly 8.2 服务器。下面是我的 InitialContext 配置:
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
props.put(Context.PROVIDER_URL, "http-remoting://localhost:8080");
props.put(Context.SECURITY_PRINCIPAL, userName);
props.put(Context.SECURITY_CREDENTIALS, password);
props.put("jboss.naming.client.ejb.context", true);
context = new InitialContext(props);
WildFly 服务器配置为使用标准 ApplicationRealm。当我尝试进行身份验证时,我在客户端控制台中得到以下信息:
ERROR: JBREM000200: Remote connection failed: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed:
调试客户端连接代码后,我认为服务器发送 PLAIN 作为可接受的 SASL 机制,但我无法让客户端使用 PLAIN。
【问题讨论】: