Hacker News new | ask | show | jobs
by cloudfudge 10 days ago
How many mTLS configs are anything but all-or-nothing access? It is so common for an app to slap mTLS on the endpoints and make the rule "anyone with a valid cert is admin on this API; anyone else gets 401." This is a step back towards a superuser/regular-user model.

Now if you're going to use mTLS as the basis for mature authn/authz, that's a different story. But I never see anyone do that.

2 comments

authn and authz are separate. mTLS is used first for identity attestation (amongst also establishing a secure channel), what you’re allowed to do after you’ve proven the identity of both client/server is authz.

If the operator wants to provide admin access after mTLS is established as you described, then that may be a design decision, but that’s not on mTLS fault and the same can be said about other forms of identity authn (password, certificates, biometric, etc)

I agree with you that mTLS is for authn, not authz, but GP is saying that it’s commonly misused. If a tool is often held wrong, it’s not a very good tool for humans.
I’m disputing that the tool (mTLS) is not commonly at fault for being misused, authz (rather the lack of it) is being misused and misunderstood with its conflation of authn.

The tool (authn a la mTLS) is working as intended.

The tooling ecosystem around it matters, the language documentation around it matters. It’s rarer to see documented examples of mTLS where the identity is then accessed and (for example) checked against a users db. It’s even rarer to see examples of (e.g transporting signed claims about a user via mTLS cert).

Let’s use JWT OIDC token as another example of a technology used to provide authn. The JWT has standard structure for sending authenticated claims about a user (such as subject ID, email, email verification state, scopes) that can subsequently be used by an authz layer after authn is completed. My point isn’t that OIDC is better than mTLS, but that the design makes it clear to handoff to the authorization layer so there is less ambiguity about what to do after authn.

Yes, this I absolutely agree that JWT is simpler to work with by virtue of remaining on http layer 7 and parsing claims out of JSON compared to working with extracting identity and other embeddings from x509 and lifting this out from the TLS layer. OIDC exceptionally so as it’s purposely designed with passing identities as its sole purpose.

I just take issue (maybe pedantically so or I admittedly misunderstood the GPs original point) with blanket statements that no one uses mTLS for just authn but for authz also so that makes it a bad tool. There is no authz and that should be completely apparent after first authentication and logically raise to the developer with next steps to extract the identity. We’re disagreeing on the basis that a human’s incorrect conflation that it does provide authz should/shouldn’t be attributed to mTLS.

We are saying the same thing. mtls is fine for authn. But nobody actually uses it for just that. They use it for both authn and authz. The authz policy is almost always just "identity != null".

If I told you not to use a power drill as a hammer, you wouldn't claim I'm saying the power drill is at fault for being a bad hammer.

Applications are vulnerable for exploits.

mTLS prevents connecting to the application without valid cert.

Sure the reverse proxy handling the mtls can be exploited, but so can any VPN server as well.