Skip to content

Add AzureUMIMediator support for UMI auth in AI API endpoint seq template#14203

Open
chira99 wants to merge 1 commit into
wso2:masterfrom
chira99:master
Open

Add AzureUMIMediator support for UMI auth in AI API endpoint seq template#14203
chira99 wants to merge 1 commit into
wso2:masterfrom
chira99:master

Conversation

@chira99

@chira99 chira99 commented May 17, 2026

Copy link
Copy Markdown
Contributor

Description

Adds the update artifact file for the Velocity template ai_api_endpoints_seq_template.xml that generates Synapse endpoint sequences to inject AzureUMIMediator when the endpoint authentication type is umi.

Related Issue

What's changed

  • Added a conditional block in the endpoint sequence template: when
    endpoint.authenticationType is umi (case-insensitive), the
    org.wso2.carbon.apimgt.gateway.mediators.AzureUMIMediator class mediator is inserted
    into the generated sequence
  • The mediator acquires an Azure Workload Identity Bearer token and injects it as the
    Authorization header on every outbound request to the backend

Backward compatibility

The new block is fully conditional — existing apikey, aws, and none authentication
types are unaffected.

@coderabbitai

coderabbitai Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds Azure User Managed Identity (UMI) authentication support to API endpoint templates across two distribution modules. Both ai_api_endpoints_seq_template.xml files now include a new authentication-type branch that instantiates AzureUMIMediator when endpoints specify umi/UMI authentication, with corrected conditional block closure.

Changes

Azure UMI Authentication Support

Layer / File(s) Summary
UMI authentication mediator in both distribution templates
all-in-one-apim/modules/distribution/resources/api_templates/ai_api_endpoints_seq_template.xml, api-control-plane/modules/distribution/resources/api_templates/ai_api_endpoints_seq_template.xml
Both templates now close the prior APIKEY authentication conditional and introduce a new case-insensitive umi authentication-type branch that renders org.wso2.carbon.apimgt.gateway.mediators.AzureUMIMediator.

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding AzureUMIMediator support for UMI authentication in the AI API endpoint sequence template, which aligns directly with the changeset modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The pull request description clearly explains the changes: adding AzureUMIMediator support for UMI authentication in the endpoint sequence template with full backward compatibility.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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