Security model

How Foundation provides identity, authorization, secrets, isolation, and secure service exposure.

Agentic Friendly

Foundation security is built from several cooperating controls rather than a single security product. Security and compliance describes the same controls from the customer's point of view, with the configuration each one needs.

Security domains

The Foundation security model is based on these domains:

  • Identity Keycloak provides authentication and identity federation. Each tenant is a Keycloak Organization, which the BSQAI Tenant Operator creates and which can broker the tenant's own OIDC or SAML identity provider.
  • Authorization OpenFGA stores the relationships behind the BSQAI API's roles and permissions. Each service authorizes the requests it receives.
  • Secrets and sensitive configuration Platform secrets reach workloads through Sealed Secrets, the default, or through External Secrets Operator from a customer-managed Vault. OpenBao runs as a separate secrets service that operators sign in to; platform workloads do not receive their secrets from it. See Secret delivery.
  • Transport security The shared gateway terminates TLS with the certificate that cert-manager issues or that the site supplies, and answers every plain-HTTP request with a redirect to HTTPS.
  • Network isolation Kubernetes network policies limit each platform workload to the callers and services it uses. An optional default-deny closes every platform namespace, and each tenant namespace receives its own default-deny. Only named BSQAI API workloads reach the internal model gateway. These controls need a network plugin that enforces network policies. See Network policies.
  • Tenant isolation Each tenant runs in its own namespace, tenant-<slug>, with a ResourceQuota and a LimitRange. By default it gets its own object storage bucket, and its database roles reach only its own databases.
  • Workload posture and vulnerabilities Kyverno and Kubernetes ValidatingAdmissionPolicy resources enforce admission rules. They hold tenant models to the serving runtimes and resource profiles of the tenant's deployment policy and to the tenant's GPU queues, and hold agent sandbox pods to the Kata Containers runtime. The optional Kubescape component, when deployed, scans running workloads every day for configuration weaknesses and known image vulnerabilities, and keeps its findings in the cluster.

Request security flow

In a typical Foundation flow:

  1. a user or client reaches a platform endpoint through the shared Envoy gateway, which terminates TLS and, on the BSQAI API route, validates a presented Keycloak token
  2. authentication is delegated to the platform identity layer: Keycloak tokens, or API keys that the BSQAI API checks itself
  3. authorization is enforced by the service, through its roles and permissions in OpenFGA, and by gateway policies for some operator UIs
  4. workloads consume secrets through controlled platform mechanisms rather than hard-coded credentials

SSO enrollment model

Platform components do not register with Keycloak manually. The platform CLI generates Kubernetes jobs that automatically enroll each SSO-enabled component into Keycloak before the component starts:

  • A setup job (deployed at a negative sync wave) creates or updates the component's OIDC client, groups, roles, and group-role mappings.
  • A PostDelete cleanup job removes those resources when the component is deleted.

This means SSO integration is declarative: it is defined in the [sso] table of each component's variables.toml and applied automatically during each Argo CD sync. Components do not need custom login code or manual Keycloak admin steps.

Argo CD is the exception. It is installed with bsqai helm-apply argocd, so its client is rendered into the Keycloak application instead and set up after Keycloak syncs.

Each supported component can be opted in or out of SSO through its [sso] enabled field. For details, see the Keycloak component page and Configuration model.

Product behavior

This model gives BullSequana AI a consistent approach to:

  • single sign-on for platform services
  • automatic SSO enrollment and cleanup for every component
  • secure service exposure
  • centralized credential handling
  • network and tenant isolation
  • auditable access patterns
  • reusable platform controls across products

Platform-wide controls

Foundation security is not isolated to Foundation pages. It is the base security model inherited by other platform layers. That is why components such as Keycloak, OpenFGA, cert-manager, and the platform network policies appear repeatedly across the rest of the stack.

On this page