如何隐藏向非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中向非用户隐藏以上敏感信息?

解决方法

您可以在Jetty releases中看到所使用的runtime.Gosched()变量,因此使用jetty.version运行Jenkins将有助于404页。

403页不是这样。

理想情况下,您应该将Jenkins嵌入到easier to setup custom error pages的Tomcat服务器中,命名为illustrated here