API endpoint security
Secure your public and internal Red Hat OpenStack Services on OpenShift (RHOSO) API endpoints. Implement TLS encryption, configure network policies, and manage access to minimize security risks in your cloud deployment.
In RHOSO 18.0, the endpoint architecture is different from Red Hat OpenStack Platform (RHOSP) 17.1. There is no HAProxy running on controller nodes. Instead, the only supported mechanism for public endpoints is to expose public API endpoints as Red Hat OpenShift Container Platform (RHOCP) Routes, and expose internal API endpoints through MetalLB LoadBalancer Services on isolated networks. TLS is enabled everywhere by default through the cert-manager Operator and cannot be disabled.
Endpoint architecture Copy linkLink copied!
OpenStack API endpoints are exposed in two layers: public endpoints with Red Hat OpenShift Container Platform (RHOCP) Routes, and internal endpoints with MetalLB LoadBalancer services.
- Public endpoints
- Public endpoints are exposed as Red Hat OpenShift Container Platform (RHOCP) Routes and are the only endpoints accessible outside the RHOCP cluster. Routes end TLS at the RHOCP ingress controller, typically HAProxy Ingress managed by OpenShift, and re-encrypt traffic to the service pod. You cannot override the default public endpoint mechanism, and only Routes are supported for public endpoints.
- Internal endpoints
-
Internal endpoints are exposed as Kubernetes Services of type LoadBalancer, backed by MetalLB. These endpoints are reachable only on the isolated networks such as InternalAPI, Storage, and others. Configure internal endpoints through
NetworkAttachmentDefinitionsandNMState. Each internal endpoint receives a VIP from the MetalLB IPAddressPool.
The Identity service (keystone) service catalog registers both public and internal URLs. OpenStack services communicate with each other through the internal endpoints by default, keeping inter-service traffic off the public network. In Red Hat OpenStack Platform (RHOSP) 17.1, registration of internal URLs was automated by director. In RHOSO 18.0, the OpenStack Operator automatically registers both public Route-based and internal MetalLB-based endpoints in the keystone catalog during control plane deployment.
TLS encryption for endpoints Copy linkLink copied!
TLS everywhere (TLS-e) is enabled by default and cannot be disabled. The cert-manager Operator manages certificate issuance, tracking, and renewal automatically.
TLS operates at two layers, ingress TLS and pod-level TLS:
- Ingress TLS encrypts traffic between external clients and the Red Hat OpenShift Container Platform (RHOCP) Route. The Route terminates TLS and re-encrypts to the pod.
- Pod-level TLS encrypts traffic between pods within the
openstacknamespace. Each service pod receives its own certificate from cert-manager that covers inter-service communication, such as nova-api calling the Identity service keystone for token validation.- Certificate configuration
-
Certificate lifetimes are configured in the
OpenStackControlPlaneCR under the tls spec. The default configuration provides separate CA and certificate durations for ingress, internal, libvirt, and OVN:
spec: tls: ingress: ca: duration: 87600h0m0s # 10 years cert: duration: 43800h0m0s # 5 years enabled: true podLevel: enabled: true internal: ca: duration: 87600h0m0s cert: duration: 43800h0m0s- Custom certificate authorities
-
If you want to sign certificates with your own internal CA instead of the autogenerated cert-manager CA, you can create custom Issuers for both ingress or public, and internal or pod-level endpoints:
- Create a Kubernetes Secret containing your CA certificate and private key.
- Create a cert-manager Issuer resource referencing that Secret.
- Reference the custom Issuer in the
OpenStackControlPlaneCR usingtls.ingress.ca.customIssuerortls.podLevel.internal.ca.customIssuer.Important When using custom CAs, you must distribute the CA certificate to all clients that access the OpenStack API. Extract the CA from therootca-publicSecret and add it to yourclouds.yamlusing thecacertparameter.
- Replacing the RHOSP 17.1 HAProxy TLS cipher configuration
-
In Red Hat OpenStack Platform (RHOSP) 17.1, TLS cipher suites and minimum protocol versions were configured through Hiera
tripleo::haproxy::ssl_optionsand applied to HAProxy on controller nodes. In RHOSO 18.0, this configuration does not exist. TLS termination is handled by Red Hat OpenShift Container Platform (RHOCP) Ingress Controller andcert-manager:- Use RHOCP Ingress Controller for public Routes. Configure Cipher suites and TLS minimum version in the
IngressControllerCR. - Use
cert-managerfor pod-level TLS. Certificate key algorithms and sizes are determined by the Issuer configuration. Services use the Go TLS stack, which defaults to TLS 1.2 or higher with modern cipher suites.Note There is no equivalent to the RHOSP 17.1tls-ciphers.yamlheat template. To enforce a minimum of TLS 1.3 on public endpoints, configure the RHOCP IngressController with'spec.tlsSecurityProfile.type: Custom'and set'minTLSVersion: VersionTLS13'.
- Use RHOCP Ingress Controller for public Routes. Configure Cipher suites and TLS minimum version in the
Internal API communications Copy linkLink copied!
OpenStack services communicate with each other with internal endpoints instead of public endpoints. Internal endpoints are backed by MetalLB LoadBalancer VIPs on isolated networks so that inter-service traffic stays on the InternalAPI network.
Verify that inter-service traffic uses internal endpoints by inspecting the Identity service (keystone) service catalog:
$ oc rsh openstackclient
$ openstack endpoint list --interface internal
If any service is misconfigured to use the public URL for internal communication, traffic routes with the Red Hat OpenShift Container Platform (RHOCP) ingress controller, increasing latency and exposing internal calls to the public network path.
NetworkPolicy or RHOCP configuration prevents pods in the openstack namespace from reaching MetalLB VIPs on the InternalAPI network to prevent services falling back to public endpoints.
API request pipeline security Copy linkLink copied!
In Red Hat OpenStack Platform (RHOSP) 17.1, OpenStack services used the Python Paste Deploy library with configuration files such as api-paste.ini on disk. The API request pipeline is defined within the default container images.
In RHOSO 18.0, there are no user-editable api-paste.ini files. This eliminates the risk of pipeline manipulation through file system access. Adding non-standard middleware to the API pipeline can introduce unpredictable security vulnerabilities. Ensure that you test any custom container images in a non-production environment and consult your organization’s image scanning and approval process before deployment.
Metadata definition API security Copy linkLink copied!
Use the Image service (glance) metadata definition (metadef) APIs to define key-value pairs and tag metadata. By default, only administrators can create, update, or delete metadef resources.
The default metadef prevents the following two risks:
- Information disclosure
- Metadef namespaces could leak sensitive resource names such as customer names or internal project identifiers to unauthorized users.
- Denial of service
- There is no built-in limit on the number of metadef resources. An unrestricted user could fill the glance database.
Apply metadef policy overrides through customServiceConfig in the glance section of the OpenStackControlPlane CR:
spec:
glance:
template:
glanceAPIs:
default:
customServiceConfig: |
[oslo_policy]
policy_file = /etc/glance/policy.yaml
Provide the policy overrides in a ConfigMap mounted into the glance pod. To grant all users read/write access to metadef APIs, set the metadef_default rule to an empty string (""). To grant read-only access, set it to role:reader.
Network policy for API endpoints Copy linkLink copied!
API endpoints span multiple security zones. The primary mechanism for network-level access control is Kubernetes NetworkPolicy applied in the openstack namespace, not with iptables rules on controller nodes or physical network ACLs.
- Restricting API ingress
-
Apply
NetworkPolicyresources to restrict which source IPs and pods can reach API service pods, such as the following:- Allow ingress to
keystone,nova-api,neutron-api, and other service pods only from the Red Hat OpenShift Container Platform (RHOCP) ingress controller pods for public traffic, and from other OpenStack service pods for internal traffic. - Deny all other ingress by default using a
deny-allNetworkPolicyas a baseline. - For MetalLB-exposed internal endpoints, restrict the source IP ranges in the MetalLB
IPAddressPoolorServiceannotations to theInternalAPICIDR.
Note Verify that no existingNetworkPolicyon the RHOCP cluster blocks communication between theopenstack-operatorsnamespace and theopenstacknamespace. The OpenStack Operator uses this path for reconciliation. - Allow ingress to
- Combining with external controls
-
NetworkPolicyoperates at L3 or L4. For deeper inspection such as L7 HTTP filtering, or payload inspection, deploy an external web application firewall (WAF) or API gateway in front of the RHOCP ingress controller. You can also use physical network segmentation such as VLANs and firewall rules at the switch or router level.
Mandatory access controls Copy linkLink copied!
In Red Hat OpenStack Platform (RHOSP) 17.1, API processes were isolated using SELinux Mandatory Access Control (MAC) and file system permissions Discretionary Access Control (DAC) on the controller hosts.
In Red Hat OpenStack Services on OpenShift (RHOSO) 18.0, process isolation uses multiple complementary mechanisms:
- Security Context Constraints (SCCs)
- In Red Hat OpenShift Container Platform (RHOCP), SCCs define the permissions and access levels a pod can have. They restrict what containers can do, including mounting host directories, running as privileged, requesting specific capabilities, and executing as specific users or UIDs.
- SELinux
-
Red Hat Enterprise Linux CoreOS (RHCOS) nodes run SELinux in enforcing mode. Container processes are labeled with
container_tand are confined by SELinux policy, preventing cross-container and container-to-host access. - Pod Security Admission (PSA)
-
Kubernetes PSA at the namespace level enforces security standards such as privileged, baseline, and restricted. Verify the label on the
openstacknamespace:$ oc get namespace openstack -o jsonpath='{.metadata.labels}' | jq . - Read-only root filesystem
-
Service pods mount configuration as read-only
ConfigMapsandSecrets. There are no writable configuration files in the running container.
API endpoint rate limiting Copy linkLink copied!
Rate limiting protects API endpoints from denial-of-service attacks and brute-force abuse. Without rate limiting, a single client can exhaust API resources and degrade service for all users.
In Red Hat OpenStack Platform (RHOSP) 17.1, all services were behind HAProxy, which you could configure with connection limits. In Red Hat OpenStack Services on OpenShift (RHOSO) 18.0, rate limiting is not included in the Red Hat OpenShift Container Platform (RHOCP) Route or MetalLB Service layer. You must implement rate limiting through one of the following approaches:
- RHOCP Route annotations
-
The HAProxy-based RHOCP ingress controller supports rate-limiting annotations on Route resources such as
haproxy.router.openshift.ioorrate-limit-connectionsand related annotations that provide basic connection-rate throttling per source IP. - External API gateway or WAF
- For production deployments, place an API gateway, such as Red Hat 3scale API Management or a dedicated WAF, in front of the RHOCP ingress. This provides granular rate limiting per API path, per user token, or per project, and can enforce request-size limits.
- oslo.middleware rate limiting
-
Some OpenStack services support
oslo.middlewarerate limiting that you configure throughcustomServiceConfigin the CR.Important Carefully plan rate limits based on actual usage patterns. Inaccurate limits can block legitimate automation workflows such as Heat stacks, Terraform plans, or CI/CD pipelines, that generate high API call volumes in short bursts.
Additional endpoint security controls Copy linkLink copied!
You can also configure audit logging for API access, fernet key rotation, and client certificate distribution for additional hardening for endpoints.
- Audit logging for API access
-
Every API request that enters through an Red Hat OpenShift Container Platform (RHOCP) Route is logged by the RHOCP ingress controller. Enable access logging on the
IngressControllerCR to capture source IPs, request paths, response codes, and latency. Forward these logs to your SIEM for anomaly detection. Additionally, RHOCP API audit logs capture alloc exec,oc rsh, and CR modification events in theopenstacknamespace, which are useful for security logging. - Fernet key rotation
-
The Identity service (keystone) fernet keys are automatically rotated in Red Hat OpenStack Services on OpenShift (RHOSO) 18.0. You can configure the rotation frequency and number of active keys in the
OpenStackControlPlaneCR. Frequent rotation limits the window of opportunity to exploit a compromised token. - Client certificate distribution
-
When RHOSO is deployed with default or custom CA certificates that are not signed by a public CA, you must distribute the CA certificate to every client workstation and automation system that accesses the API. Extract it from the
rootca-publicSecret:$ oc get secret rootca-public -o jsonpath='{.data.ca\.crt}' | base64 -d > ca.crtAdd the CA path to your
clouds.yamlauthentication file:clouds: mycloud: cacert: /path/to/ca.crt auth: auth_url: https://keystone-public-openstack.apps.example.com
RHOSP 17.1 to RHOSO 18.0 endpoint security comparison Copy linkLink copied!
Review the endpoint security differences between Red Hat OpenStack Platform (RHOSP) 17.1 and Red Hat OpenStack Services on OpenShift (RHOSO) 18.0.
| RHOSP 17.1 mechanism | RHOSO 18.0 equivalent | Notes |
|---|---|---|
| HAProxy on controller nodes with TLS termination and connection limits. |
RHOCP Ingress Controller (Routes) for public and MetalLB Services for internal. |
No user-managed HAProxy. TLS handled by cert-manager. |
|
|
|
Configure |
| TLS-e configured by |
TLS-e configured by |
Custom CAs supported with Issuer CRs. |
| Internal URL registration by director. |
Automatic registration by OpenStack Operator. |
Both public and internal endpoints registered in keystone catalog. |
|
|
Pipeline included in container image and no user-editable paste files. |
Custom middleware requires custom container image. |
|
|
|
Same policy keys, different delivery mechanism. |
| iptables and physical network ACLs. |
Kubernetes NetworkPolicy and physical network ACLs. |
NetworkPolicy operates at L3 or L4 within the cluster. |
| SELinux and DAC on controller hosts. |
SCCs and SELinux |
Multiple layers of container isolation. |
| HAProxy connection rate limits. |
RHOCP Route annotations and external WAF/API gateway. |
No built-in rate limiting at MetalLB layer. |