Prev Next

Spring / Spring CredHub Interview questions

How do you troubleshoot a certificate_unknown error with mutual TLS?

A certificate_unknown error during the mTLS handshake almost always means the app's container isn't presenting a certificate CredHub trusts, so the fix is to check the pieces that make that certificate available rather than anything in Spring CredHub's own configuration.

Start with the buildpack: on Cloud Foundry, mTLS identity depends on the Java buildpack's container security provider being enabled, which is what injects the platform-issued certificate into the app's keystore and truststore at staging time. If that provider isn't active, the app has no certificate to present at all.

If mTLS genuinely isn't viable for the deployment, the practical workaround is to switch to OAuth2 client-credentials authentication instead, double-checking the client ID, secret, and token URI properties, since a partially-configured OAuth2 setup can produce similar-looking connection failures.

A certificate_unknown error during mTLS usually points to:
What should you verify first on Cloud Foundry for this error?

More Related questions...

What is Spring CredHub? What is CredHub? What are the core modules of Spring CredHub? What is the purpose of the spring-credhub-starter dependency? How do you add Spring CredHub to a Maven project? What is CredHubOperations? What is CredHubTemplate? What are the credential types supported by Spring CredHub? Define CredentialName in Spring CredHub? What is a CredentialDetails object? Describe CredHubCredentialOperations? What is CredHubPermissionOperations used for? List the authentication mechanisms supported by Spring CredHub? What is mutual TLS authentication in Spring CredHub? How do you configure the CredHub server URL? What is a password credential in Spring CredHub? What is a JsonCredential? How do you write a credential using CredHubOperations? What is CredHubInfoOperations? Describe CredHubInterpolationOperations? What is the difference between write and generate operations in Spring CredHub? What is the difference between getByName and getByNameWithHistory? How does Spring CredHub regenerate a credential? Why does Spring CredHub prefer mutual TLS over OAuth2 on Cloud Foundry? How do you configure OAuth2 authentication for Spring CredHub? What is the difference between CredHubPermissionOperations and CredHubPermissionV2Operations? How does Spring CredHub represent an actor in a permission entry? When should you use CredHubInterpolationOperations? What happens when you call getByName for a credential that does not exist? How is CredHubException structured? What is the difference between a UserCredential and a PasswordCredential? How do you enable reactive support in Spring CredHub? What is the difference between CredHubOperations and ReactiveCredHubOperations? Why would you choose CertificateCredential over a generic JsonCredential for TLS material? How does Spring Cloud Config Server use CredHub as a backend? When should you use the generate operation instead of write for a password? How do you troubleshoot a certificate_unknown error with mutual TLS? What is the difference between spring-credhub-core and spring-credhub-starter? Explain the lifecycle of a generated credential in CredHub? Explain the execution flow of a Spring Boot app calling CredHubOperations.write()? Explain the internal working of Spring CredHub's OAuth2 client-credentials authentication? How can you optimize credential retrieval in a high-throughput Spring service? Which is better for testing Spring CredHub integrations, Mockito or a real CredHub server, and why? Explain how CredentialRequest and CredentialDetails work together in the write API? Explain the internal working of Spring CredHub's mutual TLS auto-configuration on Cloud Foundry? How do you unit test a service that depends on CredHubCredentialOperations? Explain how permission actors and operations combine to enforce access control in CredHub? How does Spring CredHub's ReactiveCredHubTemplate differ internally from CredHubTemplate? Explain the execution flow of credential interpolation for VCAP_SERVICES? How can you design a credential rotation strategy using Spring CredHub's regenerate operation?
Show more question and Answers...


Comments & Discussions