Skip to main content
API resource reference for SecurityPolicy, an Envoy Gateway extension resource. To create or change one, see Changing resources; to inspect, see Reading resources.
This resource is part of the v1alpha1 API (an Envoy Gateway extension) and is subject to change. Fields and behavior may change in future releases.

Identity

Overview

A SecurityPolicy applies security controls to a Gateway or to a route served by it. It is an Envoy Gateway extension to the Gateway API standard, defined by the Envoy Gateway API, attached to a target resource through a policy reference rather than being embedded in the Gateway itself. Use it when you want to enforce authentication, authorization, or browser access rules on traffic entering your Project — for example requiring JWT or OIDC login, checking API keys or HTTP Basic credentials, delegating to an external authorization service, or configuring Cross-Origin Resource Sharing (CORS). A single policy attaches to one or more Gateways (or specific listeners/routes) and must live in the same Project as the resources it targets.

Spec fields

Each of the security features below is optional; set the ones you want to enforce. targetRefs selects what the policy applies to.

Status fields (read-only)

Usage

Run datumctl explain securitypolicies --recursive to see the full, live field tree for this resource.
Last modified on July 2, 2026