You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
traefik no longer url escape X-Forwarded-Tls-Client-Cert header #9143
bugA problem with current functionality, as opposed to missing functionality (enhancement)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussion
stdiscosrv has the ability to handle certificates passed by traefik proxy server in X-Forwarded-Tls-Client-Cert header.
Previously, traefik url encodes the content but it stopped doing so since version v2.9.4.
This becomes troublesome for setups where stdiscosrv sits behind newer traefik versions,
as now stdiscosrv tries to url decode the header content when it is not encoded.
The symptom can be very confusing, as if some client's certificate's pem text happens to not contain +, etc, then it works perfectly, but other clients will always fail announcement with 403 error.
Hi @calmh, thank you so much for the fast fix! I can test it when I get time. But from reading the code, it doesn't seem to solve the issue.
Consider the following case:
X-Forwarded-Tls-Client-Cert: ABCDEFG+XYZ
URL unescape will complete without error, generating string ABCDEFG XYZ. The failure will happen down the line when try to do PEM decode on the string. This is actually no different from the behavior before the fix.
IMHO maybe a better fix is to check for the presence of % character, like what's done for X-SSL-Cert for nginx.
bugA problem with current functionality, as opposed to missing functionality (enhancement)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussion
Activity
cmd/stdiscosrv: Handle unescaped cert header from Traefik (fixes sync…
Aetf commentedon Oct 9, 2023
Hi @calmh, thank you so much for the fast fix! I can test it when I get time. But from reading the code, it doesn't seem to solve the issue.
Consider the following case:
URL unescape will complete without error, generating string
ABCDEFG XYZ. The failure will happen down the line when try to do PEM decode on the string. This is actually no different from the behavior before the fix.IMHO maybe a better fix is to check for the presence of
%character, like what's done forX-SSL-Certfor nginx.calmh commentedon Oct 9, 2023
Lovely, I forgot that plus is a valid Base64 character.
Merge branch 'main' into infrastructure
Squashed commit of the following (actually merge upstream/main):
cmd/stdiscosrv: Handle unescaped cert header from Traefik (fixes sync…
cmd/stdiscosrv: Only attempt unescaping when there are %-encodings in…