Smartcard: Optionally extract certificate from XFCC header

What does this MR do and why?

Smartcard: Optionally extract certificate from XFCC header

Optionally extract certificate from X-Forwared-Client-Cert header. If the non standard X-SSL-Client-Certificate header is set (as done by our current NGINX and NGINX Ingress configuration in charts and Omnibus), it takes presedence.

Background

With NGINX Ingresses recent retirement, GitLab chart and Operator are looking to support Envoy Gateway (and Gateway API) as an alternative to (NGINX) Ingress. Envoy Gateway has built in support for client certificate handling but passes the certificate information in a different format.

By supporting this header on the rails site, we can expose the Smartcard functionality with a ClientTrafficPolicy in GitLab chart.

References

Screenshots or screen recordings

Before After

How to set up and validate locally

This can be tested by deploying the related GitLab chart feature branch with Gateway API and Envoy Gateway enabled. For certificate setup, the GDK instructions can be used.

Running both MRs together, I was able to sign in via smartcard.

⚠️ Testing this via GDK or Omnibus is not possible because they do not deploy Envoy.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Clemens Beck

Merge request reports

Loading