Authentication and service identity#
This page covers how Live Edit authorizes and identifies callers, and the token sidecar it uses for its own outbound calls. Read it with Deployment; backing-store authentication is on Backing store.
Caller identity#
The service shows each caller to other participants by a name that grants no access.
With userInfo.enabled: false (the default), it reads the name from the token’s JWT claims: name or preferred_username; an app-only token is shown by its app’s name with (app) appended; otherwise sub or oid.
A token with none of these claims fails the call.
Opaque (non-JWT) tokens need the User Info service.
Without it, such calls fail with INTERNAL, and the service logs opaque bearer token requires the userinfo service; deploy the userinfo service or use JWT-format bearer tokens.
To use User Info, merge into your values file:
userInfo:
enabled: true
endpoint: "https://userinfo.example.com"
When endpoint is empty, the chart uses the in-cluster http://userinfo-service:8080 (REST) or http://userinfo-service:50051 (gRPC).
authorization.protocol selects REST or gRPC for both Storage and User Info.
With both authorization and User Info on, a caller that User Info does not know is shown by its token’s claims instead of failing.
Service identity for outbound calls#
The service authenticates its own outbound calls with tokens it reads from files in the pod. A token-provisioning container that you supply writes those files from a sidecar: any provisioner you already use, such as a workload-identity helper, a Vault agent or a script. You need it for:
Storage-backed checkpoints (
checkpoint.adapter: StorageApi), for the service’s calls to the Storage Service. The chart refuses to render this adapter untilserviceIdentity.accessTokenFile.enabledistrue.Token-file authentication to the backing store, such as Azure Managed Redis with Microsoft Entra ID (Access-token file).
Token file format#
The provisioner writes one file per token:
Default path |
Path setting |
Token for |
Needed |
|---|---|---|---|
|
|
Your Storage Service; on Microsoft Entra ID, the scope |
Always, when |
|
|
The backing store; on Azure Managed Redis, the scope |
With backing-store token authentication |
{STORAGE_API_APP_ID} is the application ID of your Storage Service’s Microsoft Entra app registration; your Storage Service administrator provides it.
Each file holds JSON, with expires_on the token’s real expiry in RFC 3339:
{"access_token": "{TOKEN}", "expires_on": "2030-01-01T00:00:00Z"}
The provisioner must:
write each file atomically (write a temporary file, then rename it);
keep every file in
/etc/secrets/access-token, with a distinct name;replace each token at least 7 minutes (420 seconds) before it expires.
Always provide the Storage token: while serviceIdentity.accessTokenFile.enabled is true, a replica stays NOT_SERVING until that file holds an unexpired token, even when only the backing store uses tokens.
Configure the token sidecar#
Give the provisioner an identity that can obtain both tokens. With Azure workload identity, create a managed identity and federate it to the Live Edit ServiceAccount, as in Create the managed identity. The chart creates the ServiceAccount
live-edit-servicefor the release namelive-edit-service; a release name that does not containlive-edit-servicegets{RELEASE_NAME}-live-edit-service. In your Storage Service, grant the identity read, list, write and delete access to the checkpoint location; for the backing store, grant access as Azure Managed Redis describes.Set the
serviceIdentityblock (and, with Azure workload identity, theserviceAccountannotation) as in the complete values example, with your provisioner’simage,envandargsunderserviceIdentity.accessTokenFile.provisionerSidecar.container.The chart names the container
live-edit-service-token-provisioner, replacing anynameyou set, and mounts a shared in-memory volume at/etc/secrets/access-tokenthat the provisioner can write.The chart adds the
azure.workload.identity/use: "true"pod label when theazure.workload.identity/client-idannotation is present. With a ServiceAccount you created yourself (serviceAccount.name), annotate that ServiceAccount and still set the annotation here, so the pod gets the label.
Check the render:
helm template live-edit-service ./live-edit-service -f live-edit-values.yaml \ | grep -E 'token-provisioner|token-exchange|LIVE_EDIT_SERVICE_TOKEN_FILE|workload.identity/use'
The output shows the sidecar container, the
token-exchangevolume,LIVE_EDIT_SERVICE_TOKEN_FILEand, with workload identity, the pod label.
The sidecar requests 20m CPU and 32Mi memory by default; override them under serviceIdentity.accessTokenFile.provisionerSidecar.container.resources.
With autoscaling.mode: hpa, keep the CPU request positive, and the memory request too if you enable the memory target; the chart refuses to render otherwise.
Without a sidecar image, the chart adds no sidecar; mount the token files at the same paths through volumes and volumeMounts.
Leave serviceIdentity.clientCredentials.enabled at false: the service does not implement that mode, and turning it on only logs a warning.
Verify#
Every replica reports ready; see Verify.
With the sidecar, each replica’s
live_edit_service_token_availablemetric on port 9090 is1:kubectl port-forward -n storage-apis deployment/live-edit-service 9090:9090 & curl -s localhost:9090/metrics | grep '^live_edit_service_token_available'
An authorized client can create and join a session, and the smoke tests pass.
Symptom |
Check |
Fix |
|---|---|---|
Replica not ready; log warns |
The provisioner’s log: |
Fix the provisioner’s identity or scope, or make it write to |
Same warning with |
The same sidecar log |
Fix the backing-store token (Access-token file) |
Every call returns |
Whether Storage serves |
Upgrade or configure Storage to answer |
Calls return |
|
Fix the client or a proxy that strips or rewrites the |
Calls return |
The caller’s read access to the base layer path in Storage |
Grant read access; allow 30 seconds for the cached denial to expire |
References#
Microsoft Entra Workload ID for AKS: the workload identity the sidecar uses.
RFC 3339: the timestamp format of
expires_on.JSON Web Token (RFC 7519): the token format the service reads caller names from.
See next#
Configuration: every chart setting, its default and when to change it.