Spring / Spring CredHub Interview questions
What is the difference between write and generate operations in Spring CredHub?
write() and generate() both store a credential, but they differ in who decides the value and, as a result, what you can do with it afterward:
| write() | generate() |
| Caller supplies the value | CredHub generates the value |
| Takes a CredentialRequest | Takes a CredentialGenerateRequest with generation parameters |
| Cannot be regenerated later | Can be regenerated later with regenerate() |
Use write() when the value comes from somewhere else, like an existing database password you're migrating into CredHub. Use generate() when CredHub itself should create a strong value — a password, certificate, or key pair — especially if you want the option to rotate it later without re-supplying parameters.
More Related questions...