首页 > 解决方案 > 如何隐藏向非 Jenkins 用户透露的敏感数据

问题描述

非 Jenkins 用户在尝试访问 URI 时会在浏览器中显示以下错误:

HTTP ERROR 403 No valid crumb was included in the request

URI: /contextMenu
STATUS: 403
MESSAGE: HTTP ERROR 403 No valid crumb was included in the request
SERVLET: Stapler
========================================
Powered by Jetty
========================================

我们如何在 Jenkins 中向非用户隐藏上述敏感信息?

标签: securityauthenticationjenkinserror-handlingaccount

解决方案


您可以在Jetty 版本中看到使用的jetty.version变量,因此运行 Jenkins-Djetty.version=xxx将有助于 404 页面。

403页不是这样。

理想情况下,您会将 Jenkins 嵌入到 Tomcat 服务器中,这样更容易设置自定义错误页面,如此处所示


推荐阅读