2017-06-15 4 views
0

Wildfly 10/JBoss 7 EAPサーバーへのリモートEJB呼び出しを実行しようとしていますが、Wildflyサーバーで無効なユーザーエラーメッセージが表示され続けます(私のEJBはLoginManagerです) :Wildfly 10へのリモートEJB呼び出しによる認証に問題があります

23:04:02,872 ERROR [org.jboss.as.ejb3.invocation] (default task-6) WFLYEJB0034: EJB Invocation failed on component LoginManager for method public abstract java.lang.String ejbs.LoginManagerRemote.echo(java.lang.String): javax.ejb.EJBAccessException: WFLYSEC0027: Invalid User 
    at org.jboss.as.ejb3.security.SecurityContextInterceptor$1.run(SecurityContextInterceptor.java:69) 
    at org.jboss.as.ejb3.security.SecurityContextInterceptor$1.run(SecurityContextInterceptor.java:49) 
    at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:97) 

私はadd-user.sh/batスクリプトを使用してapplication-users.propertiesファイルに自分のユーザーを追加しました。

私はライン54上SecurityContextInterceptorクラスでWildflyサーバー自体にブレークポイントを入れてと元本がnullであることを確認しようとしました:私はこのrunAsまたはrunAsPrincipalがある場合は、完全にはわからない

   if (holder.skipAuthentication == false) { 
        holder.securityManager.authenticate(holder.runAs, holder.runAsPrincipal, holder.extraRoles); 

リモートEJB呼び出しによって渡されたプリンシパル/クレデンシャルが、私の問題を引き起こしている可能性があります。

私のようにリモートEJBを呼んでいる:として私jboss-ejb-client.propertiesで

Properties p = new Properties(); 
    p.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming"); 

    final Context context = new InitialContext(p); 
    LoginManagerRemote ejb = (LoginManagerRemote) context.lookup("ejb:ear-1.0/ejbs-1.0//LoginManager!ejbs.LoginManagerRemote"); 

    return ejb.echo("test"); 

remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false 

remote.connections=default 

remote.connection.default.host=localhost 
remote.connection.default.port=8080 
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false 
remote.conncetion.default.connect.options.org.xnio.Options.SASL_DISALLOWED_MECHANISMS=JBOSS-LOCAL-USER 
remote.connection.default.username=test 
remote.connection.default.password=test 

私が何か間違ったことをやっていますか?どこか明白な何かが欠けていますか?リモートEJBを正常に呼び出すには何が必要ですか?あなたのjboss-ejb-client.propertiesにタイプミス

remote.conncetion.default.connect.options.org.xnio.Options.SASL_DISALLOWED_MECHANISMSがあります

答えて

0

= JBOSS-LOCAL-USER

はリモートであるべき.connection.default.connect.optionsなど

関連する問題