- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在尝试设置 Hudson JIRA 插件。我们的 JIRA 服务器使用自签名 SSL 证书进行保护。我已经使用 keytool 命令插入了我的 Web 浏览器存储的证书,并让 Hudson 找到了它。但现在它提示:
java.security.cert.CertificateException: No subject alternative names present
证书的通用名称是“Unknown”,我在证书中没有看到任何主题备用名称
$ openssl x509 -in Unknown -text -noout
Certificate:
Data:
Version: 1 (0x0)
Serial Number: 1214507595 (0x4863ea4b)
Signature Algorithm: md5WithRSAEncryption
Issuer: C=US, ST=NJ, L=[Our town], O=[Our company], OU=[Our project], CN=Unknown
Validity
Not Before: Jun 26 19:13:15 2008 GMT
Not After : May 5 19:13:15 2018 GMT
Subject: C=US, ST=NJ, L=[Our town], O=[Our company], OU=[Our project], CN=Unknown
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public Key: (1024 bit)
[omitted]
Signature Algorithm: md5WithRSAEncryption
[omitted]
(识别信息已编辑并在括号中注明。)
有没有办法将主题备用名称附加到此证书?或者还有其他方法吗?还是我被迫破解 Hudson Jira 插件?
最佳答案
用于访问您的 Jira 服务器的主机名(例如 https://jira.acme.com/ 中的 jira.acme.com)必须与 CN 之一匹配
主题名称的字段,或者如果没有,证书的 Subject Alternative Name
之一。
这在 RFC 2818 中有详细说明:
In some cases, the URI is specified as an IP address rather than a hostname. In this case, the iPAddress subjectAltName must be present in the certificate and must exactly match the IP in the URI.
在您的情况下,Java 正在提示,因为 CN
(“未知”)和 Subject Alternative Name
(因为你没有)确实匹配你的 Jira 服务器的主机名。
因此,要么使用适当的 CN
生成证书,例如使用 keytool
:
$ keytool -genkey -alias jira_acme_com -keyalg RSA -keysize 2048 -validity 365 -keystore jira_acme_com.jksEnter keystore password: Re-enter new password: What is your first and last name? [Unknown]: jira.acme.comWhat is the name of your organizational unit? [Unknown]: Our projectWhat is the name of your organization? [Unknown]: Our companyWhat is the name of your City or Locality? [Unknown]: Our townWhat is the name of your State or Province? [Unknown]: NJWhat is the two-letter country code for this unit? [Unknown]: USIs CN=jira.acme.com, OU=Our project, O=Our company, L=Our town, ST=NJ, C=US correct? [no]: yEnter key password for (RETURN if same as keystore password):
$ keytool -list -v -keystore jira_acme_com.jks Enter keystore password: Keystore type: JKSKeystore provider: SUNYour keystore contains 1 entryAlias name: jira_acme_comCreation date: Sep 4, 2010Entry type: PrivateKeyEntryCertificate chain length: 1Certificate[1]:Owner: CN=jira.acme.com, OU=Our project, O=Our company, L=Our town, ST=NJ, C=USIssuer: CN=jira.acme.com, OU=Our project, O=Our company, L=Our town, ST=NJ, C=USSerial number: 4c81e9a9Valid from: Sat Sep 04 10:39:37 CEST 2010 until: Sun Sep 04 10:39:37 CEST 2011Certificate fingerprints: MD5: 15:6A:E3:14:E2:78:F4:95:41:E6:33:C9:F8:8B:64:23 SHA1: CD:A6:9A:84:18:E8:62:50:2C:DC:2F:89:22:F6:BA:E9:1A:63:F6:C6 Signature algorithm name: SHA1withRSA Version: 3
And setup Tomcat to use the keystore.
Of, if you want to create a multihomed certificate, you'll have to use OpenSSL (keytool cannot add X509 extensions such as Subject Alternative Name). These links are excellent resources:
Update: Given that you can't change the certificate (you really should have mentioned that), a temporary solution could be to change the local /etc/hosts
file of the required machines to resolve Unknown
to the real IP of the machine.
123.123.123.123 Unknown
这样你就可以访问https://Unknown/从这些机器。但很明显,这更像是一个肮脏的 hack,而不是真正的解决方案,并且无法扩展。
联系管理员以获得真正的“好”证书仍然是真正好的解决方案。
关于java - 自签名证书、Java、Hudson 和 JIRA,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3622788/
我们为Hudson提供了一个自定义插件,可将构建的输出上传到远程计算机上。我们刚刚开始研究使用Hudson从属服务器来提高构建的吞吐量,但是使用自定义插件的项目无法通过FileNotFoundExce
我打算使用Ubuntu镜像在Amazon EC2上安装Hudson。我要测试的代码没有很大的内存开销-我将主要执行python单元测试。 我应该使用哪个EC2实例?微型实例是否足够(有足够的内存)还是
我正在研究一种为Hudson定义环境变量的方法(构建服务器上的NCover路径),以便构建脚本可以使用它,但不需要在Hudson作业中重新定义它(类似于% SVN_REVISION% 或 %BUILD
我正在尝试在服务器上安装 Hudson。文章here说只是做 java -jar hudson.war 它应该安装到服务器。这在本地计算机上非常简单,但我想在我通过 cPanel 管理的远程网站主机上
因此,我在 Hudson 上有几项工作需要 3-6 个小时才能运行。从机是在 VM 上运行的各种不同的 Windows 操作系统。有时,会出现一个小问题,显然会导致已打开 6 小时的套接字关闭。 (即
我知道有Web API允许使用当前内部版本号进行此操作。但这需要身份验证,因此必须在每个 hudson 上编辑脚本。 有没有一种方法可以通过脚本或插件来实现? 最佳答案 如果您正在谈论设置构建说明,J
我需要强行停止在远程服务器上运行的 Hudson 构建。是否有命令/API 来做到这一点? 例如:要触发一个新的构建,我们可以这样做:- HUDSON_URL/job/JOBNAME/build 寻找
问题 假设我有一个 jenkins/hudson 工作(例如自由式),它需要两个参数 PARAM_ONE 和 PARAM_TWO .现在,我不知道这些参数的值,但我可以运行一些脚本(perl/shel
我在 hudson 上丢失了管理员用户密码(实际上它只是随机停止工作),我可以通过禁用安全性(编辑 ~/.hudson/config.xml)重新进入,然后我可以配置 hudson,但我找不到添加新用
我正在尝试将 Hudson 配置为在构建失败时向将损坏的构建提交给 SVN 的人发送电子邮件。 题 是否可以做到这一点,如果可以,我该如何配置 Hudson 来做到这一点? 最佳答案 是 - 在您的工
我有一项艰巨的任务摆在我面前……修改几个 hudson 工作的配置。我想要的是从命令行执行此操作。但是根据我的经验,除非您强制它“从磁盘重新加载配置”,否则 hudson 不会重新读取配置。 我不想仅
如何触发 Hudson 的另一项作业作为预构建步骤? 最佳答案 有一个Parameterized Trigger Plugin ,这会在“添加构建步骤”菜单中启用“在其他项目上触发/调用构建”。 关于
我使用 Hudson 来自动测试一个非常大的重要产品。我希望我的测试主机能够运行理论上支持的尽可能多的并发构建,但 excel 测试除外,它在任何时间每台机器只能运行一个。任意数量的非 Excel 测
有谁知道如何在 Hudson 服务器中搜索通过运行重复的 JUnit 测试生成的增量日志文件? Hudson 仪表板将显示最近二十个测试,但我们正在寻找一个日志文件,其中包含 Hudson 构建的完整
我有 1 个上游作业和 2 个并行下游作业。当上游作业成功时,会触发 2 个下游作业。目前,我分别为每个工作发送邮件通知。不是收件人提示太多邮件。 我需要找到一种方法来收集这 3 个作业的构建结果并发
当使用标准 Hudson 源代码控制管理插件之一时,默认情况下,自上次 Hudson 构建以来的更改将被收集并显示在“最近更改”中。 我们的构建有一个基础存储库,然后子模块位于它们自己的存储库中。我们
我们有一个包含八个节点的 Hudson 集群。当某个特定的代码分支不再处于事件状态时,我们会禁用构建作业,但该作业的工作区仍然会占用所有节点上的空间。 我正在寻找一种在所有节点上触发工作区清理的方法。
是否可以为 Hudson 中的每个构建维护多个工作区?假设如果我想保留最后 5 个构建,是否也可以拥有五个相应的工作区文件夹?目前,无论何时安排新构建,它都会覆盖工作区。 最佳答案 现在的想法是重用工
在我们公司,我们使用 Hudson 作为我们的 CI 服务器。我们为每个当前项目运行单独的服务器(通常有 3 到 10 个正在进行的项目)。 我们想在中央位置设置一个监视器,以同时显示所有构建服务器的
如果所有 maven 项目都很好,我正在使用 Hudson promoted 构建插件来尝试自动部署。 我的设置类似于下面的 Hudson 作业创建版本控制标签,然后触发项目 A 和 B 的下游构建。
我是一名优秀的程序员,十分优秀!