Jenkins Docker 容器 - 403 请求中未包含有效的面包屑

标签 jenkins kubernetes

我正在设置 Jenkins 服务器,并且在 Web 界面中执行简单请求(例如创建文件夹、管道、作业等)时,我会定期收到以下错误:

HTTP ERROR 403
Problem accessing /job/Mgmt/createItem. Reason:

    No valid crumb was included in the request

服务器正在使用 Jenkins/Jenkins 容器,该容器由 Kubernetes 在 AWS 上使用 kops 创建的集群上进行编排。它位于 ELB 类后面。

为什么我会遇到这种情况?我认为面包屑是为了对抗某些 CSRF 请求,但我所做的只是使用 Jenkins Web 界面。

最佳答案

启用代理兼容性可能有助于解决此问题。 转到“设置”->“安全”->“CSRF 保护”部分中的启用代理兼容性

Some HTTP proxies filter out information that the default crumb issuer uses to calculate the nonce value. If an HTTP proxy sits between your browser client and your Jenkins server and you receive a 403 response when submitting a form to Jenkins, checking this option may help. Using this option makes the nonce value easier to forge.

关于Jenkins Docker 容器 - 403 请求中未包含有效的面包屑,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48086724/

相关文章:

jenkins - 在 Jenkins 中使用高级安装程序

bash - Jenkinsfile 添加 if else 脚本?

kubernetes - Kubernetes 上的服务发现

docker - Kubernetes和Helm的配置管理

kubernetes - helm 模板语言中的全局变量以避免重复

java - 尝试在 Jenkins 上运行 Selenium 时出现 NoSuchSession 异常

jenkins - 如何从groovy脚本运行jenkins作业

kubernetes - 将kubernetes配置转换为docker-compose文件(反向kompose)

jenkins kubernetes-plugin 存档/junit

kubernetes - Nginx 入口 : service "ingress-nginx-controller-admission" not found