ON-PREM CHOREO CLOUD BOTH

What it is

platform-api (PAS) is Choreo Cloud's proxy between its own services and customer infrastructure. It receives calls from Agent Manager and consoles, works out which organization they belong to, and forwards them to the right OpenChoreo API. It also runs hooks and provisions new organizations.

Why it exists

Customers share clusters. A single trusted bridge makes sure each call is mapped to the right organization and checked for entitlements.

How it works

  • Forwards on three prefixes: /wso2cloud-cp (the OpenChoreo API of Choreo Cloud's own cluster), /wso2cloud-dp (the customer OpenChoreo API) and /wso2cloud-oc-dp (selected Kubernetes objects).
  • Maps the organization id in the user's token to a namespace named wc-<8 hex of org id>-<8 hex of hash>.
  • Swaps the user's token for a system token before it calls OpenChoreo.
  • Hooks check billing entitlement on creates, returning 402 when exceeded.

Identity and access

Reads the organization from the caller's JWT, never from the URL. It holds the system credentials for OpenChoreo, so callers never do.

Key facts

Cluster
cloud-cp (project core)
Prefixes
/wso2cloud-cp, /wso2cloud-dp, /wso2cloud-oc-dp
Side
Choreo Cloud control plane
Namespace
cloud-cp

Talks to (6)

  • calls OpenChoreo 1.2.0
    Hooks: namespace injection, entitlement, secretref validation
    HTTPS OC API
  • calls agent-manager-service (AMS)
    Register gateways, push thunder URL
    HTTPS /api/v1/orgs/{handle}/...
  • calls cloud-dp-oc-cp (customer control plane)
    PAS is the only bridge from the WC side to the customer side
    HTTPS /wso2cloud-dp and /wso2cloud-oc-dp
  • calls openchoreo-api
    Platform-api forwards customer workload calls to the OpenChoreo API after namespace injection
    HTTPS /api/v1/namespaces/{ns}/..., prefix /wso2cloud-dp
  • sends telemetry to NATS JetStream WSO2CLOUDEVENTS
    After OpenChoreo creates an Environment, platform-api announces it on NATS together with the decision of who provisions it
    NATS subject for environment-created
  • calls orchestrator-api
    The platform-api subscriber asks the orchestrator to run the environment recipe and replay the recipes of the organization latest environment
    HTTP POST /provisioning/environments/{env}/provisions

Used by (7)

  • called by agent-platform AMS shell
    AMS reaches OpenChoreo through PAS in SaaS
    HTTPS /wso2cloud-dp proxy
  • called by agent-manager-service (AMS)
    AMS reaches OpenChoreo through PAS (OPEN_CHOREO_BASE_URL is the internal gateway plus PAS base path)
    HTTPS via internal API Platform gateway
  • needed by Org to namespace mapping wc-<org8>-<hash8>
    PAS computes the namespace from the org UUID
  • called by Platform IdP (ThunderID private build)
    Sign-up flow notifies platform-api that an organization was created
    HTTP POST /webhooks/organizations on port 8082
  • called by identity-platform-provisioner
    The identity-platform-provisioner applies the widp-dp ResourceType, Resource and binding to the customer data plane through platform-api
    HTTPS platform-api oc-dp proxy /wso2cloud-oc-dp
  • called by agent-manager-provisioner
    The provisioner writes the amp-gateway ResourceType, Resource and binding, and reads the environment, through platform-api
    HTTPS platform-api CP API proxy /wso2cloud-dp
  • called by API Platform gateways on cloud-cp
    The internal gateway routes Agent Manager calls to platform-api, which calls OpenChoreo with its own system token
    HTTPS platform-api internal base path

Inside and around

Part of: cloud-cp (cloud control plane)