独自のSSL証明書を生成することができます
まず最初に自己署名証明書を作成する必要があります。これは、Javaに付属のkeytoolsアプリケーションを使用して行います。コマンドプロンプトを開き、次のコマンドを実行します。
C:\>keytool -genkey -alias tomcat -keyalg RSA -keystore C:\jboss-2.0.1.GA\server\default\conf\localhost.keystore
パスワードを変更すると、すべての場所でパスワードを使用するように指示されたら、Jboss confディレクトリのパスを変更する必要があります。
Enter keystore password: changeit
Re-enter new password: changeit
What is your first and last name?
[Unknown]: localhost
What is the name of your organizational unit?
[Unknown]:
What is the name of your organization?
[Unknown]:
What is the name of your City or Locality?
[Unknown]:
What is the name of your State or Province?
[Unknown]:
What is the two-letter country code for this unit?
[Unknown]: NZ
Is CN=localhost, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=NZ correct?
[no]: yes
Enter key password for
(RETURN if same as keystore password): changeit
Re-enter new password: changeit
Next up you need to configure tomcat to create a SSL connector.
Edit C:\jboss-2.0.1.GA\server\default\deploy\jboss-web.deployer\server.xml and find the commented out SSL connector example, uncomment it and tweak it as follows:
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="${jboss.server.home.dir}/conf/localhost.keystore"
keystorePass="changeit"
/>
最後に、あなたの新しいキーストアを使用するjavax.net.sslのライブラリーを得るためにあなたのJBoss起動コマンドに2つのシステムプロパティを追加します。それはあなたが最初の質問にはlocalhostに答えることが重要です。これらは、SSLコールを元に戻す必要がある場合にのみ必要です。私はすべて同じDEV JBossインスタンスで実行されているCASとCASで認証3つのアプリを持っていたので、私はそれらを必要と:
-Djavax.net.ssl.trustStore=C:\jboss-2.0.1.GA\server\default\conf\localhost.keystore
-Djavax.net.ssl.trustStorePassword=changeit
[OK]を、今お使いのブラウザは自己署名証明書について文句を言うだろうhttp://localhost:8443/
を参照します。ブラウザの指示に従ってこの証明書をセキュリティ例外として追加すると、再度プロンプトが表示されず、すべて完了します。
キーストロークファイルに強力なパスワードを使用することは重要ですか?これはローカルでの使用だけでなく、本稼働システムでも構成されます。 CAから購入した証明書を持っていれば、これらのステップがどのように変わるのでしょうか? – Teddy