Так-как Архива часто содержит строго конфиденциальную информацию, настоятельно рекомендуется защита доступа к веб-консоли c помощью HTTPS (HTTP / TLS).
Есть два способа настроить защищенный доступ к консоли:
- Управление сертификатами Архива - Используйте встроенные в Архива функции управления сертификатами (Enterprise Edition только)
- Используйте утилиты командной строки - Используйте встроенные в Java утилиты командной строки (Enterprise Edition и ISP Edition)
Управление сертификатами Архива
- Следуйте инструкциям в Сертификаты получите и установите сертификат сервера и соответствующие сертификаты CA.
- Запустите утилиту getkeystoresecret, как описано в Сертификаты. Запомните пароль хранилища ключей паролем.
- Измените файл server.xml расположен в [главный путь к приложению]\server\conf
a) Раскомментируйте строку:
b) измените значения поля keystorePass на значение полученное утилитой getkeystoresecret. Убедитесь в правильности ввода.
c) при желании, закомментируйте (небезопасные) соединение по умолчанию на порту 8090.
Отредактируйте web.xml расположенный в [главный путь к приложению]\server\webapps\ROOT\WEB-INF
Раскомментируйте строку:
Перезапустите сервис Архива server, он должен быть доступен по адресу https://you_server
Java утилиты командной строки
The commandline method below uses the keytool utility included in the embedded Java runtime. Assuming Архива is correctly installed, the Keytool utility is located in C:\Program Files\MailArchiva\jre64\bin or /opt/mailarchiva/jre64/bin.
Among other things, the keytool utility provides the ability to generate certificate requests and install certificates into a Java keystore file.
- Generate a new keystore
keytool -genkey -alias tomcat -keyalg RSA -keystore \path\to\my\keystore
- Generate a request:
keytool -certreq -keyalg RSA -alias tomcat -file certreq.csr -keystore - Send your request to your CertServ or any other reputable Certificate Authority.
- Save the chain in Base 64 format
- Export each certificate in Base 64 format
- Import the chain one certificate at a time, starting with root:
keytool -import -alias root -keystore -trustcacerts -file b. keytool -import -alias tomcat -keystore -trustcacerts -file - Setup the TLS connector in Архива's embedded Tomcat server's server.xml file. This server.xml file is located at C:\Program Files\MailArchiva\Server\conf\server.xml (Windows) or /opt/mailarchiva/server/conf/server.xml (Linux)
Edit the server.xml and uncomment the TLS Connector listening on port 443. Modify the connector to refer to the correct keystore location and password.
- To prevent insecure traffic, uncomment the port 80 connector in the server.xml file.
- If you wish traffic on port 80 to be automatically redirected to port 443, edit a file called web.xml in C:\Program Files\MailArchiva\Server\webapps\ROOT\WEB-INF\web.xml (Windows) or /opt/mailarchiva/server/webapps/ROOT/WEB-INF/web.xml (Linux) and add the following lines just before the closing </web-app> tag:
<web-resource-collection>
<web-resource-name>Protected Context</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
auth-constraint goes here if you requre authentication
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
- Restart your server. If the server starts up.