Skip to content

Add full IP pinning enforcement#24743

Merged
AntonAM merged 16 commits intomasterfrom
anton/full-ip-pinning-enforcement
Apr 23, 2023
Merged

Add full IP pinning enforcement#24743
AntonAM merged 16 commits intomasterfrom
anton/full-ip-pinning-enforcement

Conversation

@AntonAM
Copy link
Copy Markdown
Contributor

@AntonAM AntonAM commented Apr 18, 2023

We're adding IP pinning check to authorizer.Authorize which is used for every call, so now all communications with teleport should enforce IP pinning. Also making sure we always provide login IP for user certificate creation, with single use certificates always pinned (if it's enterprise), and correct client IP propagation everywhere.

@AntonAM AntonAM force-pushed the anton/full-ip-pinning-enforcement branch 8 times, most recently from dd0a122 to 76d4710 Compare April 19, 2023 17:27
@AntonAM AntonAM requested review from strideynet and tigrato April 19, 2023 17:28
@AntonAM AntonAM marked this pull request as ready for review April 19, 2023 17:29
@AntonAM AntonAM force-pushed the anton/full-ip-pinning-enforcement branch from 76d4710 to 365941f Compare April 19, 2023 19:34
Comment thread api/client/client.go Outdated
Comment thread api/client/contextdialer.go Outdated
Comment thread api/client/proxy.go Outdated
Comment thread api/client/proxy.go Outdated
Comment thread lib/auth/grpcserver.go Outdated
Comment thread lib/client/api.go Outdated
Comment thread lib/kube/proxy/forwarder.go Outdated
Comment thread lib/multiplexer/multiplexer.go Outdated
Comment thread lib/srv/alpnproxy/proxy.go Outdated
Comment thread lib/srv/alpnproxy/proxy.go Outdated
@tigrato tigrato requested a review from rosstimothy April 20, 2023 11:03
@AntonAM AntonAM force-pushed the anton/full-ip-pinning-enforcement branch 3 times, most recently from f0598b3 to 1a312e2 Compare April 20, 2023 17:46
Copy link
Copy Markdown
Contributor

@probakowski probakowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks ok, few suggestions

Comment thread api/client/client.go Outdated
Comment thread api/client/contextdialer.go Outdated
Comment thread api/utils/tlsutils/tlsutils.go Outdated
Comment thread api/utils/tlsutils/tlsutils.go Outdated
Comment thread lib/client/api.go Outdated
AntonAM and others added 4 commits April 21, 2023 00:17
We're adding IP pinning check to `authorizer.Authorize` which is used for every call,
so now all communications with teleport should enforce IP pinning.
Also making sure we always provide login IP for user certificate creation
and correct client IP propagation everywhere.
Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
@AntonAM AntonAM force-pushed the anton/full-ip-pinning-enforcement branch from 039532f to 9be1e22 Compare April 21, 2023 04:19
Comment thread lib/authz/permissions.go Outdated
Comment thread lib/multiplexer/multiplexer.go Outdated
@AntonAM AntonAM force-pushed the anton/full-ip-pinning-enforcement branch from 9e9b7b5 to f5a693e Compare April 22, 2023 15:02
@AntonAM AntonAM added this pull request to the merge queue Apr 23, 2023
Merged via the queue into master with commit cf2c705 Apr 23, 2023
@AntonAM AntonAM deleted the anton/full-ip-pinning-enforcement branch April 23, 2023 17:31
@public-teleport-github-review-bot
Copy link
Copy Markdown

@AntonAM See the table below for backport results.

Branch Result
branch/v13 Failed

AntonAM added a commit that referenced this pull request Apr 24, 2023
* Add full IP pinning enforcement

We're adding IP pinning check to `authorizer.Authorize` which is used for every call,
so now all communications with teleport should enforce IP pinning.
Also making sure we always provide login IP for user certificate creation
and correct client IP propagation everywhere.

* Add integration test for App IP pinning.

* Fix wording

Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>

* Wrap error

Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>

* Add godocs

* Clone TLS config

* Improve proxyHeaderSigner usage

* Wider use proxyHeaderDialer and remove adhoc writing of singed header

* Add helper function TLSDial

* Use proxyHeader dialer in authConnect

* Simplify tlsConfig manipulation

Co-authored-by: Przemko Robakowski <przemko.robakowski@goteleport.com>

* Remove redundant channels processing in TLSDial

* Reduce nesting

* Update generated protobufs

* Remove ignoring of bad IP on signed PROXY header generation

* Provide logger to CheckIPPinning function

---------

Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
Co-authored-by: Przemko Robakowski <przemko.robakowski@goteleport.com>
webvictim pushed a commit that referenced this pull request Apr 24, 2023
* Add full IP pinning enforcement

We're adding IP pinning check to `authorizer.Authorize` which is used for every call,
so now all communications with teleport should enforce IP pinning.
Also making sure we always provide login IP for user certificate creation
and correct client IP propagation everywhere.

* Add integration test for App IP pinning.

* Fix wording



* Wrap error



* Add godocs

* Clone TLS config

* Improve proxyHeaderSigner usage

* Wider use proxyHeaderDialer and remove adhoc writing of singed header

* Add helper function TLSDial

* Use proxyHeader dialer in authConnect

* Simplify tlsConfig manipulation



* Remove redundant channels processing in TLSDial

* Reduce nesting

* Update generated protobufs

* Remove ignoring of bad IP on signed PROXY header generation

* Provide logger to CheckIPPinning function

---------

Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
Co-authored-by: Przemko Robakowski <przemko.robakowski@goteleport.com>
@r0mant r0mant mentioned this pull request Jul 14, 2023
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