Skip to content

Enable SPIRE in Keycloak - #159

Closed
Alan-Cha wants to merge 2 commits into
rossoctl:mainfrom
Alan-Cha:spiffe_keycloak2
Closed

Alan-Cha wants to merge 2 commits into
rossoctl:mainfrom
Alan-Cha:spiffe_keycloak2

Conversation

@Alan-Cha

@Alan-Cha Alan-Cha commented Mar 2, 2026

Copy link
Copy Markdown
Member

Summary

Enable SPIRE in Keycloak by enabling federated client authentication in Keycloak and setting up SPIRE as an IdP.

Some important notes are that:

  • Kagenti needs to be preconfigured to either use client-secret or federated-jwt. That means that client-registration cannot dynamically switch between creating clients using secrets and JWT-SVID. It may be possible to do so but that would increase complexity and double the number clients (because Keycloak clients cannot both support secrets and JWT-SVID.

1. Client Registration - JWT-SVID Support

File: AuthBridge/client-registration/client_registration.py

  • Added CLIENT_AUTH_TYPE environment variable (client-secret or federated-jwt)
  • When set to federated-jwt, configures Keycloak clients with:
    • clientAuthenticatorType: "federated-jwt"
    • jwt.credential.issuer and jwt.credential.sub attributes
    • No client secret generation (uses JWT-SVID instead)

2. Webhook Sidecar Injection Updates

File: kagenti-webhook/internal/webhook/injector/container_builder.go

  • Changed ConfigMap reference from environments to kagenti-webhook-config
  • Added environment variables for Kubernetes Secret references:
    • KEYCLOAK_NAMESPACE, KEYCLOAK_ADMIN_SECRET_NAME
    • KEYCLOAK_ADMIN_USERNAME_KEY, KEYCLOAK_ADMIN_PASSWORD_KEY
    • CLIENT_AUTH_TYPE, SPIFFE_IDP_ALIAS
  • Follows existing pattern from agent-oauth-secret-job (reads credentials from Secret via K8s API)

3. UID 1337 Standardization

File: AuthBridge/client-registration/Dockerfile

  • Changed container UID from 1000 to 1337
  • Rationale: All sidecars in the AuthBridge architecture (spiffe-helper, client-registration, envoy-proxy) now run as UID 1337:
    • Envoy proxy runs as UID 1337 by default
    • proxy-init iptables rules exclude UID 1337 from traffic redirection to prevent routing loops
    • Consistent UID ensures proper file permissions on shared volumes (/opt/jwt_svid.token, /shared/*)

4. Demo Configuration Updates

File: AuthBridge/demos/github-issue/k8s/configmaps.yaml

  • Split configuration into two ConfigMaps:
    • kagenti-webhook-config: Webhook-specific configuration (SPIRE, Keycloak, auth type)
    • environments: Agent-facing configuration (kept minimal)
  • Prevents pollution of agent namespace configuration with webhook internals

Related issue(s)

Fix #82

@Alan-Cha

Alan-Cha commented Mar 2, 2026 •

Copy link
Copy Markdown
Member Author

UID 1337 Standardization - File Permission Fix

The Problem

During testing, the client-registration sidecar encountered permission denied errors when trying to read /opt/jwt_svid.token, which is written by the spiffe-helper sidecar on a shared EmptyDir volume. Similarly, the envoy-proxy sidecar had permission issues reading client secrets written by client-registration to /shared/client-secret.txt.

Root Cause

The sidecars were running as different UIDs:

  • spiffe-helper: UID 1000 (or another value)
  • client-registration: UID 1000 (original Dockerfile)
  • envoy-proxy: UID 1337 (inherited from envoyproxy/envoy base image)

When a file is written by one sidecar (e.g., spiffe-helper as UID 1000), it's owned by that UID with 644 permissions (rw-r--r--). Other sidecars running as different UIDs cannot write to these files, and depending on group membership, may not be able to read them either.

The Solution

Standardized all AuthBridge sidecars to run as UID 1337:

  • Changed client-registration/Dockerfile: USER 1337:1337 (was USER 1000:1000)
  • Updated webhook container_builder.go: Set RunAsUser: 1337 for all sidecars
  • This matches Envoy's existing UID 1337

Why UID 1337 Specifically

Envoy compatibility: Envoy's official base image runs as UID 1337 by default (industry standard from Istio/Linkerd). Changing Envoy's UID would require rebuilding the base image.

iptables traffic interception: The proxy-init container configures iptables rules to redirect all pod traffic to Envoy, except traffic from UID 1337 itself (-m owner ! --uid-owner 1337). This prevents Envoy's own outbound requests from being redirected back to Envoy, which would create an infinite routing loop. Using UID 1337 for all sidecars ensures they all benefit from this exclusion rule where appropriate, and maintains consistency with the broader service mesh ecosystem.

Files Changed

kagenti-extensions:

  • AuthBridge/client-registration/Dockerfile: Changed from UID 1000 → 1337
  • kagenti-webhook/internal/webhook/injector/container_builder.go: Set all sidecar UIDs to 1337

@Alan-Cha

Alan-Cha commented Mar 5, 2026

Copy link
Copy Markdown
Member Author

WIP

Local Testing Guide for JWT-SVID Authentication

This guide walks you through testing JWT-SVID authentication using local images (no push to ghcr.io).

Prerequisites

  • Docker or Podman running
  • Kind CLI installed

Step 0: Create Kind Cluster

The Kagenti ansible installer can create a Kind cluster automatically, but for local image testing, it's better to create it manually first:

# Create a Kind cluster with the correct name
kind create cluster --name kagenti-dev --config - <<EOF
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
  extraPortMappings:
  - containerPort: 30080
    hostPort: 8080
    protocol: TCP
  - containerPort: 30443
    hostPort: 8443
    protocol: TCP
EOF

# Verify cluster is running
kubectl cluster-info --context kind-kagenti-dev

Step 1: Build and Load Local Images

cd kagenti-extensions

# Make the script executable
chmod +x local-build-and-test.sh

# Build all images and load into Kind cluster
# For Podman users: set KIND_EXPERIMENTAL_PROVIDER
export KIND_EXPERIMENTAL_PROVIDER=podman  # Only needed for Podman
./local-build-and-test.sh

# If using a different cluster name:
# CLUSTER_NAME=my-cluster ./local-build-and-test.sh

This builds and loads:

  • spiffe-idp-setup:local
  • client-registration:local (with UID 1337)
  • kagenti-webhook:local (with updated container_builder.go)
  • envoy-with-processor:local
  • proxy-init:local

Note for Podman users: The script automatically detects Podman and uses tar archives to load images into Kind, since kind load docker-image doesn't work with Podman's image store.

Step 2: Update Hardcoded Image Tags

The webhook's default image tags are hardcoded in internal/webhook/config/defaults.go. Update them to use :local:

cd kagenti-extensions/kagenti-webhook

# Replace image tags (these sed commands modify defaults.go in-place)
sed -i '' 's|envoy-with-processor:latest|envoy-with-processor:local|g' internal/webhook/config/defaults.go
sed -i '' 's|proxy-init:latest|proxy-init:local|g' internal/webhook/config/defaults.go
sed -i '' 's|client-registration:latest|client-registration:local|g' internal/webhook/config/defaults.go

# Also update PullPolicy to Never (don't pull from registry)
sed -i '' 's|PullPolicy:.*corev1.PullIfNotPresent|PullPolicy:         corev1.PullNever|g' internal/webhook/config/defaults.go

# Verify changes
grep -E "envoy-with-processor|proxy-init|client-registration|PullPolicy" internal/webhook/config/defaults.go

# Rebuild the webhook image with updated tags
make docker-build IMG=ghcr.io/kagenti/kagenti-extensions/kagenti-webhook:local

# Load into Kind cluster
# For Docker users:
kind load docker-image ghcr.io/kagenti/kagenti-extensions/kagenti-webhook:local --name kagenti-dev

# For Podman users (use tar archive method):
# podman save ghcr.io/kagenti/kagenti-extensions/kagenti-webhook:local -o /tmp/webhook-local.tar
# kind load image-archive /tmp/webhook-local.tar --name kagenti-dev
# rm /tmp/webhook-local.tar

Step 3: Install Kagenti with Ansible

IMPORTANT: For federated-JWT testing with local images, use TWO overlay files.

The ansible installer will detect the existing kagenti-dev cluster and install into it:

# Go to kagenti repo
cd kagenti

# Install with base dev values + TWO overlays (federated-jwt + local images)
# --env dev                      → Loads dev_values.yaml (base Kind development config)
# --env-file ...federated-jwt    → Enables JWT-SVID authentication (production-ready)
# --env-file ...local_images     → Uses :local image tags (testing-only)
deployments/ansible/run-install.sh --env dev \
  --env-file deployments/envs/dev_values_federated-jwt.yaml \
  --env-file deployments/envs/dev_values_local_images.yaml

About the values files:

  • dev_values.yaml: Base Kind development configuration (components, Keycloak, domain, SPIRE config, openshift: false)
  • dev_values_federated-jwt.yaml: Production-ready JWT-SVID authentication config (ONLY authBridge.clientAuthType)
  • dev_values_local_images.yaml: Testing-only local image overrides (tag: local, pullPolicy: Never)
  • The installer merges all three files in order, each overlay adding/overriding specific values

This installation will:

  1. Detect and use the existing kagenti-dev Kind cluster
  2. Deploy kagenti-deps (Keycloak, SPIRE, etc.) with SPIRE enabled and set_key_use: true
  3. Deploy kagenti chart with authBridge.clientAuthType=federated-jwt
  4. Use :local image tags for all components (pulled from the cluster's local image cache)
  5. Automatically run kagenti-spiffe-idp-setup-job as a Helm post-install hook

The SPIFFE IdP setup job will:

  • Wait for SPIRE server and OIDC discovery provider to be ready
  • Configure Keycloak with a SPIFFE Identity Provider named "spire-spiffe"
  • Enable JWT-SVID authentication for federated-jwt mode

Expected behavior:

  • The helm install may initially fail with "no Namespace with the name 'team1' found"
  • This is a known race condition (namespace creation is asynchronous)
  • Ansible automatically retries and the second attempt succeeds
  • The SPIFFE IdP job runs after the successful retry
  • Installation typically completes in 6-8 minutes

Step 4: Verify SPIRE and Keycloak

cd kagenti-extensions

chmod +x verify-spire-keycloak.sh
./verify-spire-keycloak.sh

Expected output:

  • ✅ SPIRE server is running
  • ✅ SPIRE OIDC discovery provider is running
  • ✅ SPIRE JWKS has 'use' field
  • ✅ Keycloak is running
  • ✅ Keycloak admin secret exists
  • ✅ SPIFFE IdP setup job completed successfully

Step 5: Run AuthBridge Demo

Option A: Manual Demo (Recommended First)

Follow AuthBridge/demos/github-issue/demo-manual.md:

cd /Users/alan/Documents/Work/kagenti-extensions/AuthBridge/demos/github-issue

# 1. Create namespace
kubectl create namespace team1
kubectl label namespace team1 kagenti-enabled=true

# 2. Deploy ConfigMaps (use the updated ones with kagenti-webhook-config)
kubectl apply -f k8s/configmaps.yaml

# 3. Deploy demo workload
kubectl apply -f k8s/deployment.yaml

# 4. Check client-registration sidecar logs
kubectl logs -n team1 deployment/weather-service -c kagenti-client-registration -f

# Expected (Phase 1 - client-secret):
# "Configuring client for client-secret authentication"

# Expected (Phase 2 - federated-jwt):
# "Configuring client for JWT-SVID authentication (federated-jwt)"

Option B: Webhook-Based Demo

Follow AuthBridge/demos/webhook/README.md for automatic sidecar injection testing.

Verify Federated-JWT Configuration

Since you installed with dev_values_federated-jwt.yaml, the system should already be configured for JWT-SVID authentication:

# 1. Verify authBridge.clientAuthType is set to federated-jwt
kubectl get configmap kagenti-webhook-config -n team1 -o jsonpath='{.data.CLIENT_AUTH_TYPE}'
# Expected: federated-jwt

# 2. Deploy an agent and check client-registration logs
# (After deploying an agent in Step 6)
kubectl logs -n team1 deployment/<your-agent> -c kagenti-client-registration -f
# Expected: "Configuring client for JWT-SVID authentication (federated-jwt)"

# 3. Verify Keycloak client uses federated-jwt authenticator
# (After agent deployment creates a Keycloak client)
kubectl run test-curl --rm -i --image=curlimages/curl --restart=Never -- sh -c "
  ADMIN_TOKEN=\$(curl -s 'http://keycloak-service.keycloak.svc:8080/realms/master/protocol/openid-connect/token' \
    -d 'grant_type=password' -d 'client_id=admin-cli' -d 'username=admin' -d 'password=admin' | jq -r '.access_token')
  curl -s -H 'Authorization: Bearer \$ADMIN_TOKEN' \
    'http://keycloak-service.keycloak.svc:8080/admin/realms/kagenti/clients' | \
    jq '.[] | select(.clientId | contains(\"spiffe\")) | {clientId, clientAuthenticatorType}'
"
# Expected: "clientAuthenticatorType": "federated-jwt"

@Alan-Cha

Alan-Cha commented Mar 5, 2026

Copy link
Copy Markdown
Member Author

kagenti-extensions/local-build-and-test.sh
The purpose is to build local images for testing

#!/bin/bash
set -e

# Local Build and Test Script for JWT-SVID Authentication
# This script builds all necessary images locally and loads them into Kind

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
KAGENTI_DIR="/Users/alan/Documents/Work/kagenti"
CLUSTER_NAME="${CLUSTER_NAME:-kagenti-dev}"

# Auto-detect container runtime (Podman or Docker)
# If KIND_EXPERIMENTAL_PROVIDER is set to podman, use it regardless of what's installed
if [ "${KIND_EXPERIMENTAL_PROVIDER}" = "podman" ]; then
    CONTAINER_RUNTIME="${CONTAINER_RUNTIME:-podman}"
elif ! command -v docker &> /dev/null && command -v podman &> /dev/null; then
    # Docker not available but Podman is
    CONTAINER_RUNTIME="${CONTAINER_RUNTIME:-podman}"
else
    CONTAINER_RUNTIME="${CONTAINER_RUNTIME:-docker}"
fi

echo "Using container runtime: ${CONTAINER_RUNTIME}"

# Function to load image into Kind (handles Podman vs Docker)
load_image_to_kind() {
    local image_name="$1"
    if [ "${CONTAINER_RUNTIME}" = "podman" ]; then
        # Podman: save to tar and load
        # Replace colons and slashes to make valid filename
        local tar_file="/tmp/$(echo ${image_name} | sed 's|[:/]|-|g').tar"
        ${CONTAINER_RUNTIME} save "${image_name}" -o "${tar_file}"
        kind load image-archive "${tar_file}" --name "${CLUSTER_NAME}"
        rm -f "${tar_file}"
    else
        # Docker: direct load
        kind load docker-image "${image_name}" --name "${CLUSTER_NAME}"
    fi
}

echo "=========================================="
echo "Building Local Images for JWT-SVID Testing"
echo "Cluster: ${CLUSTER_NAME}"
echo "=========================================="

# Check if cluster exists
if ! kind get clusters | grep -q "^${CLUSTER_NAME}$"; then
    echo "❌ Kind cluster '${CLUSTER_NAME}' not found"
    echo "Please create it first or set CLUSTER_NAME environment variable"
    exit 1
fi

echo "✅ Found Kind cluster: ${CLUSTER_NAME}"
echo ""

# Build spiffe-idp-setup (NEW - from kagenti repo)
echo "=========================================="
echo "Building spiffe-idp-setup"
echo "=========================================="
cd "${KAGENTI_DIR}/kagenti/auth/spiffe-idp-setup"
${CONTAINER_RUNTIME} build -t ghcr.io/kagenti/kagenti/spiffe-idp-setup:local .
load_image_to_kind ghcr.io/kagenti/kagenti/spiffe-idp-setup:local
echo "✅ Built and loaded: spiffe-idp-setup:local"
echo ""

# Build client-registration (CHANGED - UID 1337)
echo "=========================================="
echo "Building client-registration"
echo "=========================================="
cd "${SCRIPT_DIR}/AuthBridge/client-registration"
${CONTAINER_RUNTIME} build -t ghcr.io/kagenti/kagenti-extensions/client-registration:local .
load_image_to_kind ghcr.io/kagenti/kagenti-extensions/client-registration:local
echo "✅ Built and loaded: client-registration:local"
echo ""

# Build kagenti-webhook (CHANGED - container_builder.go)
echo "=========================================="
echo "Building kagenti-webhook"
echo "=========================================="
cd "${SCRIPT_DIR}/kagenti-webhook"
make docker-build IMG=ghcr.io/kagenti/kagenti-extensions/kagenti-webhook:local CONTAINER_TOOL=${CONTAINER_RUNTIME}
load_image_to_kind ghcr.io/kagenti/kagenti-extensions/kagenti-webhook:local
echo "✅ Built and loaded: kagenti-webhook:local"
echo ""

# Build envoy-with-processor (verify UID 1337)
echo "=========================================="
echo "Building envoy-with-processor"
echo "=========================================="
cd "${SCRIPT_DIR}/AuthBridge/AuthProxy"
${CONTAINER_RUNTIME} build -f Dockerfile.envoy -t ghcr.io/kagenti/kagenti-extensions/envoy-with-processor:local .
load_image_to_kind ghcr.io/kagenti/kagenti-extensions/envoy-with-processor:local
echo "✅ Built and loaded: envoy-with-processor:local"
echo ""

# Build proxy-init
echo "=========================================="
echo "Building proxy-init"
echo "=========================================="
cd "${SCRIPT_DIR}/AuthBridge/AuthProxy"
${CONTAINER_RUNTIME} build -f Dockerfile.init -t ghcr.io/kagenti/kagenti-extensions/proxy-init:local .
load_image_to_kind ghcr.io/kagenti/kagenti-extensions/proxy-init:local
echo "✅ Built and loaded: proxy-init:local"
echo ""

echo "=========================================="
echo "✅ All images built and loaded successfully!"
echo "=========================================="
echo ""
echo "Images loaded into cluster '${CLUSTER_NAME}':"
echo "  - ghcr.io/kagenti/kagenti/spiffe-idp-setup:local"
echo "  - ghcr.io/kagenti/kagenti-extensions/client-registration:local"
echo "  - ghcr.io/kagenti/kagenti-extensions/kagenti-webhook:local"
echo "  - ghcr.io/kagenti/kagenti-extensions/envoy-with-processor:local"
echo "  - ghcr.io/kagenti/kagenti-extensions/proxy-init:local"
echo ""
echo "Next steps:"
echo "  1. Update values files to use :local tag"
echo "  2. Run: cd ${KAGENTI_DIR} && deployments/ansible/run-install.sh --env dev"
echo "  3. Verify SPIRE and Keycloak are running"
echo "  4. Run the AuthBridge demo"
echo ""

kagent/deployments/envs/dev_values_local_images.yaml
The purpose is to configure Kagenti to use local images

# ============================================================================
# dev_values_local_images.yaml
# ============================================================================
# Local image overrides for testing with :local tags
#
# USAGE: Add this as an additional overlay for local testing:
#   run-install.sh --env dev \
#     --env-file deployments/envs/dev_values_federated-jwt.yaml \
#     --env-file deployments/envs/dev_values_local_images.yaml
#
# ⚠️  DO NOT USE IN PRODUCTION - This file is for local testing only!
#
# This file overrides image tags to use :local and pullPolicy to Never,
# allowing testing with locally-built images loaded into Kind cluster.
# ============================================================================

# Override cluster creation for manual Kind cluster setup
create_kind_cluster: false
kind_cluster_name: kagenti-dev

charts:
  kagenti:
    values:
      # Override SPIFFE IdP setup image
      spiffeIdp:
        image:
          repository: ghcr.io/kagenti/kagenti/spiffe-idp-setup
          tag: local
          pullPolicy: Never

      # Override AuthBridge sidecar images
      authBridge:
        images:
          clientRegistration:
            tag: local
            pullPolicy: Never
          envoyProxy:
            tag: local
            pullPolicy: Never
          proxyInit:
            tag: local
            pullPolicy: Never

      # Override webhook image
      components:
        platformWebhook:
          image:
            repository: ghcr.io/kagenti/kagenti-extensions/kagenti-webhook
            tag: local
            pullPolicy: Never

kagenti-extensions/verify-spire-keycloak.sh
The purpose is to see if SPIRE is configured properly for SPIFFE/Keycloak

#!/bin/bash
set -e

# Verification script for SPIRE and Keycloak setup
echo "=========================================="
echo "Verifying SPIRE and Keycloak Setup"
echo "=========================================="
echo ""

# Check SPIRE
echo "1. Checking SPIRE server..."
if kubectl get pods -n spire-server -l app.kubernetes.io/name=server | grep -q "Running"; then
    echo "✅ SPIRE server is running"
else
    echo "❌ SPIRE server is not running"
    kubectl get pods -n spire-server
    exit 1
fi
echo ""

# Check SPIRE OIDC discovery provider
echo "2. Checking SPIRE OIDC discovery provider..."
if kubectl get pods -n spire-server -l app.kubernetes.io/name=spiffe-oidc-discovery-provider | grep -q "Running"; then
    echo "✅ SPIRE OIDC discovery provider is running"
else
    echo "❌ SPIRE OIDC discovery provider is not running"
    kubectl get pods -n spire-server
    exit 1
fi
echo ""

# Check SPIRE JWKS endpoint
echo "3. Checking SPIRE JWKS endpoint..."
JWKS_URL="http://spire-spiffe-oidc-discovery-provider.spire-server.svc.cluster.local/keys"
if kubectl run -it --rm --restart=Never curl-test --image=curlimages/curl:latest -- curl -s "${JWKS_URL}" | grep -q '"use"'; then
    echo "✅ SPIRE JWKS has 'use' field"
else
    echo "❌ SPIRE JWKS missing 'use' field"
    exit 1
fi
echo ""

# Check Keycloak
echo "4. Checking Keycloak..."
if kubectl get pods -n keycloak -l app=keycloak | grep -q "Running"; then
    echo "✅ Keycloak is running"
else
    echo "❌ Keycloak is not running"
    kubectl get pods -n keycloak
    exit 1
fi
echo ""

# Check Keycloak admin secret
echo "5. Checking Keycloak admin secret..."
if kubectl get secret -n keycloak keycloak-initial-admin &>/dev/null; then
    echo "✅ Keycloak admin secret exists"
    echo "Username: $(kubectl get secret -n keycloak keycloak-initial-admin -o jsonpath='{.data.username}' | base64 -d)"
else
    echo "❌ Keycloak admin secret not found"
    exit 1
fi
echo ""

# Check SPIFFE IdP setup job
echo "6. Checking SPIFFE IdP setup job..."
if kubectl get job -n kagenti-system kagenti-spiffe-idp-setup-job &>/dev/null; then
    JOB_STATUS=$(kubectl get job -n kagenti-system kagenti-spiffe-idp-setup-job -o jsonpath='{.status.conditions[?(@.type=="Complete")].status}')
    if [ "$JOB_STATUS" == "True" ]; then
        echo "✅ SPIFFE IdP setup job completed successfully"
        echo ""
        echo "Job logs:"
        kubectl logs -n kagenti-system job/kagenti-spiffe-idp-setup-job --tail=20
    else
        echo "⚠️  SPIFFE IdP setup job has not completed yet"
        kubectl get job -n kagenti-system kagenti-spiffe-idp-setup-job
        echo ""
        echo "Job logs:"
        kubectl logs -n kagenti-system job/kagenti-spiffe-idp-setup-job --tail=50
    fi
else
    echo "⚠️  SPIFFE IdP setup job not found (may not be deployed yet)"
fi
echo ""

echo "=========================================="
echo "✅ Verification Complete"
echo "=========================================="
echo ""
echo "To access Keycloak Admin Console:"
echo "  1. Open: http://keycloak.localtest.me:8080/admin"
echo "  2. Switch to the 'kagenti' realm"
echo "  3. Check Identity Providers → Should see 'spire-spiffe' (Type: SPIFFE)"
echo ""

@Alan-Cha

Copy link
Copy Markdown
Member Author

Replaced by #187

@Alan-Cha Alan-Cha closed this Mar 10, 2026
anatolykoyfman added a commit that referenced this pull request Aug 26, 2026
Thin serialization shell over check_policy_conflicts: any completed survey
returns 200 with the ConflictReport JSON body (the controller's first JSON
response body). Unlike the live /apply path, a found conflict is a recorded
diagnosis and never 422; the resolver's pre-survey HTTPException(502/404)
propagates unchanged as a bare non-2xx with no report body, and a missing
policy_text is a FastAPI validation 422. The /apply routes and the
PolicyContradictionError/PolicyRulesBuilderError -> 422 handlers are untouched.

Refs #159. Part of #154.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Anatoly Koyfman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Use SPIRE JWT to authenticate with Keycloak (use Federated Client Auth)

1 participant