Spring / Spring CredHub Interview questions
What is CredHubTemplate?
CredHubTemplate is the default implementation of CredHubOperations. It wraps a RestTemplate configured to talk to the CredHub server and handles serializing requests and responses to and from CredHub's JSON API.
When Spring CredHub auto-configures a connection using mutual TLS — the default on Cloud Foundry — it's a CredHubTemplate bean that gets registered, using the container's own TLS identity. When OAuth2 client-credentials properties are present instead, auto-configuration still produces a CredHubTemplate, but backs it with a RestTemplate wired to attach a bearer token to every request.
Application code rarely constructs CredHubTemplate directly; it typically just autowires the CredHubOperations interface and lets auto-configuration decide how the underlying template authenticates.
More Related questions...