gravitational / teleport

The easiest, and most secure way to access and protect all of your infrastructure.
https://goteleport.com
GNU Affero General Public License v3.0
17.61k stars 1.76k forks source link

Source IP address restrictions #10201

Open programmerq opened 2 years ago

programmerq commented 2 years ago

What

Teleport should have the ability to take ip address information into account.

A user, role, or individual user certificate could have ip address information associated with it.

This could mean that for a given login attempt, the source ip must align with the ip address whitelist or blacklist rules associated with the user and the roles that user has. The resulting identity certificate would include the source ip that did the login.

Additionally, the user may want to restrict the ip addresses that a given teleport certificate is allowed to be used from for a specific session. For example, something like tsh login --user foo --proxy teleport.example.com --ip-whitelist=10.0.12.0/24,192.168.1.14. So if that certificate is used with a source ip of anything but a matching ip block, teleport would deny it. A shortcut to pin a certificate to the same source ip would also be handy.

How

Why

This will help limit blast radius if tsh credentials or other teleport certificates are copied to another system.

Workaround

There is not a clean workaround. In theory, you could lock down access to the entire teleport service with a firewall rule, but not per user/host/cert.

zmb3 commented 2 years ago

Partially addressed by #12345

reedloden commented 2 years ago

Partially addressed by #12345

https://github.com/gravitational/teleport/pull/13243 replaced this.

pschisa commented 2 years ago

similar to https://github.com/gravitational/teleport/issues/5971