我们使用的是融合平台 5.3.1 社区版。
最近,作为安全扫描的一部分,我们发现 Kafka 休息代理和模式注册服务缺少 http 标头(X-XSS-Protection,X-Content-Type-Options)安全漏洞。
根据 confluent 文档,我们可以在配置中添加 response.http.headers.config 属性来添加/设置所需的标头。
https://docs.confluent.io/platform/current/kafka-rest/production-deployment/rest-proxy/config.html https://docs.confluent.io/platform/current/schema-registry/installation/config .html
我们已经在相应的配置文件中添加了配置并重新启动了服务。
配置中添加的行
休息代理
response.http.headers.config=添加 X-XSS-Protection: 1; mode=block, 添加 X-Content-Type-Options: nosniff
模式注册表
response.http.headers.config="add Cache-Control: no-cache, no-store, must-revalidate", 添加 X-XSS-Protection: 1; 模式=阻止,添加严格传输安全:max-age=31536000;includeSubDomains,添加 X-Content-Type-Options: nosniff
重新启动服务后,我们希望在响应中收到额外的 http 响应标头,但我们仍然没有收到这些标头。
请求:获取:http://xxxx:8082/
有什么建议可以在响应中获取那些缺少的标头。?提前致谢