Prev Next

Spring / Spring CredHub Interview questions

Explain how permission actors and operations combine to enforce access control in CredHub?

Every CredHub credential (or, with V2 permissions, every matching path) carries an access-control list made up of entries, and each entry is nothing more than an Actor paired with a set of Operation values — READ, WRITE, DELETE, READ_ACL, WRITE_ACL.

When a request comes in, CredHub first determines the caller's identity from the authentication method — the certificate subject for mTLS, the token subject for OAuth2 — and turns that into an actor identifier like mtls-app:<guid> or uaa-client:<name>. It then checks whether any entry in the relevant ACL grants that exact actor the operation the request needs.

Access is deny-by-default: if there's no matching entry for that actor and that operation, the request is rejected, regardless of how the caller authenticated. This is why writing a credential and granting the consuming app's permission are treated as two separate steps — the app that will read a secret usually isn't the same actor as whatever wrote it, most commonly a service broker, so its read permission has to be granted explicitly, not inherited.

What determines whether a request is allowed under CredHub's access model?
Is CredHub's access model allow-by-default or deny-by-default?

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