Skip to content

Commit 4e7c0ce

Browse files
committed
Document workflow-notifier auth modes in cloud and local dev
1 parent 812b116 commit 4e7c0ce

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

workflow-notifier/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,42 @@ notifier exited <workflow-id> <Succeeded|Failed|Error> [--error-message TEXT]
3232
`<workflow-id>` is validated as a UUID before any HTTP call. `<result-json>` is
3333
validated as parseable JSON and then transmitted verbatim.
3434

35+
## Authentication
36+
37+
The notifier authenticates to the SARA API using `azure-identity`. The
38+
credential types it will try are configured through the `ALLOWED_AUTH_METHODS`
39+
environment variable: a comma-separated, ordered list whose allowed values are
40+
`WorkloadIdentity` and `ClientSecret` (case-insensitive). When more than one
41+
method is listed, the order determines the priority inside the resulting
42+
`ChainedTokenCredential`.
43+
44+
### Cloud (dev / staging / prod)
45+
46+
All cloud environments run the notifier with Azure Workload Identity and
47+
`ALLOWED_AUTH_METHODS=WorkloadIdentity` (also the default when the variable is
48+
unset). The `workflow-notifier-sa` service account is federated to a
49+
per-environment notifier app registration; the `azure-workload-identity`
50+
mutating webhook injects `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`,
51+
`AZURE_FEDERATED_TOKEN_FILE` and `AZURE_AUTHORITY_HOST` into the notifier pod,
52+
and `WorkloadIdentityCredential` exchanges the projected service-account token
53+
for an Entra ID access token. No client secret is provisioned to the cluster.
54+
55+
### Local development
56+
57+
For local docker-compose and docker-desktop Kubernetes runs, set
58+
`NOTIFIER_CLIENT_SECRET` in `.env` and include `ClientSecret` in
59+
`ALLOWED_AUTH_METHODS`. The default in `.env.example` is
60+
`WorkloadIdentity,ClientSecret`, which tries Workload Identity first and falls
61+
back to the client secret when no federated token file is present — convenient
62+
when running the same image both in-cluster and on a workstation.
63+
64+
When using the docker-desktop Kubernetes overlay in
65+
`analytics-infrastructure`, the per-workflow `workflow-notifier-config`
66+
ConfigMap pins `ALLOWED_AUTH_METHODS=ClientSecret`, and
67+
`overlays/local/apply_to_local.py` materializes `NOTIFIER_CLIENT_SECRET` from
68+
`saradev-kv` into a Kubernetes `Secret` named `workflow-notifier-secrets` that
69+
the local overlay mounts into each notifier step.
70+
3571
## Running the mock
3672

3773
When developing it is useful to run SARA locally. Running real Argo Workflows locally

0 commit comments

Comments
 (0)