Skip to content

Acctz fixes and additional logging#5309

Open
dipchauh wants to merge 2 commits intoopenconfig:mainfrom
nokia:acctz
Open

Acctz fixes and additional logging#5309
dipchauh wants to merge 2 commits intoopenconfig:mainfrom
nokia:acctz

Conversation

@dipchauh
Copy link
Copy Markdown
Contributor

@dipchauh dipchauh commented Apr 7, 2026

  • Used correct password variable for gRPC requests for failUser
  • Removed admin role for failUser (since authorization expected to fail for this user)
  • Additional checks for RPC code permission denied for failed RPCs
  • Moved PrettyPrint function to common acctz library and added more logging for rpc requests

"This code is a Contribution to the OpenConfig Feature Profiles project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0. No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind."

"This code is a Contribution to the OpenConfig Feature Profiles project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0. No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind."
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request improves the robustness and observability of the acctz library and its associated tests. By centralizing logging utilities and refining how gRPC error states are validated, the changes ensure more consistent behavior and better debugging capabilities for authentication and authorization test scenarios.

Highlights

  • Library Refactoring: Moved the PrettyPrint utility function to the common acctz library to centralize logging functionality.
  • Enhanced Logging: Added comprehensive logging for gRPC requests and responses across tests and the acctz library.
  • Test Fixes: Corrected password variable usage for gRPC requests, removed unnecessary admin roles for failUser, and added explicit checks for PermissionDenied gRPC status codes.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@OpenConfigBot
Copy link
Copy Markdown

OpenConfigBot commented Apr 7, 2026

Pull Request Functional Test Report for #5309 / 1eda120

Virtual Devices

Device Test Test Documentation Job Raw Log
Arista cEOS status
status
status
status
status
ACCTZ-3.1: Record Subscribe Non-gRPC
ACCTZ-2.1: Record Subscribe Partial
ACCTZ-4.1: Record History Truncation
ACCTZ-4.2: Record Payload Truncation
ACCTZ-1.1: Record Subscribe Full
Cisco 8000E status
status
status
status
status
ACCTZ-3.1: Record Subscribe Non-gRPC
ACCTZ-2.1: Record Subscribe Partial
ACCTZ-4.1: Record History Truncation
ACCTZ-4.2: Record Payload Truncation
ACCTZ-1.1: Record Subscribe Full
Cisco XRd status
status
status
status
status
ACCTZ-3.1: Record Subscribe Non-gRPC
ACCTZ-2.1: Record Subscribe Partial
ACCTZ-4.1: Record History Truncation
ACCTZ-4.2: Record Payload Truncation
ACCTZ-1.1: Record Subscribe Full
Juniper ncPTX status
status
status
status
status
ACCTZ-3.1: Record Subscribe Non-gRPC
ACCTZ-2.1: Record Subscribe Partial
ACCTZ-4.1: Record History Truncation
ACCTZ-4.2: Record Payload Truncation
ACCTZ-1.1: Record Subscribe Full
Nokia SR Linux status
status
status
status
status
ACCTZ-3.1: Record Subscribe Non-gRPC
ACCTZ-2.1: Record Subscribe Partial
ACCTZ-4.1: Record History Truncation
ACCTZ-4.2: Record Payload Truncation
ACCTZ-1.1: Record Subscribe Full
Openconfig Lemming status
status
status
status
status
ACCTZ-3.1: Record Subscribe Non-gRPC
ACCTZ-2.1: Record Subscribe Partial
ACCTZ-4.1: Record History Truncation
ACCTZ-4.2: Record Payload Truncation
ACCTZ-1.1: Record Subscribe Full

Hardware Devices

Device Test Test Documentation Raw Log
Arista 7808 status
status
status
status
status
ACCTZ-3.1: Record Subscribe Non-gRPC
ACCTZ-2.1: Record Subscribe Partial
ACCTZ-4.1: Record History Truncation
ACCTZ-4.2: Record Payload Truncation
ACCTZ-1.1: Record Subscribe Full
Cisco 8808 status
status
status
status
status
ACCTZ-3.1: Record Subscribe Non-gRPC
ACCTZ-2.1: Record Subscribe Partial
ACCTZ-4.1: Record History Truncation
ACCTZ-4.2: Record Payload Truncation
ACCTZ-1.1: Record Subscribe Full
Juniper PTX10008 status
status
status
status
status
ACCTZ-3.1: Record Subscribe Non-gRPC
ACCTZ-2.1: Record Subscribe Partial
ACCTZ-4.1: Record History Truncation
ACCTZ-4.2: Record Payload Truncation
ACCTZ-1.1: Record Subscribe Full
Nokia 7250 IXR-10e status
status
status
status
status
ACCTZ-3.1: Record Subscribe Non-gRPC
ACCTZ-2.1: Record Subscribe Partial
ACCTZ-4.1: Record History Truncation
ACCTZ-4.2: Record Payload Truncation
ACCTZ-1.1: Record Subscribe Full

Help

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request centralizes the PrettyPrint utility function within the internal/security/acctz package and updates various acctz tests to use it, removing local redundant implementations. It also refactors error handling across several RPC test functions to specifically check for codes.PermissionDenied and updates logging to reflect permission-based failures. Feedback includes removing a redundant Capabilities call in SendGnmiRPCs, correcting a typo in a P4RT log message, and consistently using t.Errorf instead of t.Logf for reporting unexpected successes in negative tests to ensure proper test failure reporting.

Comment thread internal/security/acctz/acctz.go Outdated
Comment thread internal/security/acctz/acctz.go Outdated
Comment thread internal/security/acctz/acctz.go Outdated
Comment thread internal/security/acctz/acctz.go Outdated
@dipchauh dipchauh changed the title Acctz library fixes and additional logging Acctz fixes and additional logging Apr 7, 2026
"This code is a Contribution to the OpenConfig Feature Profiles project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0. No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind."
@dipchauh dipchauh marked this pull request as ready for review April 7, 2026 01:18
@dipchauh dipchauh requested review from a team as code owners April 7, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants