Skip to content

[code sync] Merge code from sonic-net/sonic-gnmi:master to kubesonic - #233

Merged
Lun Yue (lunyue-ms) merged 2 commits into
Azure:kubesonicfrom
mssonicbld:sonicbld/kubesonic-merge
Sep 14, 2026
Merged

Lun Yue (lunyue-ms) merged 2 commits into
Azure:kubesonicfrom
mssonicbld:sonicbld/kubesonic-merge

Conversation

@mssonicbld

Copy link
Copy Markdown
Collaborator
* a2a21ba - (origin/master, origin/HEAD, test, master) [gNMI] Verify optional client certificates (#780) (2026-09-10) [Ashutosh Agrawal]<br>```

Why I did it
The gNMI server supports an optional client-certificate mode for deployments that use password, JWT, certificate, or mixed application authentication.

The current optional mode uses tls.RequestClientCert. This asks the client for a certificate but does not verify a certificate when one is supplied. It also prevents certificate-based application authentication from receiving the verified certificate chain it requires.

The optional mode should continue allowing clients without certificates while verifying any certificate that a client chooses to provide.

This change deliberately preserves the existing application-authentication policy. It does not require client certificates for password or JWT clients, reject configurations without application authentication, change listener binding, or modify the no-TLS behavior.

How I did it
Select tls.VerifyClientCertIfGiven when --allow_no_client_auth is enabled.
Retain tls.RequireAndVerifyClientCert when optional mode is disabled.
Update the flag description to state that a supplied certificate must be valid.
Add TLS handshake coverage showing that:
a client may omit its certificate;
a trusted client certificate is accepted and verified; and
an untrusted client certificate is rejected.
Add compatibility coverage confirming that optional client certificates continue to support:
no application authentication;
password authentication;
JWT authentication; and
mixed certificate/password authentication.
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@mssonicbld

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Commenter does not have sufficient privileges for PR 233 in repo Azure/sonic-gnmi.msft

@mssonicbld
mssonicbld force-pushed the sonicbld/kubesonic-merge branch from ff4f360 to 35a63e4 Compare September 12, 2026 03:03
@mssonicbld

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Commenter does not have sufficient privileges for PR 233 in repo Azure/sonic-gnmi.msft

@mssonicbld
mssonicbld force-pushed the sonicbld/kubesonic-merge branch from 35a63e4 to 79faaae Compare September 13, 2026 03:02
@mssonicbld

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Commenter does not have sufficient privileges for PR 233 in repo Azure/sonic-gnmi.msft

@mssonicbld
mssonicbld force-pushed the sonicbld/kubesonic-merge branch from 79faaae to 3824836 Compare September 14, 2026 03:03
@mssonicbld

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Commenter does not have sufficient privileges for PR 233 in repo Azure/sonic-gnmi.msft

@lunyue-ms

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@lunyue-ms
Lun Yue (lunyue-ms) merged commit 482857a into Azure:kubesonic Sep 14, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants