ACS 7.4社区版Keystore配置失败求助:加密密钥库异常
ACS 7+社区版压缩包发行版密钥库配置问题
我已成功配置Solr的mTLS,但Alfresco日志中出现密钥库相关报错:
org.alfresco.error.AlfrescoRuntimeException: 08280000 Keystores are invalid ... Caused by: org.alfresco.encryption.InvalidKeystoreException: The key with alias metadata has been changed, re-instate the previous keystore
我使用的是alfresco-content-services-community-distribution-7.4.0.zip中的默认密钥库,包含两个文件:
-rw-r--r-- 1 foo foo 645 May 3 20:59 keystore -rw-r--r-- 1 foo foo 359 May 3 20:59 keystore-passwords.properties
其中keystore为Java JCE KeyStore。我将这两个文件复制到服务器的/opt/tomcat/updated/shared/classes/alfresco/extension/keystore/metadata-keystore/目录,相关配置如下:
alfresco-global.properties 配置:
# shared/classes/alfresco-global.properties dir.keystore=/opt/tomcat/updated/shared/classes/alfresco/extension/keystore
catalina.sh 配置:
# bin/catalina.sh export JAVA_TOOL_OPTIONS="\ -Dencryption.keystore.type=JCEKS \ -Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding \ -Dencryption.keyAlgorithm=DESede \ -Dencryption.keystore.location=/opt/tomcat/updated/shared/classes/alfresco/extension/keystore/metadata-keystore/keystore \ -Dmetadata-keystore.password=mp6yc0UD9e \ -Dmetadata-keystore.aliases=metadata \ -Dmetadata-keystore.metadata.password=oKIWzVdEdA \ -Dmetadata-keystore.metadata.algorithm=DESede"
此处JAVA_TOOL_OPTIONS指向实际的JCE密钥库文件,dir.keystore指向该密钥库的上层两级目录,但该配置无效,仍触发上述报错。网络上关于JAVA_TOOL_OPTIONS与dir.keystore的指向有多种说法,我几乎尝试了所有组合,还试过以下方案:
- 将密钥库目录置于
alf_data下,但该方式似乎已过时 - 使用
keytool生成新密钥库(官方文档中的“手动生成密钥库”方法) - 删除原有密钥库,通过
org.alfresco.encryption.GenerateSecretKey在keystore-passwords.properties中添加新KeyData(官方文档中的“自动生成密钥库”方法)
但以上方案均无效,分别出现Key metadata is missing from keystore或The key with alias metadata has been changed, re-instate the previous keystore错误,求解决思路。
内容的提问来源于stack exchange,提问作者EML
相关产品推荐
相关产品推荐

