Skip to content

Uami oauth2#439

Merged
Justin Wang (Claimundefine) merged 2 commits intomasterfrom
uami_oauth2
Mar 3, 2026
Merged

Uami oauth2#439
Justin Wang (Claimundefine) merged 2 commits intomasterfrom
uami_oauth2

Conversation

@Claimundefine
Copy link
Copy Markdown
Contributor

Please prefix all TypeScript pull-requests with [Typescript]

What

Add UAMI OAuth for Schema Registry

Checklist

  • [ X] Contains customer facing changes? Including API/behavior changes
  • [ X] Did you add sufficient unit test and/or integration test coverage for this PR?
    • If not, please explain why it is not required

References

JIRA:

Test & Review

Open questions / Follow-ups

@Claimundefine Justin Wang (Claimundefine) requested a review from a team as a code owner February 3, 2026 20:36
Copilot AI review requested due to automatic review settings February 3, 2026 20:36
@Claimundefine Justin Wang (Claimundefine) requested a review from a team as a code owner February 3, 2026 20:36
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds User Assigned Managed Identity (UAMI) OAuth2 authentication support for Azure environments in the Schema Registry client. The implementation introduces a new credential source type and refactors the existing OAuth client architecture using a builder pattern and abstract classes to support multiple authentication providers.

Changes:

  • Introduced OAUTHBEARER_AZURE_IMDS as a new credential source type for Azure IMDS-based authentication
  • Refactored OAuth client architecture to use builder pattern with abstract base classes for extensibility
  • Added new Azure IMDS OAuth client implementation with token refresh logic based on expiration percentage

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
schemaregistry/rest-service.ts Refactored authentication initialization to use builder pattern with a registry of token provider builders
schemaregistry/oauth/oauth-client.ts Refactored existing OAuth client to extend abstract classes and use builder pattern
schemaregistry/oauth/oauth-client-azure-imds.ts Added new Azure IMDS OAuth client implementation with metadata service integration
schemaregistry/oauth/static-token-provider.ts Extracted static token provider into separate file using builder pattern
schemaregistry/oauth/abstract-oauth-client.ts Added abstract base classes for token providers with shared retry logic
schemaregistry/oauth/bearer-token-provider.ts Defined interfaces for token provider and builder pattern
schemaregistry/test/oauth-client.spec.ts Updated tests to use refactored OAuth client with bearer credentials object
schemaregistry/test/oauth-client-azure-imds.spec.ts Added comprehensive test suite for Azure IMDS OAuth client
schemaregistry-examples/src/uami-oauth-schemaregistry.ts Added example demonstrating UAMI authentication usage
schemaregistry-examples/src/kafka-oauth.ts Added example function for Kafka producer with Azure IMDS authentication
schemaregistry-examples/src/constants.ts Added Azure IMDS query parameter constant for examples
schemaregistry-examples/package.json Moved schemaregistry dependency from devDependencies to dependencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqube-confluent
Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
69.4% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

Copy link
Copy Markdown
Member

@tobiogunbi Tobi Ogunbi (tobiogunbi) left a comment

Choose a reason for hiding this comment

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

LGTM. Naxin Fang (@fangnx) for supplementary review

@Claimundefine Justin Wang (Claimundefine) merged commit dd86648 into master Mar 3, 2026
7 of 9 checks passed
@Claimundefine Justin Wang (Claimundefine) deleted the uami_oauth2 branch March 3, 2026 06:53
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