Docs
Live demo

Applications

Protect web applications in Kubernetes clusters behind Principal sign-in and manage who gets in with rules.

On this page

Where to find them#

Open Resources → a Kubernetes cluster → Applications card. Links from rules, templates, Drift or search unfold the application there.

On this screen#

Each Ingress host becomes one application protecting all paths on that Ingress. Another Ingress on the same host is a separate application.

Element What it shows or does
Add application
Lists unprotected Ingresses (excluding Principal, sign-in service and system namespaces) with Rescan cluster. Previews via Add this application?. Adding changes nothing in the cluster.
Checkboxes, Give sign-in, Remove sign-in
Bulk-adds or removes a group across up to 500 apps. Preview shows per-app status and groups apps by Dex client’s Include nested groups (Nested groups on, Nested groups off, Clients differ on nested groups, No Principal sign-in yet). Skips apps where the group has multiple rules.

An application#

Part What it shows or does
Address, Ingress, Services
Where the application runs.
Who can sign in
Rules granting access (connector groups show full path, e.g. acme/platform/backend). Add rule opens the rule form pre-filled.
Sign-in
Dex clients, SSO gate and sign-in settings.
Delete application
Removes from Principal (Ingress stays in cluster). Offers Retry deletion if deletion does not start within 2 minutes.

States and statuses#

State Meaning
Ingress not found
Missing at last discovery (hourly or manual refresh). Rules and Dex clients stay intact. Clears if Ingress returns with the same namespace, name and host. Otherwise delete the application.
Any GitLab user can sign in
GitLab client has no GitLab group. Flagged under Health → Needs attention.

Sign-in#

Each application uses a Dex OAuth client in one of three modes:

Mode How it works
Ingress SSO gate
Sign-in service fronts the Ingress at <path>/oauth2 (for regex paths like /console(/.*)?, uses literal prefix /console/oauth2, or /oauth2/console if the regex catches <path>/oauth2). No app setup needed.
Native OIDC
App authenticates directly using the client ID and secret shown once.
Ingress SSO gate + Native OIDC
Gate fronts the Ingress and the app also uses the same Dex client.
  • Sign in with GitLab requires a GitLab group (on the client or Dex GitLab method). Legacy group-less clients keep working with Any GitLab user can sign in until updated.
  • Include nested groups (off by default, per client) includes subgroups of rule groups.
  • Require an email address blocks users without an email in Principal. Every client edit previews Dex and cluster changes first.
  • Shared Dex isolation: Sign-in and Needs attention show only your org’s clients (never Principal console/kubectl clients). A client belongs to the first org or app that added it (duplicate-host apps in your org need distinct client IDs). Manual Dex clients appear only if no other org shares that host.
  • Trusted networks: listed by name on SSO gate options. IP addresses and full IaC address annotations appear only to roles that can read org security settings.

When someone has no access#

Users without a rule see No access to <app> with Sign-in page branding:

  • Request access: notifies channels subscribed to Access requested and changes to Request sent. Limited to once per app per day (5/day total). Hidden for users outside installation GitLab groups or when no channel subscribes. Does not grant access automatically.
  • Sign in as someone else: restarts Principal sign-in (sign out of GitLab separately to switch GitLab accounts).

Protect new Ingresses#

When enabled on a managed cluster, Principal closes every new Ingress on creation and adds it to Applications in SSO gate mode within 1–2 minutes.

Case What Principal does
New cluster with bundled Dex SSO apps
Enabled by default (also turns on cluster SSO apps).
Pre-existing cluster
Off by default.
Pre-existing Ingresses
Stay open until added as applications.
Turning the setting off
Leaves closed Ingresses protected. Deleting the cluster removes protection.
Switching cluster to Observe
Turn off first. Saving both removes protection while managed (fails if unreachable).
Principal unreachable (>5s)
Ingress is created open, then closed at next hourly discovery.

On clusters in Observe, Applications shows The cluster is in Observe. Principal doesn’t change app sign-in here. with Manage it (bulk changes and Edit disabled, Delete client works only without an SSO gate). See Targets.

Left open: Principal/Dex/sign-in Ingresses, kube-system, kube-public, kube-node-lease, d8-*, cert-manager ACME challenges, namespaces labeled principal.io/ingress-protection: disabled, and Ingresses annotated principal.io/protect: "false" (anyone able to create an Ingress can set this).

Refused new Ingresses:

Refused Ingress What to change
Non-ingress-nginx controller or no ingress class
Use an ingress-nginx class.
No host, wildcard, multiple hosts, or metadata.generateName only
Use one Ingress per host.
Site mixed with sign-in/system path (e.g. /oauth2)
Split sign-in paths into a separate Ingress.
Auth-bypass annotations (e.g. satisfy: any)
Remove those annotations.
Name collides with an app on another host
Use a different name.

Health paths like /healthz stay protected with the Ingress. Ingresses already belonging to an application follow that application’s settings.

Limits and permissions#

  • Access is granted only by rules. One Application template serves all applications.
  • Delete order: Dex clients → application (removes its rules) → cluster.
  • On Observe clusters, clients with an SSO gate (and their app and cluster) cannot be deleted until switched to managed via Manage it.
  • Removing a person from a group or deleting a rule ends open app sessions (applied when an unreachable cluster returns). Leaving a group ends sessions for all members of that group’s apps so they sign in again.
  • Members or service accounts removed from the organization in Principal 5.0.0+ cannot sign in until re-added (same for connector users without membership at upgrade).
  • Out-of-band Dex client changes appear in Drift (Fix restores Principal’s state).

Tasks on this screen#

In the API#

GET /applications, POST /applications/candidates/refresh, GET /applications/candidates, POST /applications/adoption-preview, POST /applications, GET /applications/{id}/sign-in, POST /applications/{id}/sign-in/preview, POST /applications/{id}/sign-in/apply, DELETE /applications/{id}. Protection of new Ingresses: protect_new_ingresses in PUT /targets/{id}. Example: Put an application behind the SSO gate.

↑ ↓ to moveEnter to openEsc to close