ON-PREM CHOREO CLOUD BOTH

What it is

git-app-service is a Choreo Cloud backend service on cloud-cp that lets customers connect their private repositories to platform components. It supports GitHub (through a GitHub App), Azure DevOps, Bitbucket and GitLab. It lets the console browse repositories, remembers each component's source, registers webhooks for automatic builds, and prepares a clone credential just before a build.

It is a hotel front desk that cuts a key card for one night's stay, instead of giving the guest a copy of the master key.

Why it exists

Builds of private code need a credential, but a long-lived one stored for every customer would be risky. For GitHub this service issues a short-lived one for each build, and it keeps the customer's repositories tied to their own organization.

How it works

  • A user connects a GitHub App installation (or an Azure DevOps, Bitbucket or GitLab account). The service saves the connection against the user's organization (ouId) and checks the user really has access to it.
  • The console lists repositories, branches and files, and saves the chosen repository as the component's source binding.
  • Just before a build, the service gets a clone token (for GitHub a freshly created installation token that lasts about an hour, for the other providers the user's OAuth token) and writes it as a Kubernetes Secret named <run>-git-secret in the workflows-<namespace> area of the workflow plane.
  • Agent Manager on Choreo Cloud reaches it only through the platform-api /git facade, and the browser is not allowed to ask for the build secret directly.
  • Webhooks it registers send push events back to it at /webhook/<provider>/trigger so builds can start automatically.

Identity and access

Callers present the user's platform JWT, and every call is limited to the organization in it. The service calls GitHub as a GitHub App, and calls the other providers with OAuth tokens the user consented to.

Key facts

Runs on
cloud-cp
Providers
GitHub, Azure DevOps, Bitbucket, GitLab
Build secret
<run>-git-secret in workflows-<namespace>
Tenancy
Per organization (ouId)
Edition
Choreo Cloud (SaaS)
Namespace
cloud-cp

Used by (1)