Hacker News new | ask | show | jobs
by Liuser 14 days ago
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)

1 comments

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.