Implements the frontend logic for gNSI Pathz#537
Merged
sneelam20 merged 1 commit intosonic-net:masterfrom Mar 13, 2026
Merged
Conversation
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
a08ae14 to
e6e8d06
Compare
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This was referenced Nov 10, 2025
e6e8d06 to
c0faf5c
Compare
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
c0faf5c to
0de3a9f
Compare
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
0de3a9f to
a9cafec
Compare
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
a9cafec to
a0d97ec
Compare
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
a0d97ec to
d47c553
Compare
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
d47c553 to
d291972
Compare
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
d291972 to
92a812a
Compare
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
92a812a to
5c7ce73
Compare
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
0606803 to
f41856d
Compare
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
f41856d to
00cadb8
Compare
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
00cadb8 to
d84bf2a
Compare
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
d84bf2a to
1326332
Compare
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
1326332 to
e6b697e
Compare
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
e6b697e to
703ffbf
Compare
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
703ffbf to
a62dd69
Compare
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Niranjani Vivek <[email protected]>
a62dd69 to
68d988c
Compare
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
sneelam20
approved these changes
Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This code implements the Pathz feature which is the policy-based authorization for gNMI read/write access.
Backend Base PR : #183 (Must be merged first)
Backend Incremental PR : #196
Current PR : #537
gNSI Pathz UT Results:
=== RUN TestGnsiPathzRotation
=== RUN TestGnsiPathzRotation/RotateOpenClose
=== RUN TestGnsiPathzRotation/RotateAuthenticationFailure
=== RUN TestGnsiPathzRotation/RotateStreamRecvError
=== RUN TestGnsiPathzRotation/RotateStreamSendError
=== RUN TestGnsiPathzRotation/RotatePolicyEmptyUploadRequest
=== RUN TestGnsiPathzRotation/RotatePolicyEmptyRequest
=== RUN TestGnsiPathzRotation/RotatePolicyWrongPolicyProto
=== RUN TestGnsiPathzRotation/RotatePolicyNoVersion
=== RUN TestGnsiPathzRotation/RotatePolicySuccess
=== RUN TestGnsiPathzRotation/RotatePolicyNoFinalize
=== RUN TestGnsiPathzRotation/FinalizeNoRotate
=== RUN TestGnsiPathzRotation/RotateTheSamePolicyTwice
=== RUN TestGnsiPathzRotation/RotateTheSamePolicyTwiceWithForceOverwrite
=== RUN TestGnsiPathzRotation/ParallelRotationCalls
--- PASS: TestGnsiPathzRotation (5.24s)
--- PASS: TestGnsiPathzRotation/RotateOpenClose (0.04s)
--- PASS: TestGnsiPathzRotation/RotateAuthenticationFailure (0.01s)
--- PASS: TestGnsiPathzRotation/RotateStreamRecvError (0.03s)
--- PASS: TestGnsiPathzRotation/RotateStreamSendError (0.01s)
--- PASS: TestGnsiPathzRotation/RotatePolicyEmptyUploadRequest (0.05s)
--- PASS: TestGnsiPathzRotation/RotatePolicyEmptyRequest (0.02s)
--- PASS: TestGnsiPathzRotation/RotatePolicyWrongPolicyProto (0.03s)
--- PASS: TestGnsiPathzRotation/RotatePolicyNoVersion (0.02s)
--- PASS: TestGnsiPathzRotation/RotatePolicySuccess (0.03s)
--- PASS: TestGnsiPathzRotation/RotatePolicyNoFinalize (0.03s)
--- PASS: TestGnsiPathzRotation/FinalizeNoRotate (0.02s)
--- PASS: TestGnsiPathzRotation/RotateTheSamePolicyTwice (0.05s)
--- PASS: TestGnsiPathzRotation/RotateTheSamePolicyTwiceWithForceOverwrite (0.05s)
--- PASS: TestGnsiPathzRotation/ParallelRotationCalls (0.05s)
=== RUN TestGnsiPathzUnimplemented
=== RUN TestGnsiPathzUnimplemented/ProbeUnimplemented
=== RUN TestGnsiPathzUnimplemented/GetUnimplemented
--- PASS: TestGnsiPathzUnimplemented (1.72s)
--- PASS: TestGnsiPathzUnimplemented/ProbeUnimplemented (0.01s)
--- PASS: TestGnsiPathzUnimplemented/GetUnimplemented (0.00s)
=== RUN TestGnsiPathzMisc
=== RUN TestGnsiPathzMisc/PathzCopyFile
=== RUN TestGnsiPathzMisc/PathzCopyNonRegularFile
=== RUN TestGnsiPathzMisc/PathzCopyFileDstErr
=== RUN TestGnsiPathzMisc/PathzCopyFileSrcErr
=== RUN TestGnsiPathzMisc/PathzFileCheckNonRegularFile
--- PASS: TestGnsiPathzMisc (1.05s)
--- PASS: TestGnsiPathzMisc/PathzCopyFile (0.00s)
--- PASS: TestGnsiPathzMisc/PathzCopyNonRegularFile (0.00s)
--- PASS: TestGnsiPathzMisc/PathzCopyFileDstErr (0.00s)
--- PASS: TestGnsiPathzMisc/PathzCopyFileSrcErr (0.00s)
--- PASS: TestGnsiPathzMisc/PathzFileCheckNonRegularFile (0.00s)
=== RUN TestWriteCredentialsMetadataToDB
=== RUN TestWriteCredentialsMetadataToDB/Success_NoKey
=== RUN TestWriteCredentialsMetadataToDB/Success_WithKey
=== RUN TestWriteCredentialsMetadataToDB/Failure_GetRedisDBClientError
=== RUN TestWriteCredentialsMetadataToDB/Failure_HSetError
--- PASS: TestWriteCredentialsMetadataToDB (0.00s)
--- PASS: TestWriteCredentialsMetadataToDB/Success_NoKey (0.00s)
--- PASS: TestWriteCredentialsMetadataToDB/Success_WithKey (0.00s)
--- PASS: TestWriteCredentialsMetadataToDB/Failure_GetRedisDBClientError (0.00s)
--- PASS: TestWriteCredentialsMetadataToDB/Failure_HSetError (0.00s)
=== RUN TestGetRedisDBClientReal
=== RUN TestGetRedisDBClientReal/Success
=== RUN TestGetRedisDBClientReal/NewClientNil
=== RUN TestGetRedisDBClientReal/PingError
--- PASS: TestGetRedisDBClientReal (0.00s)
--- PASS: TestGetRedisDBClientReal/Success (0.00s)
--- PASS: TestGetRedisDBClientReal/NewClientNil (0.00s)
--- PASS: TestGetRedisDBClientReal/PingError (0.00s)
=== RUN TestGetKey
=== RUN TestGetKey/Empty
=== RUN TestGetKey/Single
=== RUN TestGetKey/Multiple
=== RUN TestGetKey/WithEmpty
--- PASS: TestGetKey (0.00s)
--- PASS: TestGetKey/Empty (0.00s)
--- PASS: TestGetKey/Single (0.00s)
--- PASS: TestGetKey/Multiple (0.00s)
--- PASS: TestGetKey/WithEmpty (0.00s)
=== RUN TestCopyFile
=== RUN TestCopyFile/Success
=== RUN TestCopyFile/SrcNotExist
=== RUN TestCopyFile/SrcIsNotRegularFile
=== RUN TestCopyFile/DstParentNotExist
--- PASS: TestCopyFile (0.00s)
--- PASS: TestCopyFile/Success (0.00s)
--- PASS: TestCopyFile/SrcNotExist (0.00s)
--- PASS: TestCopyFile/SrcIsNotRegularFile (0.00s)
--- PASS: TestCopyFile/DstParentNotExist (0.00s)
=== RUN TestFileCheck
=== RUN TestFileCheck/RegularFile
=== RUN TestFileCheck/NonExistentFile
=== RUN TestFileCheck/IsDirectory
=== RUN TestFileCheck/SymlinkToFile
=== RUN TestFileCheck/SymlinkToDir
--- PASS: TestFileCheck (0.00s)
--- PASS: TestFileCheck/RegularFile (0.00s)
--- PASS: TestFileCheck/NonExistentFile (0.00s)
--- PASS: TestFileCheck/IsDirectory (0.00s)
--- PASS: TestFileCheck/SymlinkToFile (0.00s)
--- PASS: TestFileCheck/SymlinkToDir (0.00s)
gNSI Pathz Authorization UT Results:
=== RUN TestGnsiPathzPolicyConfigError
--- PASS: TestGnsiPathzPolicyConfigError (0.00s)
=== RUN TestGnsiPathzPolicyChecker
=== RUN TestGnsiPathzPolicyChecker/Undefined_mode
=== RUN TestGnsiPathzPolicyChecker/No_matched_rule
=== RUN TestGnsiPathzPolicyChecker/No_matched_prefix_rule
=== RUN TestGnsiPathzPolicyChecker/Exact_path_match_with_no_key
=== RUN TestGnsiPathzPolicyChecker/Group_match
=== RUN TestGnsiPathzPolicyChecker/Prefix_match
=== RUN TestGnsiPathzPolicyChecker/Root_match
=== RUN TestGnsiPathzPolicyChecker/Root_request
=== RUN TestGnsiPathzPolicyChecker/Wildcard_Key_match
=== RUN TestGnsiPathzPolicyChecker/User_match
=== RUN TestGnsiPathzPolicyChecker/Exact_Key_match
=== RUN TestGnsiPathzPolicyChecker/Deny_overwrites_permit
=== RUN TestGnsiPathzPolicyChecker/Exact_key_match_on_first_key
=== RUN TestGnsiPathzPolicyChecker/Deny_overwrites_permit_in_group
=== RUN TestGnsiPathzPolicyChecker/Multiple_key_match
=== RUN TestGnsiPathzPolicyChecker/Multiple_key_match_wildcard
--- PASS: TestGnsiPathzPolicyChecker (0.00s)
--- PASS: TestGnsiPathzPolicyChecker/Undefined_mode (0.00s)
--- PASS: TestGnsiPathzPolicyChecker/No_matched_rule (0.00s)
--- PASS: TestGnsiPathzPolicyChecker/No_matched_prefix_rule (0.00s)
--- PASS: TestGnsiPathzPolicyChecker/Exact_path_match_with_no_key (0.00s)
--- PASS: TestGnsiPathzPolicyChecker/Group_match (0.00s)
--- PASS: TestGnsiPathzPolicyChecker/Prefix_match (0.00s)
--- PASS: TestGnsiPathzPolicyChecker/Root_match (0.00s)
--- PASS: TestGnsiPathzPolicyChecker/Root_request (0.00s)
--- PASS: TestGnsiPathzPolicyChecker/Wildcard_Key_match (0.00s)
--- PASS: TestGnsiPathzPolicyChecker/User_match (0.00s)
--- PASS: TestGnsiPathzPolicyChecker/Exact_Key_match (0.00s)
--- PASS: TestGnsiPathzPolicyChecker/Deny_overwrites_permit (0.00s)
--- PASS: TestGnsiPathzPolicyChecker/Exact_key_match_on_first_key (0.00s)
--- PASS: TestGnsiPathzPolicyChecker/Deny_overwrites_permit_in_group (0.00s)
--- PASS: TestGnsiPathzPolicyChecker/Multiple_key_match (0.00s)
--- PASS: TestGnsiPathzPolicyChecker/Multiple_key_match_wildcard (0.00s)
=== RUN TestGnsiPathzPolicyNil
=== RUN TestGnsiPathzPolicyNil/Authorize
=== RUN TestGnsiPathzPolicyNil/AuthorizeWithPrefix
=== RUN TestGnsiPathzPolicyNil/UpdatePolicyFromFile
=== RUN TestGnsiPathzPolicyNil/UpdatePolicyFromProto
=== RUN TestGnsiPathzPolicyNil/GetPolicy
=== RUN TestGnsiPathzPolicyNil/insertPath
=== RUN TestGnsiPathzPolicyNil/authorize
=== RUN TestGnsiPathzPolicyNil/updatePermission
--- PASS: TestGnsiPathzPolicyNil (0.00s)
--- PASS: TestGnsiPathzPolicyNil/Authorize (0.00s)
--- PASS: TestGnsiPathzPolicyNil/AuthorizeWithPrefix (0.00s)
--- PASS: TestGnsiPathzPolicyNil/UpdatePolicyFromFile (0.00s)
--- PASS: TestGnsiPathzPolicyNil/UpdatePolicyFromProto (0.00s)
--- PASS: TestGnsiPathzPolicyNil/GetPolicy (0.00s)
--- PASS: TestGnsiPathzPolicyNil/insertPath (0.00s)
--- PASS: TestGnsiPathzPolicyNil/authorize (0.00s)
--- PASS: TestGnsiPathzPolicyNil/updatePermission (0.00s)
Why I did it
How I did it
How to verify it
Which release branch to backport (provide reason below if selected)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)