Skip to content

[v12] Prevent remote proxies from impersonating users from different clusters#33542

Merged
tigrato merged 1 commit intobranch/v12from
bot/backport-33536-branch/v12
Oct 31, 2023
Merged

[v12] Prevent remote proxies from impersonating users from different clusters#33542
tigrato merged 1 commit intobranch/v12from
bot/backport-33536-branch/v12

Conversation

@tigrato
Copy link
Copy Markdown
Contributor

@tigrato tigrato commented Oct 16, 2023

Backport #33536 to branch/v12

…rs (#33536)

* Prevent remote proxies from impersonating users from different clusters

This PR prevents root proxies from impersonating users from different clusters when accessing a leaf cluster.

During authentication, the proxy presents its certificate and sends the impersonation header.

A malicious attacker in possession of the root cluster proxy cert-key pair could bypass the root-leaf cluster permissions boundary by impersonating local users. This PR prevents that and remote proxies can only impersonate users belonging to their cluster.

KubeCSR Flow:
```mermaid
sequenceDiagram
    ROOT PROXY->>+LEAF PROXY: Forward the request identity cert
    LEAF PROXY ->> LEAF AUTH SRV: Sign identity via KubeCSR
    LEAF AUTH SRV -->> LEAF PROXY: Identity cert
    LEAF PROXY ->> LEAF KUBE SERVICE: Forward the request using cert
    LEAF KUBE SERVICE -->> LEAF PROXY: Return response
    LEAF PROXY -->> ROOT PROXY: Return response
```

Impersonation Flow:
```mermaid
sequenceDiagram
    ROOT PROXY->>+LEAF PROXY: Forward the request identity by Impersonating
    LEAF PROXY ->> LEAF KUBE SERVICE: Forward the request identity by Impersonating
    LEAF KUBE SERVICE -->> LEAF PROXY: Return response
    LEAF PROXY -->> ROOT PROXY: Return response
```

Fixes gravitational/teleport-private#968
Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>

* fix message
@tigrato tigrato enabled auto-merge October 30, 2023 19:40
@tigrato tigrato added this pull request to the merge queue Oct 31, 2023
Merged via the queue into branch/v12 with commit 40fae16 Oct 31, 2023
@tigrato tigrato deleted the bot/backport-33536-branch/v12 branch October 31, 2023 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants