Spring / Spring CredHub Interview questions
Explain the execution flow of a Spring Boot app calling CredHubOperations.write()?
A single write() call passes through a short, predictable chain from application code to the CredHub server and back:
Two things happen before that PUT ever leaves the app. First, auto-configuration already decided at startup whether the underlying RestTemplate authenticates via mutual TLS or attaches an OAuth2 bearer token — write() itself doesn't know or care which. Second, the typed request (a PasswordCredentialRequest, for instance) is serialized to the exact JSON shape CredHub's /api/v1/data endpoint expects, including the credential type discriminator.
If CredHub rejects the request or the credential already exists with a conflicting type, the non-2xx response is translated into a CredHubException instead of a normal return value, so the happy path shown above is really only half the story.
More Related questions...