Confluence 5.6 のサポートは終了しています。
ドキュメントの最新バージョンを確認してください。
このページは Confluence 自体ではなく、SSL の設定について記述しています。アトラシアンはこの構成による Confluence をサポートしていますが、SSL によって問題をデバッグできると保証することはできません。この資料は情報提供のみを目的としているため、自己責任で使用されるようご注意ください。
このドキュメントでは、Confluence へ/からの転送中に、Confluence ログインおよびデータが暗号化されるように、Confluence を設定して HTTPS でのアクセスを有効する方法を示します。SSL 暗号化は、Confluence データやユーザーログインが、部外者から傍受されたり読まれたりするのを防ぐ優れた方法です。
ここでは以下のプラットフォームについて説明します。
keytool utility used in the instructions below. The JRE is not enough. If you are using JDK 1.6 or older, please refer to the Java SE documentation to see the differences in the keytool utility from your JDK to JDK 1.7. The default connector port for Confluence is 8090, while a plain Tomcat installation (used for EAR / WAR distribution) will default to 8080.
You will need a valid SSL certificate before you can enable HTTPS. If you already have a certificate prepared, skip to step 2 below.
自己署名証明書を作成するか、認証局(CA、証明機関とも呼ばれます)によって発行された証明証を使用するかを選択することができます。以下で2つのオプションを説明しています。
暗号化が必要だが web サイトのリクエストの身元を確認する必要がない場合、自己署名証明書が役立ちます。一般的に、自己署名証明書はテスト環境や社内ネットワーク(イントラネット)で使用します。
証明書が認証局(CA)によって署名されていないため、ユーザーはサイトが信頼されていないというメッセージを受け取り、サイトにアクセスする前に、証明書を承認するいくつかのステップを実行する必要があります。これは通常、サイトに初めてアクセスする際に発生します。
Follow the steps below to generate a certificate using Java's keytool utility. This tool is included in the JDK.
Use Java's keytoolutility to generate the certificate:
Windows の場合、コマンド プロンプトで以下のコマンドを実行します。
"%JAVA_HOME%\bin\keytool" -genkeypair -alias tomcat -keyalg RSA
OSX または UNIX ベースのシステムの場合、コマンド プロンプトで以下のコマンドを実行します。
$JAVA_HOME/bin/keytool -genkeypair -alias tomcat -keyalg RSA
changeit" です。CN=confluence.example.com, OU=Java Software Division, O=Sun Microsystems Inc, C=USy' to confirm the details.tomcat' (the alias you entered in the keytool command above), press the 'Enter' key. This specifies that your keystore entry will have the same password as your private key. You MUST use the same password here as was used for the keystore password itself. This is a restriction of the Tomcat implementation.When running Confluence in a production environment, you will need a certificate issued by a certificate authority (CA, sometimes also called a 'certification authority') such as VeriSign, DigiCert or Thawte. The instructions below are adapted from the Tomcat documentation.
まず、ローカル証明書を作成し、その証明書に基づいて「証明書署名要求」(CSR)を作成します。CSR を選択した認証局に提出します。CA は証明書を生成するために、その CSR を使用します。
keytool utility to generate a local certificate, as described in the previous section.Use the keytool utility to generate a CSR, replacing the text <MY_KEYSTORE_FILENAME> with the path to and file name of the .keystorefile generated for your local certificate:
keytool -certreq -keyalg RSA -alias tomcat -file certreq.csr -keystore <MY_KEYSTORE_FILENAME>
certreq.csr to your chosen certificate authority. Refer to the documentation on the CA's website to find out how to do this.新しい証明書をローカルのキーストアにインポートします。
keytool -importcert -alias tomcat -keystore <MY_KEYSTORE_FILENAME> -file <MY_CERTIFICATE_FILENAME>
一部の CA では、証明書をインポートする前に、中間証明書をインストールする必要があることに注意してください。CA のドキュメントを参照し、証明書を正しくインストールします。
Verisign または GoDaddy を使用してエラーが発生した場合、秘密鍵とともに証明書を PKCS12 フォーマットへエクスポートする必要があります。
まず、上の手順で追加した証明書をキーストアから削除します。
keytool -delete -alias tomcat -keystore <MY_KEYSTORE_FILENAME>
PKCS12 フォーマットへエクスポートします。
openssl pkcs12 -export -in <MY_CERTIFICATE_NAME> -inkey <MY_PRIVATEKEY_NAME> -out <MY_PKC12_KEYSTORE_NAME> -name tomcat -CAfile <MY_ROOTCERTIFICATE_NAME-alsoCalledBundleCertificateInGoDaddy> -caname root
PKCS12 から jks へインポートします。
keytool -importkeystore -deststorepass <MY_DESTINATIONSTORE_PASSWORD> -destkeypass <MY_DESTINATIONKEY_PASSWORD> -destkeystore <MY_KEYSTORE_FILENAME> -srckeystore <MY_PKC12_KEYSTORE_NAME> -srcstoretype PKCS12 -srcstorepass <MY_PKC12_KEYSTORE_PASSWORD> -alias tomcat
CONFLUENCE-INSTALLATION}>/conf/server.xml.以下の行をコメント アウトします。
<Connector port="8443" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" SSLEnabled="true"
URIEncoding="UTF-8" keystorePass="<MY_CERTIFICATE_PASSWORD>"/>
MY_CERTIFICATE_PASSWORD> with the password you specified for your certificate.SSLEnabled="true" が Connector 要素の一部であることを確認します。この属性が存在しない場合、Confluence へのアクセス試行がタイム アウトします。Tomcat はデフォルトで、キーストア ファイルの名前が .keystore であることと、およびそのファイルが Tomcat を実行されているユーザーのホーム ディレクトリ (自身のホーム ディレクトリとは異なる可能性があります) にあることを想定しています。つまり、Tomcat はデフォルトでは以下の場所で SSL 証明書を探します。
C:\Documents and Settings\\#CURRENT_USER#\.keystore~/.keystore証明書をユーザー定義の場所に移動することができます。以下で説明するように、証明書をデフォルトの場所から移動させる場合、Tomcat が証明書を見つけることができるように、サーバー設定ファイルを更新する必要があります。
CONFLUENCE-INSTALLATION}>/conf/server.xmlkeystoreFile="<MY_CERTIFICATE_LOCATION>" 属性を Connector 要素に追加し、要素が次のようになるようにします。
<Connector port="8443" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" SSLEnabled="true"
URIEncoding="UTF-8" keystorePass="<MY_CERTIFICATE_PASSWORD>"
keystoreFile="<MY_CERTIFICATE_LOCATION>"/>
<MY_CERTIFICATE_LOCATION> を、.keystore ファイルの名前とパスを含む、証明書へのパスで置き換えます。https://<MY_BASE_URL>:8443/.Although HTTPS is now activated and available, the old HTTP URLs (http://localhost:8090) are still available. Now you need to redirect the URLs to their HTTPS equivalent. You will do this by adding a security constraint in web.xml. This will cause Tomcat to redirect requests that come in on a non-SSL port.
web.xml file. Skip the steps below and follow the steps on the RSS Feed Macro page instead.<CONFLUENCE_INSTALLATION>/confluence/WEB-INF/web.xml でファイルを編集します。以下の宣言を、ファイルの末尾の </web-app> タグの前に追加します。
<security-constraint>
<web-resource-collection>
<web-resource-name>Restricted URLs</web-resource-name>
<url-pattern>/</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
Confluence has two web.xml files. The other one is at
<CONFLUENCE_INSTALLATION>/conf/web.xml. Please only add the security constraints to <CONFLUENCE_INSTALLATION>/confluence/WEB-INF/web.xml, as described above.
keytool -genkeypair' command generates a key pair consisting of a public key and the associated private key, and stores them in a keystore. The command packages the public key into an X.509 v3 self-signed certificate, which is stored as a single-element certificate chain. This certificate chain and the private key are stored in a new keystore entry, identified by the alias that you specify in the command. The Java SE documentation has a good overview of the utility.redirectPort attribute of the standard HTTP connector to reflect the new SSL port. Tomcat needs this information to know which port to redirect to when an incoming request needs to be secure.Multiple instances on the same host: When running more than one instance on the same host, it is important to specify the address attribute in the <CONFLUENCE_INSTALLATION>/conf/server.xml file because by default the connector will listen on all available network interfaces, so specifying the address will prevent conflicts with connectors running on the same default port. See the Tomcat Connector documentation for more about setting the address attribute: http://tomcat.apache.org/tomcat-5.5-doc/config/http.html
<Connector port="8443" address="your.confluence.url.com" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" SSLEnabled="true"
URIEncoding="UTF-8" keystorePass="<MY_CERTIFICATE_PASSWORD>"
keystoreFile="<MY_CERTIFICATE_LOCATION>"/>
keytoolutility:-keyalg RSA option, as shown in the example of the keytool command above. The default is the SHA1 algorithm, which results in an error 'Internet Explorer cannot display the webpage' on IE7 on Vista.-sigalg MD5withRSA option. Otherwise, SHA1 will be used even if you specify the -keyalg RSA option. See this Atlassian blogpost for more information.Internet Explorer で添付ファイルをダウンロードできない問題: サイト全体に SSL を適用すると、IE で添付ファイルを適切にダウンロードできなくなる可能性があります。この問題を修正するには、<CONFLUENCE_INSTALLATION>/conf/server.xml を編集し、<Context ... /> 要素に次の内容を追加します。
<Valve className="org.apache.catalina.authenticator.NonLoginAuthenticator"
disableProxyCaching="true" securePagesWithPragma="false" />