跳到正文
cccskills
免费在 GitHub 公开

istio:ambient-waypoint

Configure L7 AuthorizationPolicy in Istio Ambient mode using waypoint proxies

中文简介正在准备中。当前显示原文说明。

rossoctl/rossoctl星标 303(GitHub 303 + cccskills 0)
集成工具Kubernetes

实测评分 未实测

查看安装方法

包含的文件(1)

  • SKILL.md5.6 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Istio Ambient Waypoint Authorization

Configure L7 AuthorizationPolicy in Istio Ambient mode using waypoint proxies.

Table of Contents

Overview

In Istio Ambient mode:

  • ztunnel: Handles L4 traffic (TCP, mTLS) - cannot evaluate HTTP paths
  • Waypoint: Handles L7 traffic (HTTP) - can evaluate paths, methods, headers

To enforce path-based authorization, you need a waypoint proxy.

Architecture

Client -> ztunnel (L4 mTLS) -> Waypoint (L7 HTTP) -> Service
                                    |
                              AuthorizationPolicy
                              (evaluates path, method)

Waypoint Gateway Configuration

Create a waypoint for the service that needs L7 authorization:

apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: mlflow-waypoint
  namespace: rossoctl-system
  labels:
    istio.io/waypoint-for: service
spec:
  gatewayClassName: istio-waypoint
  listeners:
    - name: mesh
      port: 15008
      protocol: HBONE

Key points:

  • istio.io/waypoint-for: service - This waypoint handles service traffic
  • gatewayClassName: istio-waypoint - Uses the Istio waypoint class
  • Port 15008 with HBONE protocol is standard for waypoints

Service Configuration

Label the service to use the waypoint:

apiVersion: v1
kind: Service
metadata:
  name: mlflow
  namespace: rossoctl-system
  labels:
    istio.io/use-waypoint: mlflow-waypoint
spec:
  ports:
    - port: 5000
  selector:
    app: mlflow

AuthorizationPolicy with targetRefs

In Ambient mode, use targetRefs instead of selector:

apiVersion: security.istio.io/v1
kind: AuthorizationPolicy
metadata:
  name: mlflow-traces-from-otel
  namespace: rossoctl-system
spec:
  targetRefs:
    - kind: Service
      group: ""
      name: mlflow
  action: ALLOW
  rules:
    - from:
        - source:
            principals:
              - "cluster.local/ns/rossoctl-system/sa/otel-collector"
      to:
        - operation:
            methods: ["POST"]
            paths: ["/v1/traces"]

Key points:

  • targetRefs points to the Service, not a selector
  • group: "" is required for core Kubernetes resources
  • principals uses SPIFFE ID format

Multiple Rules Example

Allow different sources for different paths:

apiVersion: security.istio.io/v1
kind: AuthorizationPolicy
metadata:
  name: mlflow-api-access
  namespace: rossoctl-system
spec:
  targetRefs:
    - kind: Service
      group: ""
      name: mlflow
  action: ALLOW
  rules:
    # OTEL collector can POST traces
    - from:
        - source:
            principals:
              - "cluster.local/ns/rossoctl-system/sa/otel-collector"
      to:
        - operation:
            methods: ["POST"]
            paths: ["/v1/traces"]

    # UI can access all endpoints
    - from:
        - source:
            principals:
              - "cluster.local/ns/rossoctl-system/sa/rossoctl-ui"
      to:
        - operation:
            methods: ["GET", "POST"]
            paths: ["/*"]

Complete Example

Full configuration for MLflow with OAuth2 and Istio authorization:

---
# Waypoint Gateway
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: mlflow-waypoint
  namespace: rossoctl-system
  labels:
    istio.io/waypoint-for: service
spec:
  gatewayClassName: istio-waypoint
  listeners:
    - name: mesh
      port: 15008
      protocol: HBONE
---
# Service with waypoint label
apiVersion: v1
kind: Service
metadata:
  name: mlflow
  namespace: rossoctl-system
  labels:
    istio.io/use-waypoint: mlflow-waypoint
spec:
  ports:
    - port: 5000
  selector:
    app: mlflow
---
# Authorization Policy
apiVersion: security.istio.io/v1
kind: AuthorizationPolicy
metadata:
  name: mlflow-traces-from-otel
  namespace: rossoctl-system
spec:
  targetRefs:
    - kind: Service
      group: ""
      name: mlflow
  action: ALLOW
  rules:
    - from:
        - source:
            principals:
              - "cluster.local/ns/rossoctl-system/sa/otel-collector"
      to:
        - operation:
            methods: ["POST"]
            paths: ["/v1/traces"]

Troubleshooting

Authorization Denied

  1. Check waypoint is running:
kubectl get pods -n rossoctl-system -l gateway.networking.k8s.io/gateway-name=mlflow-waypoint
  1. Check service has waypoint label:
kubectl get svc mlflow -n rossoctl-system -o yaml | grep waypoint
  1. Check principal format:
istioctl proxy-config secret <pod> -n rossoctl-system

Waypoint Not Processing Traffic

  1. Verify ambient mode is enabled:
kubectl get namespace rossoctl-system -o yaml | grep ambient
  1. Check ztunnel logs:
kubectl logs -n istio-system -l app=ztunnel

Policy Not Evaluated

  1. Ensure targetRefs is used (not selector)
  2. Verify group: "" for core resources
  3. Check policy is in same namespace as service

Sidecar vs Ambient

FeatureSidecar ModeAmbient Mode
AuthorizationPolicy targetselectortargetRefs
L7 processingAutomaticRequires waypoint
Resource overheadPer-pod sidecarShared waypoint

Related Skills

  • auth:keycloak-confidential-client
  • auth:otel-oauth2-exporter

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

auth

免费

Authentication and authorization patterns for Rossoctl services

中文简介正在准备中。当前显示原文说明。

rossoctl/rossoctl3032026年10月25日 更新

Create confidential OAuth2 clients in Keycloak for server-to-service authentication

中文简介正在准备中。当前显示原文说明。

rossoctl/rossoctl3032026年10月25日 更新

Configure MLflow with mlflow-oidc-auth plugin for Keycloak OIDC authentication

中文简介正在准备中。当前显示原文说明。

rossoctl/rossoctl3032026年10月25日 更新

Configure OpenTelemetry Collector with OAuth2 authentication for trace export

中文简介正在准备中。当前显示原文说明。

rossoctl/rossoctl3032026年10月25日 更新

ci

免费

CI pipeline monitoring, status checks, and PR validation workflows

中文简介正在准备中。当前显示原文说明。

rossoctl/rossoctl3032026年10月25日 更新

Monitor running CI jobs, wait for completion, create tasks for results

中文简介正在准备中。当前显示原文说明。

rossoctl/rossoctl3032026年10月25日 更新

查看 rossoctl 的全部技能

报告此技能的问题