Skip to content

Allow user impersonation from Teleport proxies#23311

Merged
tigrato merged 1 commit intomasterfrom
tigrato/allow-http-impersonation
Mar 27, 2023
Merged

Allow user impersonation from Teleport proxies#23311
tigrato merged 1 commit intomasterfrom
tigrato/allow-http-impersonation

Conversation

@tigrato
Copy link
Copy Markdown
Contributor

@tigrato tigrato commented Mar 20, 2023

This PR introduces user impersonation from connections created by Teleport proxies. The goal is to allow proxies to forward the user identity that initiated the connection without signing a new certificate with the user's identity.

HTTP requests originated from Proxies with the Teleport-Impersonate-User header allow the proxy to impersonate the identity carried in the value.

Certificates without SytemRole=Proxy are denied to impersonate users and the connection is automatically terminated.

For IP Pinning, the client IP address is transferred using the Teleport-Real-User-IP header.

Since the connection originated from a valid certificate belonging to a Teleport proxy, the identity and IP address headers don't need to be signed because the Teleport upstream service trusts the proxy certificate.

Part of #22533

@tigrato tigrato requested a review from rosstimothy March 20, 2023 12:15
@tigrato tigrato requested a review from espadolini March 20, 2023 12:16
@tigrato tigrato force-pushed the tigrato/allow-http-impersonation branch 2 times, most recently from 87e6be1 to d83f13e Compare March 20, 2023 13:27
Comment thread lib/auth/middleware.go Outdated
Comment thread lib/auth/middleware.go Outdated
Comment thread lib/auth/middleware.go Outdated
Comment thread lib/auth/middleware.go Outdated
Comment thread lib/auth/middleware.go
Comment thread lib/tlsca/ca.go Outdated
@tigrato tigrato force-pushed the tigrato/allow-http-impersonation branch from c434b7a to f992cac Compare March 23, 2023 09:23
Comment thread lib/auth/middleware.go Outdated
Comment thread lib/auth/middleware.go Outdated
Comment thread lib/auth/middleware.go Outdated
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from capnspacehook March 27, 2023 14:55
This PR introduces user impersonation from connections created by Teleport proxies. The goal is to allow proxies to forward the user identity that initiated the connection without signing a new certificate with the user's identity.

HTTP requests originated from Proxies with `Teleport-Impersonate-User` header allows the proxy to impersonate the identity carried in the value.

Certificates without `SytemRole=Proxy` are denied to impersonate users and the connection is automatically terminated.

For IP Pinning, the client IP address is transferred using the `Teleport-Real-User-IP` header.

Since the connection originated from a valid certificate belonging to a Teleport proxy, the identity and IP address headers don't need to be signed because the Teleport upstream service trusts the proxy certificate.

Part of #22533
@tigrato tigrato force-pushed the tigrato/allow-http-impersonation branch from 4e08091 to 6c0593b Compare March 27, 2023 15:30
@tigrato tigrato enabled auto-merge March 27, 2023 15:32
@tigrato tigrato added this pull request to the merge queue Mar 27, 2023
Merged via the queue into master with commit e859e27 Mar 27, 2023
@tigrato tigrato deleted the tigrato/allow-http-impersonation branch March 27, 2023 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants