2

可以以任何方式配置 GraphDB Free 以允许通过 HTTPS 提供内容吗?

我正在使用 Angular2 创建一个简单的前端 Web 应用程序,该应用程序向 GraphDB SPARQL 端点发出 HTTP 请求。

我正在使用 Windows IIS,并且服务器已设置为不信任任何不通过 HTTPS 提供的内容。

任何见解都会有所帮助。

4

1 回答 1

2

根据 GraphDB 配置文件中的说明$GDB_HOME/conf/graphdb.properties,启用 HTTPS 取消注释以下行:

# Enable SSL (uncomment to enable)
graphdb.connector.SSLEnabled = true
graphdb.connector.scheme = https
graphdb.connector.secure = true

# GraphDB uses the Java implementation of SSL, which requires a configured key in the Java keystore.
# To setup keystore uncomment the following properties and set keystorePass and keyPass to the actual values.

graphdb.connector.keyFile = <path to the keystore file if different from ${graphdb.home}/keystore>
graphdb.connector.keystorePass = <secret>
graphdb.connector.keyAlias = graphdb
graphdb.connector.keyPass = <secret>

如果您使用自签名证书,请将其添加到密钥库中:

keytool -genkey -alias graphdb -keyalg RSA

如果您有第三方受信任的 OpenSSL 证书,则需要将其转换为 PKCS12 密钥,然后使用以下命令导入 Java 密钥库:

keytool -importkeystore -deststorepass MYPASS -srckeystore mypkcs12.p12 -srcstoretype PKCS12

有关如何处理第三方受信任证书的更多信息,请查看此优秀链接,详细解释如何将导入私钥和证书转换为 java 密钥库

已编辑

要找到桌面安装的 $GDB_HOME 目录,请查看GraphDB 文档

于 2018-04-10T04:52:23.203 回答