Uami oauth2#439
Merged
Justin Wang (Claimundefine) merged 2 commits intomasterfrom Mar 3, 2026
Merged
Conversation
There was a problem hiding this comment.
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_IMDSas 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.
|
Tobi Ogunbi (tobiogunbi)
approved these changes
Feb 18, 2026
Member
Tobi Ogunbi (tobiogunbi)
left a comment
There was a problem hiding this comment.
LGTM. Naxin Fang (@fangnx) for supplementary review
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.


Please prefix all TypeScript pull-requests with
[Typescript]What
Add UAMI OAuth for Schema Registry
Checklist
References
JIRA:
Test & Review
Open questions / Follow-ups