News for hackers. Stuff that matters.
Re:Static IPs for Serverless Containers by cactacea on Monday December 02, 2024 @04:53PM (#42300826)
Static IPs for allowlists need to die already. Its 2024, come on, surely we can do better than this
Re:Static IPs for Serverless Containers by ekzhang on Monday December 02, 2024 @04:57PM (#42300857)
What would you suggest as an alternative?
Re:Static IPs for Serverless Containers by thatfunkymunki on Monday December 02, 2024 @05:04PM (#42300902)
a more modern, zero-trust solution like mTLS authentication
Re:Static IPs for Serverless Containers by ekzhang on Monday December 02, 2024 @05:10PM (#42300950)
That makes sense, mTLS is great. Some services like Google Cloud SQL are really good about support for it. https://cloud.google.com/sql/docs/mysql/configure-ssl-instan...

It's not quite a zero-trust solution though due to the CA chain of trust.

mTLS is security at a different layer though than IP source whitelisting. I'd say that a lot of companies we spoke to would want both as a defense-in-depth measure. Even with mTLS, network whitelisting is relevant. If your certificate were to be exposed for instance, an attacker would still need to be able to forge a source IP address to start a connection.

Re:Static IPs for Serverless Containers by thatfunkymunki on Monday December 02, 2024 @05:34PM (#42301092)
I'd put it in the zero-trust category if the server (or owner of the server, etc) is the issuer of the client certificate and the client uses that certificate to authenticate itself, but I'll admit this is a pedantic point that adds nothing of substance. The idea being that you trust your issuance of the certificate and the various things that can be asserted based on how it was issued (stored in TPM, etc), rather than any parameter that could be controlled by the remote party.
Re:Static IPs for Serverless Containers by PLG88 on Tuesday December 03, 2024 @04:46AM (#42304512)
If mTLS is combined with outbound connections, then IP source whitelisting is irrelevant; the external network cannot connect to your resources.

This (and more) is exactly what we (I work on it) built with open source OpenZiti, a zero trust networking platform. Bonus points, it includes SDKs so you can embed ZTN into the serverless function, a colleague demonstrated it with a Python workload on AWS - https://blog.openziti.io/my-intern-assignment-call-a-dark-we....

Re:Static IPs for Serverless Containers by sofixa on Monday December 02, 2024 @06:01PM (#42301285)
JWT/OIDC, where the thing you're authenticating to (like MongoDB Atlas) trusts your identity provider (AWS, GCP, Modal, GitLab CI). It's better than mTLS because it allows for more flexibility in claims (extra metadata and security checks can be done with arbitrary data provided by the identity provider), and JWTs are usually shorter lived than certificates.
Re:Static IPs for Serverless Containers by ekzhang on Monday December 02, 2024 @08:02PM (#42302050)
We have a native OIDC integration at Modal, as well! Every container gets a token. https://modal.com/docs/guide/oidc-integration
Re:Static IPs for Serverless Containers by fusjdffddddddds on Monday December 02, 2024 @09:45PM (#42302648)
Based.
Re:Static IPs for Serverless Containers by sofixa on Tuesday December 03, 2024 @02:21AM (#42303731)
Awesome, great for you. OIDC/JWT for cross-stuff auth should become the norm.
Re:Static IPs for Serverless Containers by Thaxll on Monday December 02, 2024 @06:32PM (#42301523)
How do you allow a driver using that exactly?
Re:Static IPs for Serverless Containers by sofixa on Tuesday December 03, 2024 @02:22AM (#42303736)
A db connection driver? You pass the JWT as the username/password which contains the information about your identity and is signed by the identity provider that the party you're authenticating to has been configured to trust.

Or, you use a broker like Vault to which you authenticate with that JWT, and which generates a just in time ephemeral username/password for your database, which gets rotated at some point.

Re:Static IPs for Serverless Containers by klysm on Monday December 02, 2024 @08:30PM (#42302173)
Completely agree. IP addresses are almost never a good means of authentication. It results in brittle and inflexible architecture as well. Applications become aware of layers they should be abstracted from
Re:Static IPs for Serverless Containers by bogantech on Monday December 02, 2024 @11:21PM (#42303043)
Firewalls exist, many network environments block everything not explicitly allowed.

Authentication is only part of the problem, networks are firewalled (with dedicated appliances) and segmented to prevent lateral movement in the event of a compromise

Re:Static IPs for Serverless Containers by klysm on Tuesday December 03, 2024 @12:09AM (#42303222)
Isn’t that completely orthogonal? IP addresses aren’t authenticated, they can be spoofed
Re:Static IPs for Serverless Containers by bogantech on Tuesday December 03, 2024 @01:33AM (#42303499)
It's not authentication. People aren't using static ips for authentication purposes

But if I have firewall policies that allow connections only to specific services I need a destination address and port (yes, some firewalls allow host names but there's drawbacks to that)

> IP addresses aren't authenticated, they can be spoofed

For anything bidirectional you'd need the client to have a route back to you for that address, which would require you compromising some routers and advertising it via BGP etc.

You can spoof addresses all you want but it will generally not do much for a stateful protocol

Re:Static IPs for Serverless Containers by otabdeveloper4 on Tuesday December 03, 2024 @01:55AM (#42303610)
> People aren't using static ips for authentication purposes

Lol. Of course they do. In fact, it's the only viable way to authenticate servers in Current Year. Unlike ssh host keys, of which literally nobody on this planet takes seriously, or https certificates which is just make-work security theater.

Re:Static IPs for Serverless Containers by klysm on Tuesday December 03, 2024 @10:03AM (#42306834)
Now this is an interesting take - I can’t tell if you are being serious
Re:Static IPs for Serverless Containers by otabdeveloper4 on Thursday December 05, 2024 @01:08AM (#42325418)
I am serious. Have you ever done infrastructure work? The big and serious guys all use IP whitelists. Look at how email actually works, for example.
Re:Static IPs for Serverless Containers by klysm on Tuesday December 03, 2024 @10:10AM (#42306912)
> People aren't using static ips for authentication purposes

Unfortunately they are! I’ve seen up whitelistijg used as the only means of authentication over the WAN several times