Skip to content

configure oauth client id per athenz service#3130

Merged
psasidhar merged 1 commit intomasterfrom
svc-client-id
Nov 21, 2025
Merged

configure oauth client id per athenz service#3130
psasidhar merged 1 commit intomasterfrom
svc-client-id

Conversation

@havetisyan
Copy link
Copy Markdown
Collaborator

@havetisyan havetisyan commented Nov 20, 2025

Description

to support autorization grant tokens (jag #3100) the zts server should be registered with the identity provider as a client and such we need to maintain a mapping between those client ids and the corresponding athenz identities. this pr introduced a new system attribute in the service object as client-id. The usage of the client-id in ZTS will be implemented in the next PR.

Contribution Checklist:

  • The pull request does not introduce any breaking changes
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Attach Screenshots (Optional)

Signed-off-by: Henry Avetisyan <hga@yahooinc.com>
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @havetisyan, 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 lays the groundwork for integrating OAuth2 authorization grant tokens within the Athenz ZMS system. It achieves this by introducing a new clientId system attribute to the ServiceIdentity object. This attribute will allow ZTS servers to register as clients with identity providers. The changes span across schema definitions (RDL, Go, Java), database modifications, and the addition of a new CLI command for managing this attribute. While the clientId field is now configurable and stored, its full utilization within ZTS will be addressed in a subsequent pull request.

Highlights

  • OAuth2 Client ID Integration: Introduced a new clientId system attribute to the ServiceIdentity object to support OAuth2 authorization grant tokens.
  • Schema and Model Updates: Modified RDL, Go, and Java client models (ServiceIdentity, ServiceIdentitySystemMeta) to include the new clientId field and its validation.
  • Database Schema Evolution: Added a client_id column to the service table in the ZMS database, including a new SQL migration script.
  • CLI Management: Implemented a new set-service-client-id command in the Go CLI for managing the clientId attribute of services.
  • Core Logic Updates: Updated ZMS core services to correctly process, store, and retrieve the clientId attribute, ensuring it's handled as a system meta attribute.
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

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 introduces a new system attribute clientId for Athenz services to support OAuth integration. The changes are comprehensive, touching the data models in Go and Java, RDL and database schemas, persistence layer, and the command-line interface. The tests have been updated to cover the new functionality. My review has identified a critical issue regarding a large number of unrelated test changes that should be moved to a separate pull request. Additionally, I've provided a couple of medium-severity suggestions to improve code consistency and maintainability.

@psasidhar psasidhar merged commit d9ef88f into master Nov 21, 2025
8 checks passed
@psasidhar psasidhar deleted the svc-client-id branch November 21, 2025 23:41
jeffreytolar added a commit to jeffreytolar/terraform-provider-athenz that referenced this pull request Jan 22, 2026
Updates the expected test results to include two new fields added in ZMS:
- awsAccountName: Added to domain attributes in AthenZ/athenz#3171
- clientId: Added to service identity in AthenZ/athenz#3130
jeffreytolar added a commit to jeffreytolar/terraform-provider-athenz that referenced this pull request Jan 22, 2026
Updates the expected test results to include two new fields added in ZMS:
- awsAccountName: Added to domain attributes in AthenZ/athenz#3171
- clientId: Added to service identity in AthenZ/athenz#3130

Signed-off-by: Jeffrey Tolar <tolar@yahooinc.com>
havetisyan pushed a commit to AthenZ/terraform-provider-athenz that referenced this pull request Jan 29, 2026
* Add on_call field to athenz_domain_meta resource

Signed-off-by: Jeffrey Tolar <tolar@yahooinc.com>

* Update golden system test results with new domain and service fields

Updates the expected test results to include two new fields added in ZMS:
- awsAccountName: Added to domain attributes in AthenZ/athenz#3171
- clientId: Added to service identity in AthenZ/athenz#3130

Signed-off-by: Jeffrey Tolar <tolar@yahooinc.com>

---------

Signed-off-by: Jeffrey Tolar <tolar@yahooinc.com>
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.

2 participants