Skip to content

Conversation

@niranjanivivek
Copy link

@niranjanivivek niranjanivivek commented Dec 5, 2025

This commit enables support for policy-based authorization of gRPC requests in gNMI server and handles the Authz Rotate() RPC for secure policy updates.

HLD Reference : gNSI HLD

Dependency Chain for Merge

Please follow this merge order,

Backend Base PR: sonic-mgmt-common #sonic-net/sonic-mgmt-common#183 (Must be merged first)
Backend Incremental PR: sonic-mgmt-common #sonic-net/sonic-mgmt-common#200
Current PR: sonic-gnmi ##549

gNSI Authz - UT Results
=== RUN TestGnsiAuthzRotation
=== RUN TestGnsiAuthzRotation/RotateOpenClose
=== RUN TestGnsiAuthzRotation/RotatePolicyEmptyRequest
=== RUN TestGnsiAuthzRotation/RotatePolicyEmptyUploadRequest
=== RUN TestGnsiAuthzRotation/RotatePolicyWrongJSON
=== RUN TestGnsiAuthzRotation/RotatePolicyNoVersion
=== RUN TestGnsiAuthzRotation/RotatePolicySuccess
=== RUN TestGnsiAuthzRotation/RotatePolicyNoFinalize
=== RUN TestGnsiAuthzRotation/RotateTheSamePolicyTwice
=== RUN TestGnsiAuthzRotation/RotateTheSamePolicyTwiceWithForceOverwrite
=== RUN TestGnsiAuthzRotation/ParallelRotationCalls
--- PASS: TestGnsiAuthzRotation (4.55s)
--- PASS: TestGnsiAuthzRotation/RotateOpenClose (0.04s)
--- PASS: TestGnsiAuthzRotation/RotatePolicyEmptyRequest (0.03s)
--- PASS: TestGnsiAuthzRotation/RotatePolicyEmptyUploadRequest (0.03s)
--- PASS: TestGnsiAuthzRotation/RotatePolicyWrongJSON (0.03s)
--- PASS: TestGnsiAuthzRotation/RotatePolicyNoVersion (0.03s)
--- PASS: TestGnsiAuthzRotation/RotatePolicySuccess (0.03s)
--- PASS: TestGnsiAuthzRotation/RotatePolicyNoFinalize (0.03s)
--- PASS: TestGnsiAuthzRotation/RotateTheSamePolicyTwice (0.05s)
--- PASS: TestGnsiAuthzRotation/RotateTheSamePolicyTwiceWithForceOverwrite (0.05s)
--- PASS: TestGnsiAuthzRotation/ParallelRotationCalls (0.05s)

Why I did it

Why I did it

How I did it

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@mssonicbld
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@mssonicbld
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@mssonicbld
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@niranjanivivek niranjanivivek marked this pull request as ready for review December 16, 2025 17:11
@niranjanivivek
Copy link
Author

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 549 in repo sonic-net/sonic-gnmi

@mssonicbld
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@niranjanivivek
Copy link
Author

@sreeiyer-1, Please review and approve.

@niranjanivivek
Copy link
Author

niranjanivivek commented Dec 19, 2025

Hi @ndas7 and @rlucus , @kishanps Please review .

@sreeiyer-1
Copy link

@sreeiyer-1, Please review and approve.

The changes look good

Copy link
Contributor

@ndas7 ndas7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add more details in the description? Thanks.

@niranjanivivek
Copy link
Author

Could you please add more details in the description? Thanks.

Description is updated.

@mssonicbld
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ndas7
Copy link
Contributor

ndas7 commented Jan 9, 2026

Could you please add a link to the HLD in the description?

Copy link
Contributor

@rlucus rlucus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending the previous comment about include statements.

Signed-off-by: kanchanavelusamy <velusamyk@google.com>
@mssonicbld
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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.

6 participants