Skip to content

access.openbaoconfig.io examples

Each kind shows its curated example first, then any variants, then the generated sample with every spec field set. The fields are described in the API reference.

AccessGrant

Gives the payments ServiceAccounts write access to their own KV paths and read access to shared paths per organization, through one generated ACL policy and one Kubernetes auth role per subject.

API reference

examples/access/accessgrant.yaml
# Gives the payments ServiceAccounts write access to their own KV paths and read access to shared paths per
# organization, through one generated ACL policy and one Kubernetes auth role per subject.
apiVersion: access.openbaoconfig.io/v1alpha1
kind: AccessGrant
metadata:
  name: payments-workloads
  namespace: openbao-config
spec:
  connectionRef:
    kind: OpenBaoConnection
    name: openbao
  creationPolicy: CreateOrAdopt
  deletionPolicy: Delete
  driftDetection: Enabled
  driftInterval: 15m
  managementPolicy: Manage
  mountPath: kubernetes
  subjects:
    - name: payments-api
      namespace: payments
    - name: "*"
      namespaceSelector:
        matchLabels:
          team: payments
          tier: workloads
  rules:
    - mount: secret
      path: apps/{sa.namespace}/{sa.name}/*
      metadataPath: apps/{sa.namespace}/{sa.name}
      level: write
    - mount: secret
      path: shared/{org}/{sa.namespace}/+/*
      metadataPath: shared/{org}/{sa.namespace}/*
      level: read
      organizations:
        - acme
        - globex
  tokenTTL: 15m
---
apiVersion: access.openbaoconfig.io/v1alpha1
kind: AccessGrant
metadata:
  name: payments-batch
  namespace: openbao-config
spec:
  connectionRef:
    kind: OpenBaoConnection
    name: openbao
  authMountRef:
    name: kubernetes
  subjects:
    - name: nightly-report
      namespace: payments
  rules:
    - mount: secret
      path: reports/*
      level: read
  tokenTTL: 10m
---
apiVersion: access.openbaoconfig.io/v1alpha1
kind: AccessGrant
metadata:
  name: payments-migrations
  namespace: openbao-config
spec:
  connectionRef:
    kind: OpenBaoConnection
    name: openbao
  mountAccessor: auth_kubernetes_1a2b3c4d
  subjects:
    - name: schema-migrator
      namespace: payments
  rules:
    - mount: secret
      path: databases/payments
      level: owner
examples-generated/access/accessgrant.yaml
# AccessGrant (access.openbaoconfig.io/v1alpha1)
# AccessGrant gives Kubernetes ServiceAccounts access to KV version 2 secrets (the machine access model).
#
# Generated from the CRD by hack/samplegen (make samples); do not edit. Every spec field is set to a placeholder that
# passes the CRD's OpenAPI and CEL validation, so the sample shows the shape of the kind, not a working configuration.
# Required spec fields: connectionRef, rules, subjects.
#
# Reference: https://alexandrust88.github.io/openbao-config-operator/reference/api/access/#accessgrant
# Curated example: examples/access/accessgrant.yaml
apiVersion: access.openbaoconfig.io/v1alpha1
kind: AccessGrant
metadata:
  name: example
  namespace: openbao-config
spec:
  connectionRef:
    kind: OpenBaoConnection
    name: openbao
  creationPolicy: Create
  deletionPolicy: Orphan
  driftDetection: Enabled
  driftInterval: 1h
  managementPolicy: Manage
  mountPath: example
  namespace: example
  rules:
  - level: example
    metadataPath: example
    mount: example
    path: example
  subjects:
  - name: example
    namespace: example
  tokenTTL: 15m

AccessLayout

Gives people access by identity provider group: per organization, developers can write and leads own the org paths, while in the prod namespace developers only read and leads write.

API reference

examples/access/accesslayout.yaml
# Gives people access by identity provider group: per organization, developers can write and leads own the org
# paths, while in the prod namespace developers only read and leads write.
apiVersion: access.openbaoconfig.io/v1alpha1
kind: AccessLayout
metadata:
  name: platform-teams
  namespace: openbao-config
  annotations:
    openbaoconfig.io/allow-disruptive-update: "false"
spec:
  connectionRef:
    kind: OpenBaoConnection
    name: openbao
  creationPolicy: CreateOrAdopt
  deletionPolicy: Delete
  driftDetection: Enabled
  driftInterval: 15m
  managementPolicy: Manage
  authMounts:
    - oidc
  organizations:
    - acme
    - globex
  groupAliasTemplate: "{org}_{role}"
  paths:
    - mount: orgs
      path: "{org}/+/*"
      metadataPath: "{org}/*"
  roles:
    - name: developer
      levels:
        - namespace: ""
          level: write
        - namespace: prod
          level: read
    - name: lead
      levels:
        - namespace: ""
          level: owner
        - namespace: prod
          level: write
examples-generated/access/accesslayout.yaml
# AccessLayout (access.openbaoconfig.io/v1alpha1)
# AccessLayout gives people, by identity provider group, access to KV version 2 secrets (the human access model).
#
# Generated from the CRD by hack/samplegen (make samples); do not edit. Every spec field is set to a placeholder that
# passes the CRD's OpenAPI and CEL validation, so the sample shows the shape of the kind, not a working configuration.
# Required spec fields: authMounts, connectionRef, paths, roles.
#
# Reference: https://alexandrust88.github.io/openbao-config-operator/reference/api/access/#accesslayout
# Curated example: examples/access/accesslayout.yaml
apiVersion: access.openbaoconfig.io/v1alpha1
kind: AccessLayout
metadata:
  name: example
  namespace: openbao-config
spec:
  authMounts:
  - example
  connectionRef:
    kind: OpenBaoConnection
    name: openbao
  creationPolicy: Create
  deletionPolicy: Orphan
  driftDetection: Enabled
  driftInterval: 1h
  groupAliasTemplate: '{role}'
  managementPolicy: Manage
  namespace: example
  paths:
  - metadataPath: example
    mount: example
    path: example
  roles:
  - levels:
    - level: example
      namespace: ""
    name: example

AccessLevel

Reusable capability sets on KV data and metadata (read, write, owner) that AccessGrant and AccessLayout rules name.

API reference

examples/access/accesslevel.yaml
# Reusable capability sets on KV data and metadata (read, write, owner) that AccessGrant and AccessLayout rules name.
apiVersion: access.openbaoconfig.io/v1alpha1
kind: AccessLevel
metadata:
  name: read
  namespace: openbao-config
spec:
  data:
    - read
  metadata:
    - read
    - list
---
apiVersion: access.openbaoconfig.io/v1alpha1
kind: AccessLevel
metadata:
  name: write
  namespace: openbao-config
spec:
  data:
    - create
    - read
    - update
    - patch
  metadata:
    - read
    - list
---
apiVersion: access.openbaoconfig.io/v1alpha1
kind: AccessLevel
metadata:
  name: owner
  namespace: openbao-config
spec:
  data:
    - create
    - read
    - update
    - patch
    - delete
    - list
  metadata:
    - create
    - read
    - update
    - patch
    - delete
    - list
  versions: true
examples-generated/access/accesslevel.yaml
# AccessLevel (access.openbaoconfig.io/v1alpha1)
# AccessLevel is a named, reusable set of ACL capabilities on KV version 2 secret data and metadata, such as reader,
# writer or owner.
#
# Generated from the CRD by hack/samplegen (make samples); do not edit. Every spec field is set to a placeholder that
# passes the CRD's OpenAPI and CEL validation, so the sample shows the shape of the kind, not a working configuration.
# Required spec fields: none.
#
# Reference: https://alexandrust88.github.io/openbao-config-operator/reference/api/access/#accesslevel
# Curated example: examples/access/accesslevel.yaml
apiVersion: access.openbaoconfig.io/v1alpha1
kind: AccessLevel
metadata:
  name: example
  namespace: openbao-config
spec:
  data:
  - create
  metadata:
  - create
  versions: true