1


443ポート、自己署名証明書、およびキーストアを介してSSLを使用するように構成されたJBoss 7.1 JBossにデプロイされた単純なJava webapp(SSO-server)があります

 <connector name="https" protocol="HTTP/1.1" scheme="https" socket-binding="https" secure="true">
            <ssl name="https" password="12345678" certificate-key-file="../standalone/configuration/sso.keystore"/>
 </connector>
   ...
 <socket-binding name="https" port="443"/>

すべて正常に動作し、使用してサーブレットにアクセスできます(「sso-service/auth」マッピングを使用)

「https://localhost/sso-service/auth」

しかし今、私は自分のアプリを OSGi バンドル (serviseApi、serviseImpl、web) に分けています。

サーブレットを登録するには、「org.osgi.service.http.HttpService」を使用します

httpService = (HttpService) context.getService(context
    .getServiceReference(HttpService.class.getName()));

AuthenticationServlet authServlet = new AuthenticationServlet();

httpService.registerServlet(SSO_AUTH_URL, authServlet, null, null);

また、この構成を JBoss standalone.xml に追加します。

<socket-binding name="osgi-http" interface="management" port="8080"/>

すべてのバンドルをデプロイすると、サーブレットから http 経由で応答が返されます

「http://localhost:8080/sso-service/auth」

しかし、「https://localhost:443/sso-service/auth」を試すと、selfsignet sert を受け取りましたが、サーブレットから unsver がありません。私が理解しているように、サーブレットは「osgi-http」- 8080 ポートでのみ実行されます

では、このバンドルへの https アクセスを取得できますか?

4

0 に答える 0