OpenMCF logoOpenMCF

Loading...

Kubernetes Authorization Policy

Provision an Istio AuthorizationPolicy -- the mesh primitive that enforces access control on your workloads. Allow, deny, or audit requests by source identity, operation, and conditions, or delegate the decision to an external authorizer.

What Gets Created

  • A namespaced security.istio.io/v1 AuthorizationPolicy custom resource.
  • An action (ALLOW / DENY / AUDIT / CUSTOM) applied to requests matched by rules, with an optional workload selector or target_refs.

Prerequisites

  • Istio CRDs installed on the cluster (KubernetesIstioBaseCrds).
  • A running Istio control plane, istiod (KubernetesIstio), to enforce the policy.
  • The target namespace (KubernetesNamespace).

Quick Start

apiVersion: kubernetes.openmcf.org/v1
kind: KubernetesAuthorizationPolicy
metadata:
  name: require-jwt
spec:
  namespace:
    value: finance
  action: ALLOW
  rules:
    - from:
        - source:
            request_principals:
              - "*"
openmcf apply -f authorizationpolicy.yaml

Configuration Reference

Required Fields

FieldTypeDescription
namespacereferenceNamespace the policy is created in.

Optional Fields

FieldTypeDescription
selector.match_labelsmapPod labels selecting target workloads; omit for namespace-wide scope. Mutually exclusive with target_refs.
target_refslistGateway / Service / ServiceEntry resources to bind to; required for waypoints. Mutually exclusive with selector.
ruleslistMatch rules: from (source), to (operation), when (conditions).
actionstringALLOW (default), DENY, AUDIT, or CUSTOM.
provider.namestringMeshConfig extension provider for the CUSTOM action.

Stack Outputs

OutputDescription
authorization_policy_nameName of the created AuthorizationPolicy (equals metadata.name).
namespaceNamespace the AuthorizationPolicy was created in.

Related Components

  • Kubernetes Request Authentication
  • Kubernetes Peer Authentication
  • Kubernetes Istio
  • Kubernetes Istio Base CRDs
  • Kubernetes Namespace

Next article

Kubernetes ClickHouse

Kubernetes ClickHouse Deploys a ClickHouse database on Kubernetes using the Altinity ClickHouse Operator, with automatic password generation, optional clustering with sharding and replication, configurable coordination via ClickHouse Keeper or ZooKeeper, persistent storage, and optional external access through a LoadBalancer Service with external-dns integration. What Gets Created When you deploy a KubernetesClickHouse resource, OpenMCF provisions: Namespace — created only when createNamespace...
Read next article
Presets
2 ready-to-deploy configurationsView presets →