Add conditional_access.cert_serial_format config option #38553
+171
−74
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue: Resolves #38549
Summary
conditional_access.cert_serial_formatserver configuration option to support both hexadecimal (default) and decimal certificate serial number formats for Okta conditional access.Problem
The Okta conditional access SSO endpoint (
/api/fleet/conditional_access/idp/sso) fails to authenticate devices when using Caddy as a reverse proxy for local testing because:parseSerialNumber()function parses theX-Client-Cert-Serialheader as hexadecimal (base 16)This causes authentication failures when certificate serial numbers reach 10 or higher:
10(decimal) → Caddy sends"10"→ Fleet parses as hex → looks up serial16→ not foundSolution
Added a new server configuration option:
conditional_access.cert_serial_formatFLEET_CONDITIONAL_ACCESS_CERT_SERIAL_FORMAThex(default) ordecimalThe default remains
hexfor AWS ALB (production), whiledecimalcan be used for local testing with Caddy.Changes
server/config/config.go: AddedConditionalAccessConfigstruct and config registrationee/server/service/condaccess/idp.go: ModifiedparseSerialNumber()to accept format parameteree/server/service/condaccess/idp_test.go: Added tests for decimal format parsingchanges/38549-cert-serial-format: Added changes fileTesting
10as decimal 10, not hex 16Checklist for submitter
changes/