Spring / Spring CredHub Interview questions
What is the difference between a UserCredential and a PasswordCredential?
PasswordCredential stores a single value — just the password string, with no identity attached. UserCredential stores a username alongside the password as one credential, which matches how CredHub itself models a user account: username, password, and a password hash together.
Practically, that means a UserCredential is the right fit when a downstream system needs both pieces together — a database login, for instance — so an app can read one credential and get both the username and password it needs to connect, instead of maintaining two separate credential names that have to stay in sync.
PasswordCredential is simpler and fits cases where the "identity" half is already fixed or configured elsewhere, and only the secret itself needs to live in CredHub.
More Related questions...