Repository navigation
e2e: add up test --e2e harness (Azure workload identity via Upbound OIDC) - #147
Merged
Merged
Conversation
…IDC) Queries the e2e app's own service principal (ServicePrincipalDetails) with AzureWorkloadIdentityCredentials, exchanging the function pod's Upbound OIDC token. Needs Microsoft Graph Application.Read.All with admin consent on the solutions-e2e-function Entra app.
A service principal can read its own details without any Graph permission, so the e2e app needs no admin consent (CI e2e passed without it, and the XR status held the real service principal). The XRD now requires at least one entry in status.servicePrincipals, so a lookup that finds nothing fails the test instead of passing (verified with a nonexistent name).
jakubramut
approved these changes
Nov 24, 2026
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.
Adds an
e2e/harness for the shared e2e workflow (synced from upbound/sa-up), following upbound/function-azresourcegraph#167.e2e/apis/xqueries/: XRD + Composition that run one read-only Graph query,ServicePrincipalDetailsfor the e2e app's own service principal, withidentity.type: AzureWorkloadIdentityCredentials.e2e/upbound.yaml: depends onsolutions/function-msgraph; CI pins@FUNCTION_VERSION@to the dev tag built from the PR.e2e/tests/e2etest-queries/test.yaml: sets the Upbound OIDC audienceapi://AzureADTokenExchangeon the default DeploymentRuntimeConfig and creates the identity Secret (client ID, tenant ID, token path; nothing secret), then waits for the XQuery to go Ready.No Azure secrets in CI: the function exchanges its pod's Upbound OIDC token through a federated credential on the
solutions-e2e-functionEntra app (shared with function-azresourcegraph).e2e/README.mddocuments the setup.No Graph permission needed. A service principal can read its own details without any Graph permission (Microsoft docs, List servicePrincipals → "Permissions for specific scenarios"), so the app has no admin consent and no requested permissions. The CI e2e passed that way, and a local run with the CI build showed
status.servicePrincipalsholding the real service principal.Empty results fail. A lookup that finds nothing returns an empty list, not an error, so the XRD requires
minItems: 1onstatus.servicePrincipals: the status write is rejected and the XR never goes Ready. Verified locally: with a nonexistent name the test fails withstatus.servicePrincipals: ... should have at least 1 items.