Spring / Spring CredHub Interview questions
Why does Spring CredHub prefer mutual TLS over OAuth2 on Cloud Foundry?
On Cloud Foundry, mutual TLS is the path of least friction: the platform already issues every app a short-lived identity certificate through its container security provider, and CredHub already trusts certificates from the platform's CA. An app gets strong, per-instance authentication with zero credentials to manage, rotate, or leak in configuration.
OAuth2 client credentials, by contrast, require provisioning a UAA client ID and secret and configuring a token endpoint — another secret that itself needs to be protected, ideally by storing it in CredHub, which is a bit circular for an app whose only job is reaching CredHub.
OAuth2 still has its place off Cloud Foundry, or wherever mTLS isn't available, which is exactly why Spring CredHub supports both and defaults to mTLS whenever no OAuth2 properties are set.
More Related questions...