ACS 7 için güvenli anahtar oluşturma ve sertifika ayarlama
Güvenli anahtarlar
Bu bölümde, güvenli anahtarlar oluşturmak ve sertifikaları ayarlamak için önerilen bir yaklaşım açıklanmaktadır. Halihazırda kullandığınız alternatif bir çözümünüz varsa bu yaklaşımı kullanmanız gerekmez.
Alfresco Content Services'i dağıtım zip dosyasını kullanarak kuruyorsanız, depo ve Solr için sertifikalar oluşturmanız gerekir. Varsayılan olarak, dağıtım zipleri SSL kullanacak şekilde yapılandırılmıştır, bu nedenle sisteminizin başarılı bir şekilde çalışmasını sağlamak için bu sertifikaları oluşturmanız gerekir.
Depo ve Solr gibi Alfresco İçerik Hizmetlerinde farklı hizmetler arasında SSL / karşılıklı TLS kimlik doğrulamasını yapılandırmak için gerekli anahtar depolarını, güven depolarını ve sertifikaları oluşturabilirsiniz.
SSL iletişimi için güvenli anahtarlar oluşturun
Depo ve Arama Hizmetleri arasında, kurulumunuza özel güvenli anahtarlar kullanarak SSL / karşılıklı TLS kimlik doğrulaması için sertifikalar oluşturmak için bu bilgileri kullanın.
GitHub projesinde bir sertifika oluşturucu komut dosyası olan run.sh (Linux için) ve run.cmd (Windows için) sağlanır. Komut dosyası iki bölümden oluşur - ilk bölüm OpenSSL (sertifikaları oluşturmak için) ve ikinci bölüm Java anahtar aracına dayanır (anahtar depolarını ve güven depolarını oluşturmak için). Burada, bağımsız bir Linux veya Windows işletim sistemi için komut dosyasını çalıştırmaya odaklanacağız.
Başlamadan önce, sistem yolunuzda OpenSSL ve keytool'un mevcut olması gerekir.
Https://github.com/Alfresco/alfresco-ssl-generator GitHub projesine göz atın ve Klonla veya İndir'i tıklayın.
Projeyi indirdiyseniz, dosyaları uygun bir konuma çıkarın.
Dizini aşağıdaki konuma değiştirin ve komut dosyasını çalıştırın:
(Linux için)
cd / ssl-tool
./run.sh
(Windows için)
cd ssl-tool-win
run.cmd
Varsayılan olarak, bu, geçerli çalışma dizininizde bir anahtar depoları klasörü oluşturur.
Not: Anahtar depoları klasörü boş değilse, komut dosyası herhangi bir anahtar deposu veya güven deposu oluşturmadan çıkar. Komut dosyasını yeniden çalıştırmanız gerekirse anahtar depoları klasörünü güvenle kaldırabilirsiniz.
Daha fazla bilgi için Anahtar deposu dizin yapısına bakın ve sertifikalarınızı özelleştirmenize olanak tanıyan tam bir parametre listesi için sertifika oluşturmayı özelleştirin. Sertifika oluştururken kendi parolalarınızı belirlemeniz önerilir.
Sertifika oluşturmayı özelleştirin
Sertifikalarınızı özelleştirmenize izin veren parametrelerin tam listesi aşağıda verilmiştir. Bu parametreler, run.sh ve run.cmd betiklerinde listelenen varsayılan değerleri geçersiz kılar.
Parameter | Value | Description |
---|---|---|
alfrescoversion | enterprise/community | Sets the type of Alfresco environment. The default value is enterprise. |
keysize | 1024/2048/4096 | Specifies the RSA key length. The default value is 1024. |
keystoretype | PKCS12/JKS/JCEKS | Sets the type of the keystores (containing private keys). The default value is JCEKS. |
keystorepass | Any string | Specifies the password for the keystores |
truststoretype | JKS/JCEKS | Sets the type of the truststores (containing public keys). The default value is JCEKS. |
truststorepass | Any string | Specifies the password for the truststores |
encstorepass | Any string | Specifies the password for the encryption keystore |
encmetadatapass | Any string | Specifies the password for the encryption metadata |
cacertdname | Sets the Distinguished Name of the CA certificate, starting with a forward-slash. For example:/C=GB/ST=UK/L=Maidenhead/O=Alfresco Software Ltd./OU=Unknown/CN=Custom Alfresco CA | |
repocertdname | Sets the Distinguished Name of the repository certificate, starting with a forward-slash. For example:/C=GB/ST=UK/L=Maidenhead/O=Alfresco Software Ltd./OU=Unknown/CN=Custom Alfresco Repository | |
solrcertdname | Sets the Distinguished Name of the Solr certificate, starting with a forward-slash. For example:/C=GB/ST=UK/L=Maidenhead/O=Alfresco Software Ltd./OU=Unknown/CN=Custom Alfresco Repository Client | |
browsercertdname | Sets the Distinguished Name of the browser certificate, starting with a forward-slash. For example:/C=GB/ST=UK/L=Maidenhead/O=Alfresco Software Ltd./OU=Unknown/CN=Custom Browser Client | |
caservername | Any string, localhost by default. | DNS Name of CA Server. |
alfrescoservername | Any string, localhost by default. | DNS Name for Alfresco Server. |
solrservername | Any string, localhost by default. | DNS Name For Solr Server. |
alfrescoformat | classic, current | Default format for certificates: current for IE SS 2.0.0+ and classic for previous versions. |
Not: Sertifikalarınızda özel DN adları kullanmayı planlıyorsanız, değerlerin etrafında çift tırnak işareti kullanmanız gerekir. Örneğin:
$ ./run.sh -cacertdname
"/C=GB/ST=UK/L=Maidenhead/O=Alfresco/OU=Unknown/CN=Windows Alfresco CA"
-repocertdname "/C=GB/ST=UK/L=Maidenhead/O=Alfresco/OU=Unknown/CN=Repo"
-solrcertdname "/C=GB/ST=UK/L=Maidenhead/O=Alfresco/OU=Unknown/CN=Solr"
Örneğin:
./run.sh -keystorepass “password" -truststorepass “password"
run.cmd -keystorepass “password" -truststorepass “password"
Keystore Anahtar deposu dizin yapısı
Anahtar depoları dizini aşağıdaki yapı ve dosyaları içerir:
keystores ├── alfresco │ ├── keystore │ ├── ssl.keystore │ ├── ssl.truststore ├── client │ └── browser.p12 └── solr │ ├── ssl-repo-client.keystore │ └── ssl-repo-client.truststore
File name Description
browser.p12 The PKCS12 keystore generated from ssl.keystore that contains the repository private key and certificate for use in browsers, such as Firefox.
keystore Secret key keystore containing the secret key used to encrypt and decrypt node properties.
ssl.keystore Repository keystore containing the repository private/public key pair and certificate.
ssl.truststore Repository truststore containing certificates that the repository trusts.
ssl-repo-client.keystore Solr SSL keystore containing the Solr private/public key pair and certificate.
ssl-repo-client.truststore Solr truststore containing certificates that the repository trusts.
Sertifikaları ayarlayın
Oluşturulan sertifikalarınızı doğru konumlarında ayarlamak için bu bilgileri kullanın.
Devam etmeden önce, SSL iletişimi için güvenli anahtarlar oluşturma bölümündeki adımları tamamladığınızdan emin olun.
/ Keystores / alfresco altındaki dosyaları Alfresco Content Services kurulum konumuna kopyalayın: ${ALF_DATA_DIR}/keystore
8443 numaralı bağlantı noktasında HTTPS kullanarak sunucuya erişmek için bir tarayıcıdan anahtar depoları / istemci altındaki dosyayı kullanabilirsiniz.
SSL özelliklerini gösterildiği gibi geçersiz kılın.
1. <TOMCAT_HOME> /shared/classes/alfresco-global.properties içinde aşağıdakileri güncelleyin:
dir.keystore=${ALF_DATA_DIR}/keystore
# encryption
solr.secureComms=https
# ssl encryption
encryption.ssl.keystore.location=${dir.keystore}/ssl.keystore
encryption.ssl.keystore.type=JCEKS
encryption.ssl.keystore.keyMetaData.location=encryption.ssl.truststore.location=${dir.keystore}/ssl.truststore
encryption.ssl.truststore.type=JCEKS
encryption.ssl.truststore.keyMetaData.location=
# secret key keystore configuration
encryption.keystore.location=${dir.keystore}/keystore
encryption.keystore.keyMetaData.location=encryption.keystore.type=JCEKS
solr.host=localhost
solr.port=8983
solr.port.ssl=8983
2. <TOMCAT_HOME> /conf/server.xml'deki Tomcat SSL Bağlayıcısı için aşağıdakileri güncelleyin:
<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
SSLEnabled="true" maxThreads="150" scheme="https"
keystoreFile="/usr/local/tomcat/alf_data/keystore/ssl.keystore"
keystorePass="password" keystoreType="JCEKS"
secure="true" connectionTimeout="240000"
truststoreFile="/usr/local/tomcat/alf_data/keystore/ssl.truststore"
truststorePass="password" truststoreType="JCEKS"
clientAuth="want" sslProtocol="TLS" />
Daha fazla bilgi için Tomcat uygulama sunucusunu ve Solr yapılandırma dosyalarını yükleme bölümüne bakın.
<SOLR_HOME> /solrhome/templates/rerank/conf/solrcore.properties içinde SSL özelliklerini değiştirin.
Yeniden kayıt şablonu, Alfresco Arama Hizmetlerini ilk çalıştırdığınızda açık havada ve Solr çekirdeklerini arşivlemek için kullanılır.
# encryption
alfresco.secureComms=https
# ssl
alfresco.encryption.ssl.keystore.type=JCEKS
alfresco.encryption.ssl.keystore.location=<SOLR_HOME>/ssl-repo-client.keystore
alfresco.encryption.ssl.keystore.passwordFileLocation=
alfresco.encryption.ssl.truststore.type=JCEKS
alfresco.encryption.ssl.truststore.location=<SOLR_HOME>/ssl-repo-client.truststore
alfresco.encryption.ssl.truststore.passwordFileLocation=alfresco.host=localhost
alfresco.port.ssl=8443
<SOLR_HOME>/solrhome/alfresco/conf/solrcore.properties <SOLR_HOME>/solrhome/archive/conf/solrcore.properties
Kaynak:
https://docs.alfresco.com/search-services/latest/config/keys