How to Restrict Access to Jira with Tomcat
プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。
このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
Atlassian provides limited support with Tomcat configurations. You'll want to ensure to test any suggestions before implementing into a production environment.
目的
Increased security, ensuring that Tomcat/Jira can only be reached by the appropriate addresses
環境
Jira Data Center
ソリューション
Tomcat provides multiple methods to allow control access, here are two of the possible options:
- Restricting which IP addresses that a defined connector port will listen on. http://tomcat.apache.org/tomcat-8.5-doc/config/http.html#Standard_Implementation
- Example: only allowing the host's loopback address (127.0.0.1) to connect to port 8080:
Modify the
Connector
withinserver.xml
:<Connector port="8080" protocol="HTTP/1.1" ... /> to <Connector address="127.0.0.1" port="8080" protocol="HTTP/1.1" ... />
- Tomcat を再起動します。
- Setting remote IP filters for addresses that will be allowed or denied: http://tomcat.apache.org/tomcat-8.5-doc/config/valve.html#Remote_Address_Valve
- Example: only allowing requests from the local address and from address with IP 192.168.1.1:
Modify
server.xml
and add:<Engine name="Catalina" defaultHost="localhost"> ... <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="127\.0\.0\.1|192\.168\.1\.1"/> ... </Engine>
Tomcat を再起動します。