【问题标题】:Trouble Enabling SSL on Fuseki Server在 Fuseki 服务器上启用 SSL 时遇到问题
【发布时间】:2021-11-13 08:46:32
【问题描述】:

我希望你们中的一些人能够帮助我在我的 fuseki 服务器上设置 SSL。我已经与它斗争了几天,并且已经没有可能的解决方案了!

操作系统: RHEL 8.5 (Ootpa) Fuseki: 4.2.0 版 当前作为系统服务运行:

ExecStart=/home/fuseki/apache-jena-fuseki-4.2.0/fuseki-server -v -tdb2 -update -config=/home/fuseki/fuseki_data/config.ttl

这是我一直在使用的手册-https://jena.apache.org/documentation/fuseki2/fuseki-data-access-control.html

以下是提供的参数添加到 fuseki-server 的启动序列中。

–https=SETUP [证书详细信息的文件名。] & –httpsPort=PORT [https 的端口。默认值:3043]

--https 参数以 JSON 格式命名一个文件,其中包括 证书的证书文件和密码。

问题在于,无论我如何表达参数,进程都会在 journalctl 日志中返回 "fuseki-server[9469]: Unknown argument: https"

我尝试过 -https=dir、--https=dir 和 -httpsConf=dir(其中 dir 是我的 cert_details.json 文件的目录)。

基于文档 https 应该具有原生支持,但是当我检查 fuseki-server -help 时,没有提到 https 参数。我从我的证书创建了一个 .jks,设置了正确的文件权限,并允许了 3043。

我还在 fuseki 中找到了从 .json 文件中解析密钥库和密码的代码块(这导致我尝试使用 -httpsConf=)

private void setHttpsCert(字符串文件名) { 尝试 { JsonObject httpsConf = JSON.read(filename); 路径 path = Path.of(filename).toAbsolutePath(); String keystore = httpsConf.get("keystore").getAsString().value(); // 相对于 https 设置文件解析。 this.httpsKeystore = path.getParent().resolve(keystore).toString(); this.httpsKeystorePasswd = httpsConf.get("passwd").getAsString().value();

不确定我在这里缺少什么。值得一提的是,我是一名化学家,而且我绝对不太了解 Java,所以很可能是我很愚蠢。任何建议/知识将不胜感激。

【问题讨论】:

    标签: jena fuseki


    【解决方案1】:

    HTTPS+Fuseki有两种获取方式:

    这里提到的文件是jar文件:https://repo1.maven.org/maven2/org/apache/jena/jena-fuseki-server/4.2.0/jena-fuseki-server-4.2.0.jar,而不是apache-jena-fuseki下载中的jar。 (顺便说一句,它没有 UI。)

    apache-jena-fuseki 中的一个可以通过使用 --jetty=jetty.xml (https://www.eclipse.org/jetty/documentation/current/jetty-xml-config.html) 的 Jetty 配置来使用 HTTPS——例如:https://github.com/apache/jena/blob/main/jena-fuseki2/examples/fuseki-jetty-https.xml(需要修改)。

    【讨论】:

      猜你喜欢
      • 2017-06-24
      • 1970-01-01
      • 1970-01-01
      • 2016-01-07
      • 2020-05-07
      • 2020-09-12
      • 1970-01-01
      • 2017-06-03
      • 1970-01-01
      相关资源
      最近更新 更多