Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 17, 2025

Summary

Replace hardcoded Azure OIDC audience value (api://AzureADTokenExchange) with Elastic-specific audience (ElasticCloudConnector) in ARM templates for cloud connectors. This aligns the configuration with ElasticCloudConnector usage and improves security by using a more specific audience claim.

Changes

Updated the audiences array in the federated identity credentials configuration for both single-account and organization-account ARM templates:

Before:

"audiences": [
    "api://AzureADTokenExchange"
]

After:

"audiences": [
    "ElasticCloudConnector"
]

Files Modified

  • deploy/azure/ARM-for-cloud-connectors-single-account.json
  • deploy/azure/ARM-for-cloud-connectors-organization-account.json

Rationale

The previous value api://AzureADTokenExchange is the default Azure audience for OIDC token exchange. Using a more specific audience value like ElasticCloudConnector provides better security by ensuring tokens are explicitly intended for Elastic Cloud Connector usage, preventing potential token misuse across different systems.

Original prompt

Replace every occurrence of the OIDC audience string "api://AzureADTokenExchange" with "ElasticCloudConnector" in the repository.

Files to change (confirmed from code search):

  • deploy/azure/ARM-for-cloud-connectors-single-account.json

    • Replace the audiences array value:
      • "api://AzureADTokenExchange" -> "ElasticCloudConnector"
  • deploy/azure/ARM-for-cloud-connectors-organization-account.json

    • Replace the audiences array value:
      • "api://AzureADTokenExchange" -> "ElasticCloudConnector"

Notes:

  • The search may be incomplete. The PR should include these replacements and any other occurrences found in the repo.
  • Create a new branch named: copilot/update-oidc-audience-default
  • Commit message: "Update OIDC audience to ElasticCloudConnector"
  • Open a pull request with title: "Update OIDC audience default to ElasticCloudConnector"
  • PR description: "Replace hardcoded Azure OIDC audience value (api://AzureADTokenExchange) with Elastic-specific audience (ElasticCloudConnector) in ARM templates and other relevant files. This aligns configuration with ElasticCloudConnector usage."

Repository: elastic/cloudbeat

This pull request was created as a result of the following prompt from Copilot chat.

Replace every occurrence of the OIDC audience string "api://AzureADTokenExchange" with "ElasticCloudConnector" in the repository.

Files to change (confirmed from code search):

  • deploy/azure/ARM-for-cloud-connectors-single-account.json

    • Replace the audiences array value:
      • "api://AzureADTokenExchange" -> "ElasticCloudConnector"
  • deploy/azure/ARM-for-cloud-connectors-organization-account.json

    • Replace the audiences array value:
      • "api://AzureADTokenExchange" -> "ElasticCloudConnector"

Notes:

  • The search may be incomplete. The PR should include these replacements and any other occurrences found in the repo.
  • Create a new branch named: copilot/update-oidc-audience-default
  • Commit message: "Update OIDC audience to ElasticCloudConnector"
  • Open a pull request with title: "Update OIDC audience default to ElasticCloudConnector"
  • PR description: "Replace hardcoded Azure OIDC audience value (api://AzureADTokenExchange) with Elastic-specific audience (ElasticCloudConnector) in ARM templates and other relevant files. This aligns configuration with ElasticCloudConnector usage."

Repository: elastic/cloudbeat


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@mergify
Copy link

mergify bot commented Oct 17, 2025

This pull request does not have a backport label. Could you fix it @Copilot? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

Copilot AI changed the title [WIP] Update OIDC audience default to ElasticCloudConnector Update OIDC audience default to ElasticCloudConnector Oct 17, 2025
Copilot AI requested a review from jeniawhite October 17, 2025 22:32
Copilot finished work on behalf of jeniawhite October 17, 2025 22:32
@jeniawhite jeniawhite marked this pull request as ready for review October 20, 2025 20:03
@jeniawhite jeniawhite requested a review from a team as a code owner October 20, 2025 20:03
@jeniawhite
Copy link
Contributor

@jeniawhite jeniawhite merged commit 5c35455 into main Oct 23, 2025
14 checks passed
@jeniawhite jeniawhite deleted the copilot/update-oidc-audience-default-again branch October 23, 2025 13:09
mergify bot pushed a commit that referenced this pull request Oct 23, 2025
## Summary

Replace hardcoded Azure OIDC audience value
(`api://AzureADTokenExchange`) with Elastic-specific audience
(`ElasticCloudConnector`) in ARM templates for cloud connectors. This
aligns the configuration with ElasticCloudConnector usage and improves
security by using a more specific audience claim.

## Changes

Updated the `audiences` array in the federated identity credentials
configuration for both single-account and organization-account ARM
templates:

**Before:**
```json
"audiences": [
    "api://AzureADTokenExchange"
]
```

**After:**
```json
"audiences": [
    "ElasticCloudConnector"
]
```

## Files Modified

- `deploy/azure/ARM-for-cloud-connectors-single-account.json`
- `deploy/azure/ARM-for-cloud-connectors-organization-account.json`

## Rationale

The previous value `api://AzureADTokenExchange` is the default Azure
audience for OIDC token exchange. Using a more specific audience value
like `ElasticCloudConnector` provides better security by ensuring tokens
are explicitly intended for Elastic Cloud Connector usage, preventing
potential token misuse across different systems.

<!-- START COPILOT CODING AGENT SUFFIX -->

<details>

<summary>Original prompt</summary>

> Replace every occurrence of the OIDC audience string
"api://AzureADTokenExchange" with "ElasticCloudConnector" in the
repository.
>
> Files to change (confirmed from code search):
> - deploy/azure/ARM-for-cloud-connectors-single-account.json
>   - Replace the audiences array value:
>     - "api://AzureADTokenExchange" -> "ElasticCloudConnector"
>
> - deploy/azure/ARM-for-cloud-connectors-organization-account.json
>   - Replace the audiences array value:
>     - "api://AzureADTokenExchange" -> "ElasticCloudConnector"
>
> Notes:
> - The search may be incomplete. The PR should include these
replacements and any other occurrences found in the repo.
> - Create a new branch named: copilot/update-oidc-audience-default
> - Commit message: "Update OIDC audience to ElasticCloudConnector"
> - Open a pull request with title: "Update OIDC audience default to
ElasticCloudConnector"
> - PR description: "Replace hardcoded Azure OIDC audience value
(api://AzureADTokenExchange) with Elastic-specific audience
(ElasticCloudConnector) in ARM templates and other relevant files. This
aligns configuration with ElasticCloudConnector usage."
>
> Repository: elastic/cloudbeat

</details>

*This pull request was created as a result of the following prompt from
Copilot chat.*
> Replace every occurrence of the OIDC audience string
"api://AzureADTokenExchange" with "ElasticCloudConnector" in the
repository.
>
> Files to change (confirmed from code search):
> - deploy/azure/ARM-for-cloud-connectors-single-account.json
>   - Replace the audiences array value:
>     - "api://AzureADTokenExchange" -> "ElasticCloudConnector"
>
> - deploy/azure/ARM-for-cloud-connectors-organization-account.json
>   - Replace the audiences array value:
>     - "api://AzureADTokenExchange" -> "ElasticCloudConnector"
>
> Notes:
> - The search may be incomplete. The PR should include these
replacements and any other occurrences found in the repo.
> - Create a new branch named: copilot/update-oidc-audience-default
> - Commit message: "Update OIDC audience to ElasticCloudConnector"
> - Open a pull request with title: "Update OIDC audience default to
ElasticCloudConnector"
> - PR description: "Replace hardcoded Azure OIDC audience value
(api://AzureADTokenExchange) with Elastic-specific audience
(ElasticCloudConnector) in ARM templates and other relevant files. This
aligns configuration with ElasticCloudConnector usage."
>
> Repository: elastic/cloudbeat

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: jeniawhite <[email protected]>
Co-authored-by: Evgeniy Belyi <[email protected]>
(cherry picked from commit 5c35455)
jeniawhite added a commit that referenced this pull request Oct 23, 2025
…nector (#3659)

## Summary

Replace hardcoded Azure OIDC audience value
(`api://AzureADTokenExchange`) with Elastic-specific audience
(`ElasticCloudConnector`) in ARM templates for cloud connectors. This
aligns the configuration with ElasticCloudConnector usage and improves
security by using a more specific audience claim.

## Changes

Updated the `audiences` array in the federated identity credentials
configuration for both single-account and organization-account ARM
templates:

**Before:**
```json
"audiences": [
    "api://AzureADTokenExchange"
]
```

**After:**
```json
"audiences": [
    "ElasticCloudConnector"
]
```

## Files Modified

- `deploy/azure/ARM-for-cloud-connectors-single-account.json`
- `deploy/azure/ARM-for-cloud-connectors-organization-account.json`

## Rationale

The previous value `api://AzureADTokenExchange` is the default Azure
audience for OIDC token exchange. Using a more specific audience value
like `ElasticCloudConnector` provides better security by ensuring tokens
are explicitly intended for Elastic Cloud Connector usage, preventing
potential token misuse across different systems.





<details>

<summary>Original prompt</summary>

> Replace every occurrence of the OIDC audience string
"api://AzureADTokenExchange" with "ElasticCloudConnector" in the
repository.
> 
> Files to change (confirmed from code search):
> - deploy/azure/ARM-for-cloud-connectors-single-account.json
>   - Replace the audiences array value:
>     - "api://AzureADTokenExchange" -> "ElasticCloudConnector"
> 
> - deploy/azure/ARM-for-cloud-connectors-organization-account.json
>   - Replace the audiences array value:
>     - "api://AzureADTokenExchange" -> "ElasticCloudConnector"
> 
> Notes:
> - The search may be incomplete. The PR should include these
replacements and any other occurrences found in the repo.
> - Create a new branch named: copilot/update-oidc-audience-default
> - Commit message: "Update OIDC audience to ElasticCloudConnector"
> - Open a pull request with title: "Update OIDC audience default to
ElasticCloudConnector"
> - PR description: "Replace hardcoded Azure OIDC audience value
(api://AzureADTokenExchange) with Elastic-specific audience
(ElasticCloudConnector) in ARM templates and other relevant files. This
aligns configuration with ElasticCloudConnector usage."
> 
> Repository: elastic/cloudbeat


</details>

*This pull request was created as a result of the following prompt from
Copilot chat.*
> Replace every occurrence of the OIDC audience string
"api://AzureADTokenExchange" with "ElasticCloudConnector" in the
repository.
> 
> Files to change (confirmed from code search):
> - deploy/azure/ARM-for-cloud-connectors-single-account.json
>   - Replace the audiences array value:
>     - "api://AzureADTokenExchange" -> "ElasticCloudConnector"
> 
> - deploy/azure/ARM-for-cloud-connectors-organization-account.json
>   - Replace the audiences array value:
>     - "api://AzureADTokenExchange" -> "ElasticCloudConnector"
> 
> Notes:
> - The search may be incomplete. The PR should include these
replacements and any other occurrences found in the repo.
> - Create a new branch named: copilot/update-oidc-audience-default
> - Commit message: "Update OIDC audience to ElasticCloudConnector"
> - Open a pull request with title: "Update OIDC audience default to
ElasticCloudConnector"
> - PR description: "Replace hardcoded Azure OIDC audience value
(api://AzureADTokenExchange) with Elastic-specific audience
(ElasticCloudConnector) in ARM templates and other relevant files. This
aligns configuration with ElasticCloudConnector usage."
> 
> Repository: elastic/cloudbeat


---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.<hr>This is
an automatic backport of pull request #3654 done by
[Mergify](https://mergify.com).

Co-authored-by: Copilot <[email protected]>
Co-authored-by: jeniawhite <[email protected]>
Co-authored-by: Evgeniy Belyi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants