Set up one Edge for two teams
Give two teams in one namespace their own outbound allowlists, and add a shared GitHub token to the platform team's requests, with one Edge.
Give two teams in one namespace their own outbound allowlists, and add a shared GitHub token to the platform team’s requests, with one Edge. Use this when teams share a namespace on Google Cloud and each should reach only its own hosts. In the example, the platform team calls the GitHub API and the data team installs Python packages. Each team reaches only its own hosts, and the token is never on a workstation.
Prerequisites
- Ringleader installed, with the Ringleader application running.
- A Google Cloud project that you set up by following
Onboard Google Cloud, and a
CloudIdentity in the namespace
acmethat places workstations in aus-east4zone. The examples use the namespaceacme; replace it with yours. - Permission to declare an Edge in that namespace. A namespace administrator applies the Edge, the Integration, the WorkstationConfigs and the Policy, and each team member applies their own workstations.
- A GitHub personal access token for the platform team.
- Two workstations, which you create in
Create a workstation for each team. The examples name
them
platform-01anddata-01; replace them with yours.
Declare the Edge
As a namespace administrator, declare one Edge for the region. On AWS and Azure the Edge also names a subnet, as Declare an Edge shows.
Save this as
edge.yaml:apiVersion: core.ringleader.dev/v1 kind: Edge metadata: name: gcp-us-east4 namespace: acme spec: provider: gcp region: us-east4Run
rl apply -f edge.yaml. Ringleader builds the Edge’s VM when the first workstation that needs it reports in.
Add the token for the platform team
Store the token in a Secret, then apply an Integration that adds it to the platform team’s requests to the GitHub API.
Store the token in a Secret named
github-pat:rl secret create github-pat -n acme --from-string token=<your-token>Save this as
integration.yaml:apiVersion: workstations.ringleader.dev/v1 kind: Integration metadata: name: github-api namespace: acme spec: type: httpProxy selector: matchLabels: team: platform httpProxy: rules: - host: api.github.com inject: header: Authorization value: "Bearer ${secret:github-pat/token}"Run
rl apply -f integration.yaml. The Edge now sets theAuthorizationheader on every request that ateam: platformworkstation sends toapi.github.com. Tools on the workstation call the API as if they had signed in, and the token is not on the workstation.
Limit what each team can reach
Apply one WorkstationConfig for each team. Each selects its team’s workstations by label and carries an egress policy (see outbound restrictions).
Save this as
egress.yaml:apiVersion: workstations.ringleader.dev/v1 kind: WorkstationConfig metadata: name: platform-egress namespace: acme spec: selector: matchLabels: team: platform egress: enforcement: strict destinations: - host: github.com - host: "*.githubusercontent.com" --- apiVersion: workstations.ringleader.dev/v1 kind: WorkstationConfig metadata: name: data-egress namespace: acme spec: selector: matchLabels: team: data egress: enforcement: strict destinations: - host: pypi.org - host: files.pythonhosted.orgRun
rl apply -f egress.yaml.
The platform team’s configuration does not list api.github.com, because Ringleader adds a host
that an Integration injects a key for, on ports 80 and 443. A host destination can use only
those two ports, so the platform team clones from GitHub over HTTPS, not SSH.
Destinations Ringleader adds
says which others it adds.
Limit what members can name
Without a Policy, a member can widen their own workstation’s allowlist with a layer of their own. Apply a Policy that sets the destinations anyone in the namespace may name.
Save this as
policy.yaml:apiVersion: core.ringleader.dev/v1 kind: Policy metadata: name: egress-limit namespace: acme spec: priority: 50 rules: egressDestinations: default: deny allow: - github.com - "*.githubusercontent.com" - api.github.com - pypi.org - files.pythonhosted.orgRun
rl apply -f policy.yaml. A Workstation, WorkstationConfig or Integration that names any other destination is now refused when it is applied.
The list includes api.github.com because the Policy also judges the hosts an Integration names.
Egress destination entries says
how entries are matched.
Create a workstation for each team
Each team member applies their own workstation with their team’s label. The file names the provider of the Edge, because a workstation that names none runs on the team member’s own computer.
Save this as
platform-01.yaml:apiVersion: workstations.ringleader.dev/v1 kind: Workstation metadata: name: platform-01 namespace: acme labels: team: platform spec: provider: gcpRun
rl apply -f platform-01.yaml.For a data team workstation, save the same file as
data-01.yamlwith the namedata-01and the labelteam: data, and runrl apply -f data-01.yaml.
Labels are set by the workstation’s owner
team: platform to their own workstation to get the token, or remove
team: data to drop the data team’s allowlist. To keep a token or a host away from some people,
give the people who need it a namespace of their own. Labels and namespaces says why.Check that each team reaches only its own hosts
Until the Edge serves a workstation, the workstation is held closed, and its EgressEnforced
condition reads False and says why.
- Run
rl edge get gcp-us-east4 -n acme. Once the Edge serves the workstations,ReadyreadsTruewith reasonServing. - Run
rl workstation describe platform-01 -n acme.EgressEnforcedreadsTruewith reasonEnforced. - From a shell on each workstation, run the requests in the table below.
| Request | team: platform | team: data |
|---|---|---|
curl https://github.com | Works | Connection reset |
curl https://api.github.com/user | Returns the token owner’s GitHub user | Connection reset |
curl https://pypi.org/simple/requests/ | Connection reset | Works |
curl https://example.com | Connection reset | Connection reset |
Both workstations also reach what they need to stay managed by Ringleader, which you never list. The Edge and your cloud’s firewall are outside the workstation. Nothing running on it, including an AI coding agent running as root, can undo the restriction.
Troubleshoot
- If
rl edge getshowsReadyFalsewith reasonNoMachine, no workstation that needs the Edge has reported in yet. Apply a workstation, and the Edge builds its VM. - If
rl applyrefuses a workstation withforbidden: spec.egress.destinations[0].host names "pastebin.com", the Policy does not permit that destination. Remove it, or ask an administrator to add it to the Policy. - If a request from a workstation fails with a connection reset, the host is not on its team’s allowlist. Denied connections explains the reset.
Next steps
- Edge management explains what an Edge does, what it costs, and how to delete one.
- Injected credentials covers local workstations, MCP servers and rotating the token.
- Outbound restrictions shows the egress policy in full.
- Edge lists the spec, the status and the conditions of an Edge.