Skip to content

e2e: add up test --e2e harness (Azure workload identity via Upbound OIDC) - #147

Merged
kaessert merged 3 commits into
mainfrom
feat/e2e-harness
Nov 24, 2026
Merged

kaessert merged 3 commits into
mainfrom
feat/e2e-harness

Conversation

@kaessert

@kaessert kaessert commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

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, ServicePrincipalDetails for the e2e app's own service principal, with identity.type: AzureWorkloadIdentityCredentials.
  • e2e/upbound.yaml: depends on solutions/function-msgraph; CI pins @FUNCTION_VERSION@ to the dev tag built from the PR.
  • e2e/tests/e2etest-queries/test.yaml: sets the Upbound OIDC audience api://AzureADTokenExchange on 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-function Entra app (shared with function-azresourcegraph). e2e/README.md documents 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.servicePrincipals holding the real service principal.

Empty results fail. A lookup that finds nothing returns an empty list, not an error, so the XRD requires minItems: 1 on status.servicePrincipals: the status write is rejected and the XR never goes Ready. Verified locally: with a nonexistent name the test fails with status.servicePrincipals: ... should have at least 1 items.

…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).
@kaessert
kaessert merged commit 12ea6e0 into main Nov 24, 2026
9 checks passed
@kaessert
kaessert deleted the feat/e2e-harness branch November 24, 2026 16:43
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.

2 participants