Install ExiQO Migrate on GM Financial's AKS
This guide takes a platform engineer from an empty namespace to a working install in GM Financial's own Azure tenant. It describes what the chart, the Terraform and the pipelines in this repository actually do. Two companion guides cover the rest:
DEPLOY-STEP-SECRETS.md: the identities the Deploy step uses to plan infrastructure in target subscriptions.RUNBOOK.md: day-two operations (scaling, stuck jobs, backups, rotation, upgrades).
The pieces:
| Piece | Where | What it is |
|---|---|---|
| Chart | deploy/helm/exiqo | api, web and worker Deployments, Neo4j, NetworkPolicies, the migration hook |
| Prerequisites (optional) | deploy/azure | Terraform for ACR, Key Vault, identities, Postgres, Azure Files, backup storage. Reference: deploy/azure/README.md |
| Release pipelines | deploy/pipelines | build, scan, sign, deploy for Azure DevOps and GitHub Actions |
| Images | deploy/docker | the two Dockerfiles, and deploy/docker/compose.pilot.yml for a single-VM pilot (not covered here; its header lists its secrets) |
Conventions: one install per namespace. Resource names are fixed (exiqo-api, exiqo-worker,
exiqo-migrate, exiqo-neo4j), whatever the Helm release is called, because the Workload Identity
federated credentials name the service accounts. Examples use the namespace exiqo and the
release name exiqo.
Dry run first. The signing path (cosign with a Key Vault key) and the Helm deploy with Entra sign-in to AKS were verified by tests and rendering only, never against a real Azure tenant. Run the whole procedure once in a non-production namespace and subscription before the first production install, and expect to adjust names, firewall rules and role assignments.
1. Prerequisites checklist
On the AKS cluster:
-
OIDC issuer and Workload Identity enabled. Read the issuer URL for the federated credentials:
az aks update -g <aks-rg> -n <aks> --enable-oidc-issuer --enable-workload-identity az aks show -g <aks-rg> -n <aks> --query oidcIssuerProfile.issuerUrl -o tsv -
The Secrets Store CSI driver with the Azure Key Vault provider (the AKS add-on
azure-keyvault-secrets-provider). The chart relies on its secret sync (secretObjects) for the Neo4j password, so the add-on's default (sync on) must stay on. -
The Azure Files CSI driver (an AKS default) and the
managed-csi-premiumStorageClass (the Neo4j volume; changeneo4j.volumes.data.dynamic.storageClassNameif GMF uses another). -
An ingress controller.
ingress-nginxin the namespaceingress-nginxworks as is (networkPolicy.ingressNamespaces). With Application Gateway (AGIC), setingress.classNameand the annotations shown invalues.yaml, and put the gateway subnet innetworkPolicy.ingressCidrs. -
etcd encryption at rest with a customer-managed key (KMS). The Neo4j initial password is synced into a Kubernetes Secret and therefore lives in etcd.
-
A way to run
helm3.16 andkubectlagainst the cluster, and an identity allowed to install into the namespace. See the deployer's role in section 7.
In the subscription (create with deploy/azure or bring your own):
- Azure Container Registry for the images.
- Key Vault in RBAC mode, reachable from the cluster (private endpoint or firewall rule).
- PostgreSQL flexible server 16 with the
VECTORextension allow-listed (azure.extensions), databasesexiqoandexiqo_test, and an administrator login that may create extensions and databases (the parity step creates oneexiqo_scn_<project>_testdatabase per project). - An Azure Files Premium share for
DATA_DIR(uploads and generated solutions). - A Blob container for Neo4j dumps (section 9): the backup is on by default, since Neo4j holds the project memory.
- A model route: an Azure OpenAI resource with deployments for the strong, standard and efficient
tiers, and/or a Microsoft Foundry resource with Claude deployments (for example
claude-opus-5-5,claude-sonnet-5-5,claude-haiku-5-5), created with the Hosted on Azure version of each model. Claude on Foundry needs the Azure Marketplace terms accepted once and quota in a supported region; see "Claude on Microsoft Foundry" in section 6. - A DNS name for the ingress host and a TLS certificate as a Secret in the namespace
(
ingress.tlsSecretName). - Rights to create an Entra app registration and groups (section 3).
Terraform for most of this is in deploy/azure; read deploy/azure/README.md for the switches,
the role assignments it makes, and the helm_values output it produces. In short:
cd deploy/azure
cp gmf.example.tfvars gmf.tfvars # GMF's names and ids
terraform init -backend-config=... # see the README for the backend settings
terraform plan -var-file=gmf.tfvars -out=prereqs.plan && terraform apply prereqs.plan
terraform output -json helm_values > values.azure.json
Two cautions from that README: the PostgreSQL password is generated by Terraform and written to
Key Vault, so the Terraform state contains it (keep the state container private and encrypted);
and the AKS cluster identity needs Storage Account Contributor on the data account (the README
lists the variable that grants it) because the Azure Files CSI driver reads the account key.
make azure-validate checks the Terraform without Azure credentials.
Network facts to settle with GMF's network team now:
- The platform pods (api, worker, migration hook) need egress to Postgres (5432), Key Vault, Entra
ID, Azure Resource Manager, Azure OpenAI and/or Foundry, and GMF's package mirrors. The chart's NetworkPolicies
restrict by address and port; host names are enforced by GMF's Azure Firewall or egress gateway.
egress.fqdnslists the names to allow (section 6). - Nothing else is allowed. Claude on Foundry stays off unless
providers.foundry.enabledis true, and then only GMF's own Foundry host (<resource>.services.ai.azure.com) is added to the firewall; the platform makes no call to Anthropic. The direct Claude provider (providers.claude.enabled, hosts*.anthropic.com) is a separate, off-by-default route that is not used with Foundry.
Without Terraform: the platform identity and its grants
If you skip deploy/azure (or its enable_identities switch), create these by hand before the
first helm upgrade. The pre-install hook mounts Key Vault with the exiqo-migrate account, so
its credential must exist before the hook runs.
-
The user-assigned managed identity
exiqo-platform. Its client ID isidentity.platformClientId.az identity create -g <identity-rg> -n exiqo-platform az identity show -g <identity-rg> -n exiqo-platform --query '{clientId:clientId, principalId:principalId}' -
A federated credential on it for every service account that uses it. The issuer is the cluster's OIDC issuer URL, the audience
api://AzureADTokenExchange, and each subject is exact (system:serviceaccount:<namespace>:<account>):Service account Used by exiqo-apiapi pods exiqo-workerworker pods exiqo-migratethe migration hook Job exiqo-neo4jthe Neo4j pod (it mounts the Key Vault object exiqo-neo4j-auth); only withneo4j.enabledexiqo-neo4j-backupthe backup CronJob; only with neo4jBackup.enabled, and unlessidentity.backupClientIdnames another identityissuer="$(az aks show -g <aks-rg> -n <aks> --query oidcIssuerProfile.issuerUrl -o tsv)" for sa in exiqo-api exiqo-worker exiqo-migrate exiqo-neo4j; do az identity federated-credential create -g <identity-rg> --identity-name exiqo-platform \ --name "$sa-exiqo" --issuer "$issuer" --subject "system:serviceaccount:exiqo:$sa" \ --audiences api://AzureADTokenExchange doneThe web pod uses no identity. Each deploy identity gets a credential for
exiqo-workeronly (DEPLOY-STEP-SECRETS.md). The chart's install notes print the same list for your values. -
Key Vault Secrets User for
exiqo-platformon the vault (keyVault.name). -
AcrPull for the cluster's kubelet identity on the registry.
-
Cognitive Services User for
exiqo-platformon the Foundry resource, whenproviders.foundry.authismanaged_identity(Foundry User also works). The Terraform path grants this only whenfoundry_account_idis set, so check it there too. -
Cognitive Services OpenAI User for
exiqo-platformon the Azure OpenAI account, whenproviders.azureOpenAI.authismanaged_identity. The Terraform path grants this only whenazure_openai_account_idis set, so check it there too. -
With the Neo4j backup on: Storage Blob Data Contributor on the backup container for the backup identity (
identity.backupClientId, defaultexiqo-platform).
pid="$(az identity show -g <identity-rg> -n exiqo-platform --query principalId -o tsv)"
az role assignment create --assignee-object-id "$pid" --assignee-principal-type ServicePrincipal \
--role "Key Vault Secrets User" --scope <key vault resource id>
az role assignment create --assignee-object-id "$pid" --assignee-principal-type ServicePrincipal \
--role "Cognitive Services OpenAI User" --scope <azure openai resource id>
2. Mirror images and toolchains
Images
The cluster pulls images by digest only (the schema rejects tags). Four images are involved:
| Image | Values key | Source |
|---|---|---|
| ExiQO platform (api, worker, migration) | image.platform.repository, image.platform.digest | built from deploy/docker/platform.Dockerfile |
| ExiQO web | image.web.repository, image.web.digest | built from deploy/docker/web.Dockerfile |
| Neo4j | neo4j.image.customImage | docker.io/library/neo4j:5.26.32@sha256:... in values.yaml |
| Azure CLI (Neo4j backup only) | neo4jBackup.azureCliImage | mcr.microsoft.com/azure-cli:...@sha256:... in values.yaml |
Point all four at GM Financial's registry. For Neo4j and the Azure CLI image, import the pinned
image into the registry and override the key with the mirror's reference plus the same digest (a
digest is the same whichever registry serves it). The Neo4j Helm chart (a subchart, pinned in
Chart.lock) is fetched from https://helm.neo4j.com/neo4j at build time of the chart's
dependencies. Chart.yaml names that repository by URL, so helm repo add of a mirror does not
redirect helm dependency build: mirror the chart and pull it from the mirror yourself, as
deploy/pipelines/release.sh does with NEO4J_CHART_REPOSITORY (section 7 has the commands).
Build the two ExiQO images with the release pipeline (section 7), or by hand:
make images # builds both images locally
make image-test # UID 10001, read-only root, no package manager, offline embeddings
make image-lint # hadolint
make image-scan # Trivy, fails on CRITICAL (exceptions in .trivyignore)
make egress-audit # hosts named in our code and in the web bundle versus the allowlist
The Dockerfiles take the base images and download sources as build arguments so nothing is pulled
from a public site: BASE_IMAGE_DOTNET, BASE_IMAGE_UV, BASE_IMAGE_NODE_BUILD,
BASE_IMAGE_NODE_RUNTIME (mirrored images, by digest), PIP_INDEX_URL, HF_ENDPOINT,
NPM_CONFIG_REGISTRY, TERRAFORM_BASE_URL and TERRAGRUNT_BASE_URL.
Never put credentials in these URLs. Build arguments persist in the image history, so a mirror
URL such as https://user:token@mirror/... would ship the token inside the image. Use mirrors
that the build agents can reach without credentials in the URL (network allow-listing, or a
credential helper configured on the agent).
Package mirrors for the generated code
The platform builds the .NET services it generates and plans their Terraform, so the worker pods need GMF's package mirrors at runtime. They are configured, not hard-coded:
| Values key | Becomes | Used for |
|---|---|---|
mirrors.nuget | NUGET_SOURCE | the feed written into each generated nuget.config |
mirrors.npm | NPM_CONFIG_REGISTRY | npm installs |
mirrors.terraformConfig | TF_CLI_CONFIG_FILE (mounted at /etc/exiqo/terraform.rc) | a provider_installation network mirror for Terraform providers |
mirrors.maven | MAVEN_MIRROR_URL | the only repository Maven reads (written into the generated .exiqo/maven-settings.xml as a mirrorOf * mirror); required with the java stack |
mirrors.goproxy | GOPROXY (off when go is not enabled) | Go module downloads; required with the go stack |
mirrors.pypi | UV_INDEX_URL, PIP_INDEX_URL | Python package index; required with the python stack |
mirrors.caBundle | MIRROR_CA_BUNDLE (mounted at /etc/exiqo-ca/ca.pem, worker only) | PEM of the private CA behind the mirrors, see below |
Mirror URLs must be https. The worker's NuGet cache is per pod (worker.nugetCacheSize) and is
refilled from the mirror after a restart.
Target stacks
stacks.enabled (default [dotnet]; any of dotnet, java, go, python) becomes
ENABLED_STACKS. Each project picks one stack (the Settings page sets the default for new
projects; only an admin changes it) and every build of it targets that stack.
| Stack | Generated service | Needs on the worker | Mirror (values) |
|---|---|---|---|
dotnet | C# · .NET 10 · ASP.NET Core | dotnet | mirrors.nuget |
java | Java 21 · Spring Boot 3.5 · Maven | JDK 21 and Maven 3.9 (in the image) | mirrors.maven |
go | Go · net/http · pgx (go modules) | Go toolchain (in the image) | mirrors.goproxy |
python | Python 3.12 · FastAPI · pytest | uv (in the image) and a Python 3.12 interpreter | mirrors.pypi |
An enabled stack other than .NET needs its mirror: the schema and the template refuse the install
without it and refuse a mirror that is not https://. Java and Python fail closed too: without mirrors.maven
or mirrors.pypi the restore refuses with a clear error and the generated Dockerfiles and
pipelines stop, they never reach Maven Central or the public Python index. The pilot compose file
enables only dotnet until you set ENABLED_STACKS and the mirrors. The pods have no route to the public
repositories, so a stack without a mirror cannot restore a single package; a Go build with no
GOPROXY fails closed (GOPROXY=off), it never falls back to Go's public proxy.
Worker sizing, only when a stack other than .NET is enabled:
- The worker gets a per-pod
/cache/stacksvolume (worker.stackCacheSize, default 10Gi: the Maven repository, the Go module and build caches, uv's cache), refilled from the mirrors after a restart. A .NET-only install gets no such volume. The pod'sephemeral-storagerequest already includes it; raise both together. - A Maven build needs about 2 GiB of memory per concurrent job (
worker.slots). Go links and Python installs need less, but raiseworker.resourcesfor the busiest stack you enable. Keepworker.slotslow (2) until you have watched a week of builds. - The platform image carries Temurin JDK 21, Maven 3.9, the Go toolchain and
uv, each pinned and checksum-verified at build (override the*_BASE_URLbuild arguments to fetch them from your mirror). Python 3.12 is the image's own interpreter;uvnever downloads one.
For the firewall team: the host of each configured mirror joins EGRESS_ALLOWLIST (shown in the
About panel) automatically, only for an enabled stack. Allow exactly these on 443:
the mirrors.maven host (java), the mirrors.goproxy host (go), the mirrors.pypi host (python)
and the existing NuGet, npm and Terraform mirror hosts. Nothing public is named by the chart or the
code. A Go build does not contact Go's checksum database or any VCS host: checksums come from the
go.sum the platform commits, and GOFLAGS=-mod=readonly forbids anything else.
Generated Java and Python services verify the TLS certificate of Azure Database for PostgreSQL
against the JDK trust store and the system roots (Azure's roots are public). A private database CA
belongs in the runtime base image's store (or PGSSLROOTCERT for Python).
Dependency versions are pinned by the platform, not chosen by the model: Maven versions in
engine/stacks/java/versions.py, Go modules and checksums in engine/stacks/go/versions.py and
go.sum.lock, Python requirements in hash-locked files. Refresh the Go and Python locks on a
machine that reaches your mirrors with make stack-locks (set GOPROXY and UV_INDEX_URL), review
the diff and commit it.
A mirror behind a private CA
When the mirrors' certificates come from GMF's own CA, put the CA certificate(s) (PEM, a chain is
fine) in mirrors.caBundle. The chart stores it in a ConfigMap, mounts it read-only on the worker
at /etc/exiqo-ca/ca.pem and sets MIRROR_CA_BUNDLE. Java: at start the entrypoint copies the JDK
trust store to /tmp/exiqo-cacerts, adds each certificate with keytool, and adds
-Djavax.net.ssl.trustStore to MAVEN_OPTS (the Java runner passes that through to Maven and
nothing else of MAVEN_OPTS but the repository path). Go and Python: their runners hand the build
SSL_CERT_FILE, the system roots with the bundle added after them (a second mirror with a public
certificate still verifies). The entrypoint fails closed: a MIRROR_CA_BUNDLE that is set
but names no file, a missing keytool, a bundle with no certificate, or one keytool rejects,
stops the pod (exit 65 or 66) instead of starting with the public trust store. The same CA must
also be in the trust store of the image build that runs the generated Dockerfile (GMF's base image,
BASE_IMAGE_BUILD, and the pipelines' UV_INDEX_URL / GOPROXY / MAVEN_MIRROR_URL variables).
GMF adds its own mirror hosts in two places: egress.fqdns (the firewall list, shown in the
About panel) and, for the build-time audit, deploy/egress-allowlist.txt if GMF runs make egress-audit on images that name those hosts.
The generated CI templates
The Azure DevOps and GitHub workflows the platform generates for the migrated services download
Terraform from releases.hashicorp.com and Terragrunt from github.com. They run on GMF's CI
agents, not in the platform's pods, which is why those two hosts are in the allowlist file. Behind
a strict proxy, edit the generated pipeline (or the templates
engine/infra_gen/templates/azure-pipelines.yml.j2 and
engine/infra_gen/templates/github_workflow.yml.j2) to download from GMF's mirror.
What the egress audit does and does not catch
make egress-audit is build-time evidence, not enforcement. It lists hosts named in our own code
(/app of the platform image) and in what the web image ships to the browser, and fails on any
that is not in deploy/egress-allowlist.txt. Its limits:
- URLs with a scheme are always checked, but a bare host name (no scheme) is recognized only with a
common top-level domain (
com,net,org,io,ai,dev,app,cloud,co,us,gov,edu). A host with another TLD that appears withouthttps://is not seen. - A host assembled at runtime (string concatenation, a template such as
https://${host}) is not seen; only literals are. - PascalCase dotted names such as
Microsoft.AspNetCore.Appare treated as identifiers, not hosts. - Third-party runtimes (the Python virtualenv, the .NET SDK, the web server's
node_modules) are out of scope.
Runtime egress is enforced by the NetworkPolicies in the chart (addresses and ports) and by GMF's Azure Firewall FQDN rules (names). Treat the audit as the check that the code does not name an unexpected host, and the firewall as the control.
3. Entra app registration and role groups
The platform signs users in with Entra ID (authorization code with PKCE) against an app registration in GMF's tenant. The API holds the sign-in: the browser never holds a token, only a signed session cookie.
Register the application
az ad app create --display-name "ExiQO Migrate" --sign-in-audience AzureADMyOrg \
--web-redirect-uris https://<ingress.host>/api/auth/callback
- The redirect URI is
https://<ingress.host>/api/auth/callback, with https. The chart setsOIDC_REDIRECT_URIto exactly that. Do not override it with an http address: behind the TLS-terminating ingress the API sees plain http, and Entra rejects a redirect URI that is not registered. - The scopes are
openid profile email. No Microsoft Graph permission and no admin consent are needed: the platform never calls Graph. - The example install uses a confidential client: a client secret for the app, stored in Key Vault
as
exiqo-oidc-client-secret(keyVault.secrets.oidcClientSecret). Client secrets expire (24 months at most): record the expiry and rotate before it (section 10). A public client (no secret,oidcClientSecretleft empty) needs the redirect URI registered under "Mobile and desktop applications" with public client flows allowed; that path has not been exercised. auth.tenantIdmust be the tenant GUID, not a domain name (the schema enforces it). The token issuer the API accepts ishttps://login.microsoftonline.com/<tenantId>/v2.0.auth.clientIdis the application (client) ID.
Token version
The browser sign-in validates the ID token from the v2.0 endpoint. Bearer access tokens (used by
scripts/demo_check.py --token and any automation) are accepted only if they are v2.0 tokens, so
set the app's access token version to 2 (accessTokenAcceptedVersion in the manifest; in the
Microsoft Graph form of the manifest it is the requestedAccessTokenVersion property of the api
object):
az ad app update --id <appId> --set api.requestedAccessTokenVersion=2
A v1.0 token (issuer https://sts.windows.net/<tenant>/) is refused with "wrong issuer". Bearer
tokens may be issued for the client ID or for api://<clientId>.
Roles
Seven role keys exist; auth.roleGroups maps each to Entra group object IDs and/or app role
values:
| Key | Holds |
|---|---|
admin | the About panel, Settings and history writes |
viewer | read only, every screen |
sme | decides gates G1 and G2 |
architect | decides gate G3 |
engineer | decides gate G4 |
qa | decides gate G5 |
ops | decides gate G6 |
Any role other than viewer may also write. A user who signs in but matches no role gets "your
account holds no ExiQO Migrate role" (HTTP 403). Gate decisions and audit entries record the
user's Entra object ID and user principal name.
Two ways to carry roles in the token (use either or both; the example mixes them):
-
App roles (recommended). Define app roles on the registration (for example
Exiqo.Sme), assign groups or users to them on the enterprise application, and list the role values:auth: roleGroups: sme: [1a2b3c4d-0000-4000-8000-000000000003, Exiqo.Sme]az ad app update --id <appId> --app-roles @approles.jsonSet the enterprise application's "Assignment required" to yes, so only assigned users can sign in at all.
-
Group IDs. Set the groups claim to the group object ID and list the groups:
az ad app update --id <appId> --set groupMembershipClaims=ApplicationGroupApplicationGroupemits only the groups assigned to the application.SecurityGroupemits all of the user's security groups.
Use app roles when users can be in many groups. Entra leaves the groups claim out of a token
whose user is in more groups than it will list (about 200 in a JWT) and points at Microsoft Graph
instead. The platform does not call Graph, so for such a user only the roles claim counts, and
the API logs "Entra group overage" with the user's object ID. Group-only mapping would then give
that user no role.
Session behavior
- The session cookie
exiqo_sessionis signed withSESSION_SECRET(HttpOnly, Secure, SameSite=Lax) and lasts 8 hours. Roles are fixed in the cookie at sign-in: a change to a user's groups or app roles takes effect at their next sign-in, up to 8 hours later. - Sign-out (
POST /api/auth/logout) clears only the platform cookie. The user's Entra session is untouched, so signing in again may be silent. On shared workstations, sign out of Entra as well. - Rotating
SESSION_SECRETsigns everyone out.
Known trust boundary: generated services in Verify
In the Verify step the platform starts the .NET service it generated, on the worker, and the
browser reaches that service's Swagger UI and API through a proxy on the platform's own origin
(/api/builds/<id>/run/proxy/...). JavaScript served by that service therefore runs on the
platform's origin and can call /api/* with the signed-in user's session cookie. The services
verified are generated from GMF's own estate, so the code is GMF's code; this is a known
boundary, not a sandbox. Restrict who holds the engineer role (the role that builds and
verifies), and do not run Verify on an estate GMF does not trust.
Known trust boundary: generated code on the worker
The worker also runs generated code as its own user: dotnet test and dotnet run in Build and
Verify, and Terraform (with the generated providers and modules) in Deploy's plan. That code runs
with everything the worker pod holds:
- the secrets mounted at
/mnt/secretsin the worker:DATABASE_URL,TEST_DATABASE_URL,APP_SECRET,INTERNAL_TOKEN,NEO4J_PASSWORD, and the model credentials (AZURE_OPENAI_API_KEY,CLAUDE_CODE_OAUTH_TOKEN,LANGFUSE_SECRET_KEY) when they are configured, since the build agents call the model from the worker. The sign-in secrets (SESSION_SECRET,OIDC_CLIENT_SECRET) are mounted in the api only: the worker has its own SecretProviderClass,exiqo-platform-worker, without them; - the projected Workload Identity token (
AZURE_FEDERATED_TOKEN_FILE), which it can exchange with Entra for the platform identity (exiqo-platform: Key Vault Secrets User on the vault, and whatever else GMF grants it) and for every deploy identity, because each one trusts theexiqo-workerservice account; - the connector tokens, when a connector is enabled:
GITHUB_TOKEN,ATLASSIAN_TOKEN(andATLASSIAN_USERon cloud) andFIGMA_TOKENare mounted in the worker too, because the publish jobs run there, and the worker's egress reaches the connectors'cidrs. Generated code could therefore push to any branch of the target repositories that branch protection leaves open (not onlyexiqo/..., and without the platform's audit line), or write to the Confluence space and the Jira project. Keep the GitHub token fine-grained (the target repositories only,contents:write,pull_requests:write,metadata:read) with branch protection on the default branch, and give the Atlassian account rights on the one space and project only (the connector table in section 6).
So size the deploy identities for planning only: Reader, or the narrow custom role of
DEPLOY-STEP-SECRETS.md (read actions, provider registration, and the data-plane reads a refresh
needs), never write actions or role-assignment rights; applying goes through GMF's pipeline with
its own identity. Give exiqo-platform nothing beyond what section 4 lists. As for Verify, the
code is generated from GMF's own estate and reviewed at the gates, and the same rule applies:
restrict the engineer role and do not build an estate GMF does not trust. Running the
untrusted execution (tests, the service, Terraform) in a separate pod with no mounted secret and no
platform identity is the planned hardening, together with a dedicated connector worker that runs
the connector jobs and no generated code, so the connector tokens leave the pod that runs it.
4. Key Vault secrets
Secrets live in GMF's Key Vault and reach the pods as files under /mnt/secrets through the CSI
driver. The app reads each from <NAME>_FILE when set, else <NAME> (connector tokens only from
<NAME>_FILE: their plain variable is a local development fallback); the chart sets only the
_FILE form, so no secret value is ever in a pod spec, Helm values, image, log or job payload. The
pods authenticate to the vault with Workload Identity as exiqo-platform, which holds Key Vault
Secrets User on the vault. The object names below are the defaults of keyVault.secrets.*.
| Secret | Key Vault object (values key) | Owner | Reader | Rotation |
|---|---|---|---|---|
DATABASE_URL | exiqo-database-url (keyVault.secrets.databaseUrl), postgresql+asyncpg://<user>:<password>@<host>:5432/exiqo?ssl=require | Terraform (deploy/azure) or the database team | api, worker, migration hook (its own SecretProviderClass) | change the server password, update the secret, restart api and worker |
TEST_DATABASE_URL | exiqo-test-database-url (keyVault.secrets.testDatabaseUrl), a database whose name ends _test | same | worker | with the database password |
APP_SECRET | exiqo-app-secret (keyVault.secrets.appSecret), a Fernet key | platform team | api, worker | see section 10: values encrypted with it become unreadable |
SESSION_SECRET | exiqo-session-secret (keyVault.secrets.sessionSecret) | platform team | api only (not mounted in the worker) | signs everyone out |
INTERNAL_TOKEN | exiqo-internal-token (keyVault.secrets.internalToken) | platform team | api, worker (bearer between them on port 9100) | restart api and worker together |
NEO4J_PASSWORD | exiqo-neo4j-password (keyVault.secrets.neo4jPassword), the bare password | platform team | api, worker | together with the next row, with an ALTER USER (section 10) |
| Neo4j initial credentials | exiqo-neo4j-auth (keyVault.secrets.neo4jAuth), neo4j/<the same password> | platform team | the Neo4j pod, through the Kubernetes Secret the CSI driver syncs | together with the previous row |
OIDC_CLIENT_SECRET | exiqo-oidc-client-secret (keyVault.secrets.oidcClientSecret), empty for a public client | Entra app owner | api only (the API runs the sign-in; the web pod and the worker hold no copy) | before the Entra secret expires |
AZURE_OPENAI_API_KEY | (keyVault.secrets.azureOpenaiApiKey), omit with providers.azureOpenAI.auth: managed_identity | Azure OpenAI owner | api, worker | regenerate the key in Azure, new Key Vault version, restart |
FOUNDRY_API_KEY | (keyVault.secrets.foundryApiKey), omit with providers.foundry.auth: managed_identity | Foundry resource owner | api, worker | regenerate the key on the Foundry resource, new Key Vault version, restart |
CLAUDE_CODE_OAUTH_TOKEN | (keyVault.secrets.claudeCodeOauthToken), only with providers.claude.enabled | platform team | api, worker | new version, restart |
LANGFUSE_SECRET_KEY | (keyVault.secrets.langfuseSecretKey), only with langfuse.enabled | platform team | api, worker | new version, restart |
GITHUB_TOKEN | (keyVault.secrets.githubToken), only with connectors.github.enabled | GitHub org owner | api, worker | new version; read on every call, so the CSI driver's rotation needs no restart |
ATLASSIAN_TOKEN | (keyVault.secrets.atlassianToken), only with connectors.atlassian.enabled | Atlassian admin | api, worker | same |
ATLASSIAN_USER | (keyVault.secrets.atlassianUser), Atlassian flavor: cloud only: the account email | Atlassian admin | api, worker | with the token |
FIGMA_TOKEN | (keyVault.secrets.figmaToken), only with connectors.figma.enabled | Figma org admin | api, worker | same as GITHUB_TOKEN |
| GMF private CA bundle | (keyVault.secrets.connectorsCaBundle), optional PEM; or connectors.caBundle as PEM text | platform team | api, worker (file /mnt/secrets/connectors_ca_bundle, CONNECTORS_CA_BUNDLE) | new version, restart (the bundle is read when a connector client is built) |
Connectors are off. Enabling one in connectors.<kind> needs: its secret name above, allowedHosts
(the hosts the client may reach; they join EGRESS_ALLOWLIST in the About panel), HTTPS URLs, and
its own cidrs: the chart renders NetworkPolicy exiqo-connectors-egress (api and worker to
exactly those addresses, TCP 443; egress.allowCidrs does not substitute). The chart refuses
(schema) an enabled connector missing any of these, a URL that is not https:// or carries user
info, or Atlassian cloud without atlassianUser. values.gmf.example.yaml has a commented example (GitHub Enterprise Server,
Confluence and Jira Data Center). Figma's rendered-image host is a separate optional entry,
connectors.figma.imageHosts; leave it empty to show frame names without thumbnails. With it set, connectors.figma.imageCidrs
(its addresses, port 443, same policy) is required.
If GMF's servers use a certificate from a private CA, give the connectors its PEM bundle (root and
intermediates), by one of: connectors.caBundle in the values (a ConfigMap exiqo-connectors-ca
mounted at /etc/exiqo-connectors-ca/ca.pem in api and worker), or a Key Vault object named by
keyVault.secrets.connectorsCaBundle. Setting both is refused, as is a bundle containing a private key. The bundle is only a trust anchor
for the connectors' TLS (verification is never turned off); it holds no secret.
Terraform creates the two database URLs. Create the rest in the same vault, using the names in
keyVault.secrets (commands in deploy/azure/README.md, "Not created here"). Generated with
Terraform they would land in its state, so they are created by hand:
Each value goes through a mode-600 temporary file and --file, never --value, so no secret
appears in the process list or the shell history:
umask 077
f="$(mktemp)"
put() { az keyvault secret set --vault-name <vault> -n "$1" --file "$f" --output none; }
python3 -c 'import base64, os; print(base64.urlsafe_b64encode(os.urandom(32)).decode(), end="")' >"$f"
put exiqo-app-secret
openssl rand -hex 32 | tr -d '\n' >"$f"; put exiqo-session-secret
openssl rand -hex 32 | tr -d '\n' >"$f"; put exiqo-internal-token
pw="$(openssl rand -hex 24)"
printf '%s' "$pw" >"$f"; put exiqo-neo4j-password
printf 'neo4j/%s' "$pw" >"$f"; put exiqo-neo4j-auth
unset pw
shred -u "$f" 2>/dev/null || rm -f "$f"; unset f
Use a password without / (hex, as above): Neo4j splits the initial credentials at the first /.
PostgreSQL authentication is by password. Entra authentication for Postgres is a possible later change; the app does not fetch Entra tokens for database connections, so do not disable password authentication on the server.
GET /readyz fails (HTTP 503, "secrets: error: unreadable ...") when any configured _FILE
secret is missing or unreadable, so a failed mount keeps a pod out of service.
5. Deploy-step identities
The Deploy step runs terragrunt ... plan for the generated infrastructure against GMF's target
subscriptions. By default it uses Workload Identity: one user-assigned managed identity per target
environment (exiqo-deploy-dev, exiqo-deploy-prod, ...), each federated to
system:serviceaccount:<namespace>:exiqo-worker, with Terraform running as
ARM_USE_OIDC=true. No client secret is stored anywhere.
deploy/azure creates the identities and their federated credentials (one per entry of its
deploy_environments variable) but grants no role on the target subscriptions: what each
identity may touch is GMF's decision. Grant the narrowest role that works:
- The platform only plans;
applyis not part of this build (it goes through the generated pipeline). Plan needs read access plus access to the Terraform state account. - Lead with a custom role over Contributor. Include
*/register/action(or the per-provider<Namespace>/register/actionentries for the namespaces the generated modules use; the list is inDEPLOY-STEP-SECRETS.md), or disable provider auto-registration in the generated provider configuration. Without one of the two, the first plan can fail while the provider tries to register resource providers. - Contributor scoped to a resource group is the fallback when a custom role is impractical.
The full procedure, with commands for the identity, the federated credential, both role options,
declaring the environment in deploy.environments, the Key Vault service-principal alternative and
rotation, is in DEPLOY-STEP-SECRETS.md. For the Helm values, each environment appears twice:
deploy:
credentialMode: workload_identity
environments:
- name: dev
subscription: 2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f
auth: workload_identity
identity:
deployIdentities:
dev: 0d9e8f7a-6b5c-4d3e-a2f1-0e9d8c7b6a50
6. Values walk-through
Copy deploy/helm/exiqo/values.gmf.example.yaml to values.gmf.yaml (in GMF's repository, for
example deploy/gmf/values.gmf.yaml) and replace every placeholder. If you used deploy/azure,
its helm_values output (values.azure.json) already fills image.registry, keyVault.name,
identity.platformClientId, identity.deployIdentities, postgres.host, postgres.cidrs, the
data share and the backup storage: pass it as a second -f. Helm merges maps by key, but replaces
lists, so keep egress.fqdns in your own file. The chart's schema (values.schema.json) rejects a
wrong value with a message naming the key; it also refuses what must never reach a GMF install:
dev sign-in, local deploy credentials, image tags, fewer than two api or web replicas, a tenant
that is not a GUID, and NetworkPolicies turned off.
Walk through the file top to bottom:
image:
registry: gmfacr.azurecr.io
platform:
repository: exiqo/exiqo-platform
digest: sha256:4f2d9c1e8b7a6f5e4d3c2b1a0f9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e
web:
repository: exiqo/exiqo-web
digest: sha256:9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b7a6f5e4d3c2b1a0f9e8d
brand:
name: ExiQO
supportContact: Platform Engineering, platform-engineering@gmfinancial.example
image.*: the registry and the digests the release pipeline printed (the pipeline overrides the digests with--set-string).brand.supportContactis shown in Help & Support.
auth:
mode: oidc
tenantId: 3b2f8a64-1c2d-4e5f-9a8b-7c6d5e4f3a2b
clientId: 8a7b6c5d-4e3f-4a1b-9c8d-7e6f5a4b3c2d
roleGroups:
admin: [1a2b3c4d-0000-4000-8000-000000000001]
engineer: [1a2b3c4d-0000-4000-8000-000000000005]
keyVault:
mode: csi
name: kv-gmf-exiqo-prod
secrets:
databaseUrl: exiqo-database-url
appSecret: exiqo-app-secret
sessionSecret: exiqo-session-secret
internalToken: exiqo-internal-token
neo4jPassword: exiqo-neo4j-password
neo4jAuth: exiqo-neo4j-auth
oidcClientSecret: exiqo-oidc-client-secret
identity:
platformClientId: 6f1c2d3e-4b5a-4c6d-8e7f-9a0b1c2d3e4f
auth.*is section 3.keyVault.secrets.*is section 4; an empty value means "not used" and no_FILEvariable is set for it.identity.platformClientIdis theexiqo-platformidentity.
ingress:
className: nginx
host: exiqo.apps.gmfinancial.example
tlsSecretName: exiqo-tls
postgres:
host: gmf-exiqo-pg.postgres.database.azure.com
cidrs: [10.20.30.0/28]
networkPolicy:
ingressNamespaces: [ingress-nginx]
kubeApiCidrs: [10.50.0.4/32]
ingress.hostalso forms the redirect URI. The API ingress allows 2 GB uploads and unbuffered streaming; with AGIC see the notes invalues.yaml(the gateway's WAF limits apply).postgres.cidrsis the server's delegated subnet or private endpoint, for the NetworkPolicy on port 5432.networkPolicy.kubeApiCidrsis needed only for the Neo4j backup.
egress:
allowCidrs: [10.40.0.0/24, 20.190.128.0/18]
fqdns:
- login.microsoftonline.com
- "*.vault.azure.net"
- management.azure.com
- gmf-exiqo-aoai.openai.azure.com
- artifactory.gmfinancial.example
providers:
azureOpenAI:
endpoint: https://gmf-exiqo-aoai.openai.azure.com
apiVersion: "2024-10-21"
auth: managed_identity
deployments: {strong: gpt-4o, standard: gpt-4o, efficient: gpt-4o-mini}
# foundry: # Claude on Microsoft Foundry, see below
# enabled: true
# endpoint: https://gmf-exiqo-foundry.services.ai.azure.com/anthropic
# auth: managed_identity
mirrors:
nuget: https://artifactory.gmfinancial.example/api/nuget/v3/nuget-remote/index.json
npm: https://artifactory.gmfinancial.example/api/npm/npm-remote/
egress.allowCidrslists the private-endpoint subnet and Entra ID's range (or the Azure Firewall's address when egress is forced through it).egress.fqdnsis the list to give the firewall team; add the mirror hosts and, with the backup on, the backup account's blob host (theegress_fqdnsoutput ofdeploy/azure). The Azure OpenAI deployments are the model names the three routing tiers use.
Claude on Microsoft Foundry
Claude models (Opus 5.5, Sonnet 5.5, Haiku 5.5 and later) are served by Microsoft Foundry, not by
Azure OpenAI deployments, from the resource's own endpoint
(https://<resource>.services.ai.azure.com/anthropic). Set providers.foundry to use them:
-
In the Foundry portal create (or reuse) a Foundry resource in a region where the models are available, and deploy the three models. Choose the Hosted on Azure version of each model, with Global or Data Zone scope as GMF's data policy requires. The deployment name defaults to the model id.
-
Give
exiqo-platformCognitive Services User on the resource (or put the deployment key in Key Vault askeyVault.secrets.foundryApiKeyand setauth: key). The platform asks Entra for the scopehttps://ai.azure.com/.default; no key is stored. -
Set the values and allow the resource's host name in the firewall (the chart adds it to the list shown in About):
providers: foundry: enabled: true endpoint: https://gmf-exiqo-foundry.services.ai.azure.com/anthropic auth: managed_identity # or key deployments: {strong: claude-opus-5-5, standard: claude-sonnet-5-5, efficient: claude-haiku-5-5}
To move to a newer Claude model, deploy it in Foundry and change the deployment name for the tier;
no image change is needed. With Foundry on, PROVIDER is foundry and Azure OpenAI, if also
configured, is the fallback when a Foundry call fails. Anthropic's Hosted-on-Azure option runs
inference on Azure infrastructure and stores prompts and completions there; operational metadata
without prompt or completion content (usage, safety scores) is kept on Anthropic's systems.
Usage is billed through the Azure Marketplace; the Tokenomics screen shows tokens but no price for
Claude. Features that need Anthropic hosting (code execution, Files API) are not used by the platform.
data:
storageClass:
create: true
storageAccount: stgmfexiqodata
resourceGroup: rg-gmf-exiqo
shareName: exiqo-data
size: 200Gi
worker:
replicas: 2
maxReplicas: 6
slots: 2
data.storageClass.*: the StorageClass is cluster-wide, not namespaced. The first install creates it. A second install in another namespace setsdata.storageClass.createto false and names the existing class indata.storageClass.name. A StorageClass's parameters are immutable: changingstorageAccount,resourceGroup,shareNameorskuNameon an upgrade fails. Create a new class under a new name instead. When a named account is used, the AKS cluster identity needs Storage Account Contributor on it.worker.replicasis the autoscaler's minimum,worker.maxReplicasits maximum, andworker.slotsthe concurrent jobs per worker pod. Workers scale on CPU.
neo4j:
enabled: true
image:
customImage: gmfacr.azurecr.io/neo4j:5.26.32@sha256:adaa077a3ab023015143b8f73f7076a7d053f12985f5b06f4c6a128c3a2f7240
neo4jBackup:
enabled: true # the chart refuses to render when neither this nor disabledReason is set
storageAccount: stgmfexiqobackup
# disabledReason: "why the backup is off" # only with enabled: false
- Neo4j: see the next subsection. An external Neo4j sets
neo4j.enabledto false withneo4j.uriandneo4j.externalCidrs.
Connectors
Four optional integrations with GMF's own servers, all off by default: GitHub Enterprise (push a
build to a branch and open a pull request), Confluence (publish a process's architecture page),
Jira (create issues from findings, open questions and parity differences) and Figma (attach design
frames as references). The install layer is the ceiling: Settings, Connectors (admin role) can
only narrow what connectors.<kind> enables. The chart names no public host; every address below is GMF's.
connectors:
github:
enabled: true
baseUrl: https://github.gmf.example.com
allowedHosts: [github.gmf.example.com]
cidrs: [10.20.30.0/28]
atlassian:
enabled: true
flavor: datacenter # cloud also needs keyVault.secrets.atlassianUser
confluenceUrl: https://confluence.gmf.example.com
jiraUrl: https://jira.gmf.example.com
allowedHosts: [confluence.gmf.example.com, jira.gmf.example.com]
cidrs: [10.20.30.16/28]
keyVault:
secrets:
githubToken: exiqo-github-token
atlassianToken: exiqo-atlassian-token
What each needs, and the least privilege for its token (use a GMF service account, not a person):
| Connector | Values | Key Vault secret | Token permissions |
|---|---|---|---|
| GitHub | connectors.github.baseUrl (and apiUrl when it is not <baseUrl>/api/v3), allowedHosts, cidrs, optional commitEmail | GITHUB_TOKEN (keyVault.secrets.githubToken) | Fine-grained token on the target repositories only: contents:write, pull_requests:write, metadata:read. Branch protection stays on: the platform pushes only exiqo/... branches and never to the default branch. |
| Confluence | connectors.atlassian.confluenceUrl, allowedHosts, cidrs; the space is chosen in Settings, Connectors | ATLASSIAN_TOKEN (keyVault.secrets.atlassianToken); with flavor: cloud also ATLASSIAN_USER (the account email) | Space permissions on that one space: View space, Add page, Edit page (republishing and the 409 retry update the page) and Add attachment (the design record is attached); "Add comment" is not needed. Data Center: a personal access token of the service account. |
| Jira | connectors.atlassian.jiraUrl (same install block as Confluence); the project key is chosen in Settings | same secret as Confluence | Project permissions in that one project: Browse Projects, Create Issues and Edit Issues (re-filing updates an issue; the platform finds earlier issues by label and reads the project and myself in the test). |
| Figma | connectors.figma.apiUrl, optional webUrl (frame links) and imageHosts with imageCidrs (thumbnails), allowedHosts, cidrs | FIGMA_TOKEN (keyVault.secrets.figmaToken) | Scopes file_content:read (files, frames, images) and current_user:read (the connection test calls GET /v1/me). Read-only; nothing is written to Figma. |
Firewall: allow the api and worker pods to reach exactly the allowedHosts of each enabled
connector on TCP 443 (Azure Firewall FQDN rules for the names, and the CIDRs of their private
endpoints or load balancers in cidrs). The chart refuses to render an enabled connector without its own cidrs (and Figma imageCidrs when imageHosts is set); egress.allowCidrs does not substitute. It renders NetworkPolicy exiqo-connectors-egress from
those cidrs and adds the hosts to the About panel's egress list. A redirect to any host outside
allowedHosts (typically an SSO page) is refused by the client, so a service that answers a token
call with a redirect to a login host needs that host in allowedHosts or, more usually, a corrected
token or URL.
Private CA: if GMF's servers present certificates from an internal CA, set connectors.caBundle
(PEM text) or keyVault.secrets.connectorsCaBundle, not both. Verification is never turned off.
Enable in two steps: install with the values above, then an admin opens Settings, Connectors,
narrows or confirms the URLs, space and project, and runs "Test connection" for each. The test
names the account the token belongs to and the latency. Rotation is in section 10;
operating, troubleshooting and the audit queries are in RUNBOOK.md, "Connectors".
Roles: pushing a build needs engineer, publishing a Confluence page and attaching Figma frames
need architect, creating Jira issues needs architect, sme or qa; admin may do all, and
only admin changes connector settings or runs a test.
Neo4j
-
The chart installs one Community-edition instance (
neo4j.enabled, default true). High availability clustering needs a Neo4j Enterprise licence held by GMF; the chart does not provide one. -
Neo4j holds the project memory (what the agents and Ask read).
GET /readyzincludes it:ok,disabled(no URI),degraded: <class> (down <s> s)while it has been down for less thanneo4j.readyGraceSeconds(default 900; still ready, so the nightly backup window or a restart does not take the API out of service) anddown: <class>after that, which fails readiness.neo4j.gatesReadiness: falsemakes it informational. The chart setsdb.memory.transaction.total.maxto 1g, about 70% of the 1500m heap, so one very large ingest fails with a transaction-memory error (retried with backoff) instead of exhausting the heap. Keep it near 70% of the heap if you changeserver.memory.heap.max_size. -
Credentials. The Neo4j chart reads its initial password from the Kubernetes Secret
exiqo-neo4j-auth, which the CSI driver syncs from the Key Vault objectkeyVault.secrets.neo4jAuthwhile a pod mounts it. That puts the password in etcd, hence the etcd-encryption prerequisite. Neo4j applies the password only on the first start of an empty data volume; changing the Key Vault object later does not change the live password. Section 10 gives the rotation procedure. -
Bolt TLS is off by default (in-cluster traffic, restricted by NetworkPolicy). To enable it, create a Secret holding a certificate and key for
exiqo-neo4j, setneo4j.ssl.bolt(privateKey.secretName,publicCertificate.secretNameand thetrustedCertssources, per the Neo4j chart's values), set the server-sidedbms.ssl.policy.bolt.enabledthroughneo4j.config, and setneo4j.uritobolt+s://exiqo-neo4j:7687. The API must trust the certificate (use a certificate its image already trusts, orbolt+ssc://for a self-signed one). This path has not been exercised. -
The backup is on (
neo4jBackup.enabled: true, section 9). With the bundled Neo4j the chart refusesneo4jBackup.enabled: falseunlessneo4jBackup.disabledReasonsays why. Neo4j Community can dump only a stopped database, so the CronJob scales the StatefulSet to 0, runsneo4j-admin database dump, scales it back to 1 and uploads the dump to Blob with Workload Identity. Neo4j is down for that stop-dump-start window (about a minute while the graph is small);GET /readyzshowsneo4j: degradedduring it and stays ready. If the backup pod dies between stop and start, runkubectl -n exiqo scale statefulset exiqo-neo4j --replicas=1(or run the nexthelm upgrade). -
Neither
neo4j.enablednorneo4j.uri: the chart refuses to render.
7. Install and upgrade
Install by hand
kubectl create namespace exiqo
kubectl -n exiqo create secret tls exiqo-tls --cert=tls.crt --key=tls.key
# The Neo4j subchart: pull the archive Chart.lock pins from GMF's mirror. Do not run
# the dependency build command; Chart.yaml names the public repository by URL.
mkdir -p deploy/helm/exiqo/charts
helm pull neo4j --repo <GMF mirror of https://helm.neo4j.com/neo4j> --version 5.26.32 \
--destination deploy/helm/exiqo/charts
# or, for an OCI mirror:
# helm pull oci://<registry>/<path>/neo4j --version 5.26.32 --destination deploy/helm/exiqo/charts
echo "c7402735f1a4219db507d6c2c40a5106154092d680c7ff564da3db3c120312d7 deploy/helm/exiqo/charts/neo4j-5.26.32.tgz" \
| sha256sum -c -
helm upgrade --install exiqo deploy/helm/exiqo -n exiqo \
-f values.gmf.yaml -f values.azure.json \
--atomic --timeout 20m
--atomic rolls the release back if the upgrade fails; --timeout 20m is needed because the
migration hook can run up to 15 minutes (migration.activeDeadlineSeconds is 900) before the
rollout starts. The chart prints, at the end, the federated credentials it expects (issuer and
subject for each identity) and a check command.
What happens, in order:
- A pre-install and pre-upgrade hook creates the service account
exiqo-migrate, a SecretProviderClass holding onlyDATABASE_URL, and the Jobexiqo-migrate, which runs Alembic to head. Logs:kubectl -n exiqo logs job/exiqo-migrate. The Job stays after success so its logs can be read; the service account and SecretProviderClass are removed. - The api (2 replicas), web (2 replicas) and worker (2 to 6 replicas) Deployments roll out behind PodDisruptionBudgets; Neo4j starts as a StatefulSet.
- Probes: the api uses
/healthzfor liveness and/readyzfor readiness (the pod serves them at its root; through the ingress they are/api/healthzand/api/readyz), the web pod/, and each worker/internal/healthzon port 9100.
Things that go wrong on a first install:
- A namespace with its own default-deny baseline blocks the migration hook. On a first
install the chart's NetworkPolicies do not exist yet when the hook runs. If the namespace
already carries a default-deny policy (an Azure Policy or a platform baseline), allow egress from
the
exiqo-migratepods to Postgres (port 5432) and to DNS before installing. On upgrades the chart's ownexiqo-platform-egresspolicy covers it. - The StorageClass is cluster-scoped. The deployer needs cluster scope to create it, or the
install sets
data.storageClass.createto false withdata.storageClass.namenaming a class the platform team created beforehand with the same parameters and mount options (UID and GID 10001). - The identities' federated credentials must exist first (issuer = the cluster's OIDC issuer URL;
subjects
system:serviceaccount:exiqo:exiqo-api,exiqo-worker,exiqo-migrate,exiqo-neo4j, andexiqo-neo4j-backupwhen the backup is on; the same subject for each deploy identity).
Release pipelines (recommended)
deploy/pipelines holds two templates that do the same thing and call one script,
deploy/pipelines/release.sh: azure-pipelines.yml for Azure DevOps and github-release.yml
(copy to .github/workflows/release.yml) for GitHub Actions. Stages: build (hadolint, build, push
a candidate tag), scan (egress audit and Trivy), sign (SBOM attestation and cosign signature with a
Key Vault key, then the release tag), deploy (verify, then helm upgrade --install --atomic --timeout 20m as above). Images move between stages by digest only. Setup, in
deploy/azure/README.md ("Release pipeline identities") and in the headers of the two templates:
- Three identities, one per privilege, so the approval and "sign only after the scan" rest on
what each stage can do: build (AcrPush), signer (AcrPush and Key Vault Crypto User on the signing
key) and deployer (AcrPull and an AKS role). Each is federated with an exact subject, no
wildcards: on GitHub
repo:<org>/<repo>:environment:release-build,...:environment:release-signand...:environment:production(one credential per environment); in Azure DevOps a service connection each. - Pin the verification key outside the repository. The deployer verifies signatures with the
public key committed at
deploy/gmf/cosign.pub, but only if its sha256 equalsCOSIGN_PUBLIC_KEY_SHA256. Set that value (thecosign_public_key_sha256Terraform output) as a variable of the GitHubproductionenvironment, or in the Azure DevOps variable groupexiqo-release-deploy(bound to the Deploy stage, with an Approvals check). Deploy refuses when it is unset or differs. - Restrict who can create
v*tags (a tag ruleset on GitHub; the "Create tag" permission in Azure DevOps): the tag is what reaches the signer. Require approvals on theproductionenvironment or deploy service connection. - CODEOWNERS (or required reviewers on Azure DevOps) on
deploy/gmf/cosign.pubanddeploy/pipelines/. - The deployer's AKS role is GMF's call. Nothing is granted unless
deployer_aks_roleis set indeploy/azure. When it is, Terraform also grants Azure Kubernetes Service Cluster User Role (the pipeline runsaz aks get-credentials). The role needs cluster scope if the chart creates the StorageClass; otherwise use a namespace-scoped role withdata.storageClass.createset to false (deploy/azure/README.mdhas both options). - AzureCLI@2 task version.
azure-pipelines.ymlpinsAzureCLI@2.282.2. An Azure DevOps organization or Server that does not have that build needs the nearest version it has. - Offline signature verification. The pipeline verifies with a local public key and without the
public transparency log (
--insecure-ignore-tlog=true), butcosign verifymay still try to fetch public Sigstore TUF metadata on first use. On a runner with no internet access, allow that host or provide the TUF root offline; this has not been exercised. - The tool images (hadolint, Trivy, syft, cosign, crane, Helm) and the Trivy databases come from
GMF's mirror through
TOOL_REGISTRY; the variables to set are listed at the top of each template.
Upgrade and roll back
An upgrade is the same command with new digests (or a new pipeline run). The migration hook runs first, so new pods start on the new schema. Roll back with:
helm history exiqo -n exiqo
helm rollback exiqo <revision> -n exiqo --wait
A rollback restores the previous Kubernetes objects, not the database: Alembic migrations are not
reversed. Check the release notes for migrations that older images cannot run on; for a destructive
one, restore Postgres from a point in time (section 9). RUNBOOK.md has the upgrade checklist.
8. Smoke test
First, the pods and the health endpoints:
kubectl -n exiqo get pods -l app.kubernetes.io/name=exiqo
curl -fsS https://<ingress.host>/api/readyz
readyz answers {"postgres": "ok", "neo4j": "ok", "secrets": "ok"} when healthy (neo4j may read degraded: ... for up to 15 minutes after a Neo4j restart and the pod stays ready). In the app,
the About panel (admin role, Help & Support) shows the same checks, the image digests, the auth
mode and the egress allowlist, from GET /api/system/status.
Then the acceptance run, which drives the whole seven-step flow on the synthetic estate:
make setup # once: .venv with httpx and the tools
make samples samples-zip # the synthetic estate and samples/synthetic-gmf.zip
export EXIQO_TOKEN=<an Entra access token, see below>
.venv/bin/python scripts/demo_check.py --base-url https://<ingress.host>
--base-url addresses the install (the API is at <host>/api). The token is read from the
EXIQO_TOKEN environment variable; --token also exists but is not used above, because command
lines are visible to other users. Either sends the token as a bearer. An AUTH_MODE=oidc install ignores the X-User persona header the local run uses, so
the token's user must hold the sme, architect, engineer and ops roles; the run checks that
first and records the gate decisions under that one user's name. Without --token, an oidc install
answers 401 and the script says so. Without either flag the script behaves as before, against the
local API.
To get a token for a test user, give the app registration an Application ID URI (api://<clientId>)
and a scope, authorize a client that can request it (for the Azure CLI, pre-authorize its client ID
on that scope), then:
az account get-access-token --scope api://<clientId>/.default --query accessToken -o tsv
The token must be a v2.0 token (section 3). This path has not been exercised against GMF's tenant.
What to expect: the run takes tens of minutes, uses the install's Azure OpenAI deployments (real
model calls) and the worker's package mirrors, and leaves a project named acceptance <time> with
synthetic data in the install's database (this build has no project delete). The "Swagger answers"
check is skipped when a token is used, because the proxied Swagger UI is for browsers and reads the
session cookie, not a bearer. The run is full mode by default against an installed platform;
--mode offline asserts the honest-failure states instead.
The last step, connectors, prints connectors: SKIP (none enabled) on an install without
connectors (a pass). With connectors enabled it runs each one's connection test and prints, for
example, connectors: github test ok (exiqo-bot); a failing test fails the run. To exercise the
real thing once, add --publish --github-repo <owner>/<repo>: one push and pull request, one
Confluence page and one Jira issue on the acceptance project. Only the connection tests are run
without --publish. Connection tests need the admin role, so with OIDC the --token user must hold admin as well as the four gate roles; without it the step reports the 403. The check can also run alone with --only connectors.
9. Backup and restore
Postgres holds everything the platform stores today. The DATA_DIR share holds uploaded estates and
generated solutions. Neo4j holds the project memory (the graph the agents and Ask read); the
old Postgres knowledge schema is retired as knowledge_retired (RUNBOOK.md, "Memory (Neo4j)").
Postgres (Flexible Server point-in-time restore)
Backups are automatic; the retention is postgres_backup_retention_days in deploy/azure (set
geo-redundant backup there if GMF requires it). A restore creates a new server:
az postgres flexible-server restore -g <rg> -n <new-server> \
--source-server <server> --restore-time 2026-10-24T09:00:00Z
Then point the platform at it: update exiqo-database-url (and exiqo-test-database-url) in Key
Vault, set postgres.host and postgres.cidrs if they changed, run helm upgrade, and restart
the api and worker pods. If Terraform created the old server, import or replace it in state
rather than leaving the two to drift. Practice the procedure (RUNBOOK.md, restore drills) before
you need it.
DATA_DIR (Azure Files)
Protect the exiqo-data share with Azure Backup for Azure Files (share snapshots). The
StorageClass has reclaim policy Retain and the claim is kept on uninstall, so deleting the release
does not delete the share. Restore the share to the same point in time as Postgres: rows reference
files under /data/uploads and /data/builds.
Neo4j (dump and load)
The backup is on in the example values:
neo4jBackup:
enabled: true
schedule: "30 2 * * *"
storageAccount: stgmfexiqobackup
container: neo4j-backups
networkPolicy:
kubeApiCidrs: [10.50.0.4/32]
The CronJob stops Neo4j, dumps the store, starts Neo4j and uploads
neo4j/<UTC timestamp>/neo4j.dump to the container using identity.backupClientId (default: the
platform identity, which needs Storage Blob Data Contributor on the container; deploy/azure
grants it). The window is the schedule (30 2 * * * UTC by default); pick one outside working
hours, since the memory is unavailable for about a minute (readiness shows degraded, ingest
jobs retry). Retention is the storage account's lifecycle policy. It needs the API server address in
networkPolicy.kubeApiCidrs and the account's blob host in egress.fqdns.
To restore, download the dump (az storage blob download --auth-mode login), scale Neo4j to 0
(kubectl -n exiqo scale statefulset exiqo-neo4j --replicas=0), run a one-off pod with the Neo4j
image and the claim data-exiqo-neo4j-0 mounted at /data (subPath data), the dump at
/backup/neo4j.dump, as UID 7474, running neo4j-admin database load neo4j --from-path=/backup --overwrite-destination=true, then scale Neo4j back to 1. RUNBOOK.md repeats this as a drill.
The procedure follows the Neo4j 5 manuals and has not been exercised in this repository.
After a restore the graph is as old as the dump. Bring it up to date by re-ingesting every project
(RUNBOOK.md, "Memory (Neo4j)": python -m api.app.memory_admin reingest --project <id>); the
ingest is idempotent, so a project that is already current is a no-op.
10. Secret rotation
Mechanics: add a new version of the Key Vault secret (keep the same name). Pods read secrets
when they start, so a running pod keeps the old value until it restarts; a restarted pod mounts the
current version. With the CSI driver's rotation enabled (--enable-secret-rotation on the AKS
add-on, poll interval 2 minutes by default) the mounted file changes in place, but the app still
reads it only at start. So after every rotation, restart:
kubectl -n exiqo rollout restart deployment/exiqo-api deployment/exiqo-worker
Workers drain running jobs first (up to 570 seconds; the pod's grace period is 600), and rollouts never take a pod down before its replacement is ready. The web pod holds no secret.
| Secret | Procedure |
|---|---|
DATABASE_URL, TEST_DATABASE_URL | Change the password on the server, write the new URL to both Key Vault objects, restart api and worker. If Terraform owns the server, change the password through Terraform so state and vault agree. |
SESSION_SECRET | New version, restart. Every user is signed out. |
INTERNAL_TOKEN | New version, restart api and worker in one go. Until both sides have restarted, Verify calls from api to worker answer 401. |
APP_SECRET | The Fernet key encrypts values the platform stores itself (an Azure OpenAI key entered in Settings, local-mode credentials). With managed identity and Workload Identity nothing important is stored, but a changed key makes anything already stored unreadable: re-enter those values after the change. |
OIDC_CLIENT_SECRET | Create a second secret on the Entra app (az ad app credential reset --append), write it as a new Key Vault version, restart, then delete the old Entra secret. Do this before the expiry. |
AZURE_OPENAI_API_KEY | Regenerate the second key in Azure, new version, restart, then regenerate the first. |
GITHUB_TOKEN, ATLASSIAN_TOKEN, ATLASSIAN_USER, FIGMA_TOKEN | Create the new token at the service, write it as a new Key Vault version, then run "Test connection" in Settings, Connectors; delete the old token at the service afterwards. Connector tokens are read on each call, so no restart is needed once the CSI driver has refreshed the mounted file (up to its poll interval); restarting is also fine. Fine-grained GitHub tokens and Atlassian tokens expire: calendar them. |
| Connectors CA bundle | New version of the Key Vault object (or a new connectors.caBundle and helm upgrade), then restart api and worker: the bundle is read when a connector client is built. |
| Neo4j password | See below: two Key Vault objects change together, plus the live password. |
Neo4j password. exiqo-neo4j-password (the bare password) and exiqo-neo4j-auth
(neo4j/<password>) must always agree: the first is what the platform connects with, the second is
what a rebuilt data volume would be initialized with. Neo4j applies the initial password only on the
first start of the data volume, so changing the Key Vault objects alone changes nothing in the
running database. To rotate:
- Change the live password:
kubectl -n exiqo exec -it exiqo-neo4j-0 -- cypher-shell -u neo4j(it prompts for the current password), thenALTER CURRENT USER SET PASSWORD FROM '<old>' TO '<new>';. - Immediately write the new password to both Key Vault objects as new versions
(
exiqo-neo4j-password= the password;exiqo-neo4j-auth=neo4j/<password>). - Restart api and worker so they reconnect with the new password (until then
GET /readyzshowsneo4j: down, which does not take the pods out of service). Restart the Neo4j pod to refresh the synced Kubernetes Secret.
If the live password is lost, recovery means starting Neo4j with dbms.security.auth_enabled=false
(through neo4j.config, in-cluster only), running ALTER USER neo4j SET PASSWORD '<new>', and
turning authentication back on; this has not been exercised. Nothing is stored in Neo4j yet, so a
fresh volume (delete the claim data-exiqo-neo4j-0, then start Neo4j with the current
exiqo-neo4j-auth) is the simple alternative today.
Deploy-step credentials: managed identities have no secret to rotate. A service principal secret
read from Key Vault is picked up by the next plan (it is never cached); see
DEPLOY-STEP-SECRETS.md.
11. Troubleshooting
Start with kubectl -n exiqo get pods, kubectl -n exiqo describe pod <pod> and
kubectl -n exiqo logs <pod>, and GET /api/readyz. It names the check that failed and its
exception class, never a value:
| Check | Meaning |
|---|---|
postgres: error: <class> | the database is unreachable or refuses the login: firewall, NetworkPolicy, postgres.cidrs, a wrong password in DATABASE_URL |
secrets: error: unreadable <names> | a _FILE secret is missing or unreadable: the CSI mount failed |
neo4j: degraded: <class> (down <s> s) | Neo4j is not answering but has been down for less than neo4j.readyGraceSeconds (900 s): still ready. Expected during the nightly backup |
neo4j: down: <class> | down longer than the grace: the pod is not ready (unless neo4j.gatesReadiness is false). kubectl -n exiqo get pods exiqo-neo4j-0, its logs, NetworkPolicy to 7687 |
| Symptom | Likely cause and where to look |
|---|---|
Pod stuck in ContainerCreating with a mount error | The CSI driver cannot read Key Vault. kubectl -n exiqo describe pod shows the event. Check that exiqo-platform has Key Vault Secrets User, the federated credential's issuer and subject (system:serviceaccount:exiqo:<account>) match, keyVault.name and the object names are right, and the vault's firewall admits the cluster. |
Install fails at the hook, Job exiqo-migrate times out | kubectl -n exiqo logs job/exiqo-migrate. Usually Postgres is unreachable (NetworkPolicy baseline, firewall, the VECTOR extension not allow-listed) or its secret did not mount. |
helm upgrade rolled back (--atomic) | Run helm history exiqo -n exiqo and read the failed revision's hook and pod events; the cause is in the migration Job or a pod that never became ready. |
| StorageClass error at install | The deployer lacks cluster scope, or an upgrade changed an immutable parameter (section 6). |
| Sign-in redirects fail ("redirect URI mismatch", AADSTS50011) | The registered redirect URI is not exactly https://<ingress.host>/api/auth/callback. |
| "sign-in expired or was not started here" | The 10-minute login cookie was lost: sign-in was started on another host name, over http, or the page sat open too long. |
| "sign-in refused: wrong issuer" or "wrong audience" | auth.tenantId is not the tenant that issued the token, or it is a v1.0 token (section 3, token version), or the audience is not the client ID. |
| "Entra ID did not answer usably" (HTTP 502) | Egress to login.microsoftonline.com is blocked. |
| "your account holds no ExiQO Migrate role" (HTTP 403) | The user matches no entry of auth.roleGroups. Check the group object IDs or app role values; with many groups use app roles (group overage). Roles update at the next sign-in. |
| AADSTS50105 at sign-in | "Assignment required" is on and the user is not assigned to the application. |
| Calls to GMF mirrors, Azure OpenAI or Resource Manager time out | Egress denied: check the Azure Firewall rules for egress.fqdns, the NetworkPolicy (egress.allowCidrs, egress.ports) and private DNS. The About panel shows the allowlist the install believes in. |
| Restore fails with an NU1301 error | The NuGet mirror (mirrors.nuget) is unreachable or needs a host added to the firewall. |
| Plan fails with "Workload Identity is not configured for this pod" | The worker pod lacks the Workload Identity token (AZURE_FEDERATED_TOKEN_FILE): check the pod label azure.workload.identity/use and the add-on. |
| Plan fails with "deploy environment ... is no longer declared" | The environment is not in deploy.environments, or was renamed after the plan was queued. |
| Plan fails with an authorization error from Azure | The environment's identity lacks a role on the target subscription (DEPLOY-STEP-SECRETS.md), or the federated credential's subject does not name exiqo-worker in this namespace. |
| Memory unavailable: agents or Ask answer "memory unavailable: <class>" | Neo4j is down or unreachable. Check /readyz, the exiqo-neo4j-0 pod and its volume, then NEO4J_URI and the password (exiqo-neo4j-password must match exiqo-neo4j-auth). Reads recover on their own once Neo4j answers. |
| Memory ingest jobs fail ("memory unavailable after 10 attempts: <reason>") | Neo4j was unreachable through all retries. Fix Neo4j, then python -m api.app.memory_admin reingest --project <id> (RUNBOOK.md, "Memory (Neo4j)"). The failed job's result names the reason. |
| A connector test or publish fails: 401, "host ... not allowed", a redirect to SSO, Confluence 409, Jira 404 | RUNBOOK.md, "Connectors". |
| A job is stuck or reports "worker lost" | RUNBOOK.md, "A stuck job" and "worker lost". |
| Uploads fail on large estates | The ingress body limit (ingress.api.annotations) or, with AGIC, the gateway's WAF and request limits. |