-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[TT-16050]: Added key use in dynamic mtls behind insecure flag #7682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
This PR introduces a security enhancement for dynamic mTLS by adding a new configuration flag, Files Changed Analysis
Architecture & Impact Assessment
graph TD
A[Request Received] --> B{API uses dynamic mTLS?};
B -- No --> C[Proceed with other auth];
B -- Yes --> D{Is `allow_unsafe_dynamic_mtls_token` true?};
D --|No (Secure Default)|--> E{Client Certificate Present?};
E -- Yes --> F[Validate Certificate & Proceed];
E -- No --> G[Reject: 401 Unauthorized - Cert Required];
D --|Yes (Insecure Mode)|--> H{Token OR Certificate Present?};
H -- Yes --> I[Validate Credentials & Proceed];
H -- No --> J[Reject Request];
Scope Discovery & Context Expansion
Metadata
Powered by Visor from Probelabs Last updated: 2026-01-30T12:51:00.403Z | Triggered by: pr_updated | Commit: 8455940 💡 TIP: You can chat with Visor using |
|
API Changes --- prev.txt 2026-01-30 12:49:08.270714543 +0000
+++ current.txt 2026-01-30 12:48:58.059643516 +0000
@@ -7287,6 +7287,11 @@
// Specify public keys used for Certificate Pinning on global level.
PinnedPublicKeys map[string]string `json:"pinned_public_keys"`
+ // AllowUnsafeDynamicMTLSToken controls whether certificate presence is required for
+ // dynamic mTLS authentication. If set to false (default), requests with a token but
+ // no certificate will be rejected for APIs using dynamic mTLS.
+ AllowUnsafeDynamicMTLSToken bool `json:"allow_unsafe_dynamic_mtls_token"`
+
Certificates CertificatesConfig `json:"certificates"`
// CertificateExpiryMonitor configures the certificate expiry monitoring and notification feature
@@ -9070,6 +9075,7 @@
const (
MsgAuthFieldMissing = "Authorization field missing"
MsgApiAccessDisallowed = "Access to this API has been disallowed"
+ MsgAuthCertRequired = "Client certificate required"
MsgBearerMailformed = "Bearer token malformed"
MsgKeyNotAuthorized = "Key not authorised"
MsgOauthClientRevoked = "Key not authorised. OAuth client access was revoked"
@@ -9104,8 +9110,9 @@
ErrAuthKeyNotFound = "auth.key_not_found"
ErrAuthCertNotFound = "auth.cert_not_found"
ErrAuthCertExpired = "auth.cert_expired"
- ErrAuthCertMismatch = "auth.cert_mismatch"
ErrAuthKeyIsInvalid = "auth.key_is_invalid"
+ ErrAuthCertRequired = "auth.cert_required"
+ ErrAuthCertMismatch = "auth.cert_mismatch"
MsgNonExistentKey = "Attempted access with non-existent key."
MsgNonExistentCert = "Attempted access with non-existent cert." |
✅ Security Check PassedNo security issues found – changes LGTM. Architecture Issues (2)
Performance Issues (1)
Quality Issues (1)
Powered by Visor from Probelabs Last updated: 2026-01-30T12:51:03.132Z | Triggered by: pr_updated | Commit: 8455940 💡 TIP: You can chat with Visor using |
79ddf8a to
fc295ce
Compare
7f7777d to
b0609b6
Compare
b0609b6 to
dd4a15e
Compare
dd4a15e to
35a1af8
Compare
35a1af8 to
8455940
Compare
|



Description
TT-16050
Related Issue
Motivation and Context
How This Has Been Tested
Screenshots (if appropriate)
Types of changes
Checklist
Ticket Details
TT-16050
Generated at: 2026-01-30 12:48:18