Skip to content

CredentialBinding

CredentialBinding binds a CredentialSource to a workload and defines how the credential is delivered. Credentials can be injected on-the-wire (the kernel transparently rewrites HTTP headers) or made available as files on the sysfs filesystem.

  • API Group: core.riptides.io
  • Version: v1alpha1
  • Kind: CredentialBinding
  • Plural: credentialbindings

Note: CredentialBinding replaces the deprecated WorkloadCredential resource. All new configurations should use CredentialBinding.

Typestring
RequiredYes

The workload ID this binding applies to. Must match the workloadID of an existing WorkloadIdentity.

Typestring
RequiredYes

The name of the CredentialSource resource to bind.

Typeobject
RequiredYes

Defines how the credential is delivered to the workload. One or both of the following may be configured:

On-the-wire credential injection. When configured, the Riptides kernel module transparently rewrites outbound HTTP requests to inject the credential (e.g., as an Authorization header). Injection is activated when egress traffic matches the specified selectors.

FieldTypeRequiredDescription
selectorsarray of selector objectsYesLabel selectors that match against Service labels. When outbound traffic targets a matching service, the credential is injected into the request.

The selectors use the same label-matching mechanism as Service labels. For example, {api: openai} matches a Service with labels: {api: openai}.

File-based credential delivery. When configured (even as an empty object {}), the Riptides daemon writes credential files to a well-known sysfs path that the workload can read directly:

/sys/module/riptides/credentials/<binding-hash>/<binding-name>/<filename>

The actual file paths are reported in the resource’s status.

FieldTypeDescription
statestringCurrent state of the binding. Valid values: OK, FAILED.
messagestringHuman-readable message with additional detail.
updateAtstring (date-time)Timestamp of the last status update.
sysfs.filesarray of file objectsList of credential files available on sysfs (only present when propagation.sysfs is configured).
FieldTypeDescription
pathstringAbsolute filesystem path to the credential file.
typestringType of file content. Valid values: CONFIG, CREDENTIAL, TOKEN.

Inject a JWT credential into outbound HTTP requests targeting a specific service:

apiVersion: core.riptides.io/v1alpha1
kind: CredentialBinding
metadata:
name: client-jwt-binding
namespace: riptides-system
spec:
workloadID: demo/httpclient
credentialSource: my-jwt-svid
propagation:
injection:
selectors:
- service: my-backend

Deliver a Vault-sourced credential both via on-the-wire injection and as a file on sysfs:

apiVersion: core.riptides.io/v1alpha1
kind: CredentialBinding
metadata:
name: vault-api-keys-binding
namespace: riptides-system
spec:
workloadID: support-assistant/app/assistant-api
credentialSource: vault-api-keys
propagation:
injection:
selectors:
- api: openai
sysfs: {}

When the binding is active, the status reports the sysfs file paths:

status:
state: OK
sysfs:
files:
- path: /sys/module/riptides/credentials/33bc2e42-24c0-5ca1-bb5b-80c2537580df/vault-api-keys-binding/token.jwt
type: TOKEN
updateAt: "2026-02-25T08:34:53.942667783Z"

CredentialBindings work in conjunction with WorkloadIdentity to deliver credentials transparently. The WorkloadIdentity enables TLS interception at the top level, and the CredentialBinding’s propagation.injection.selectors determine which outbound connections receive the credential:

# WorkloadIdentity enables TLS interception:
connection:
tls:
mode: PERMISSIVE
intercept: true
---
# CredentialBinding targets specific services via selectors:
spec:
workloadID: my-app/workload
credentialSource: vault-api-keys
propagation:
injection:
selectors:
- api: openai # matches Service labels

When the workload makes an outbound connection to a service matching the injection selectors, Riptides transparently intercepts the connection and injects the bound credential.