Service-to-Service Authentication — Concept Check
Questions on Service-to-Service Authentication. Mutual TLS or short-lived JWT access tokens (client credentials flow) authenticate services with each other; avoid embedding long-lived secrets in code.
Questions in this quiz
8 questions on Service-to-Service Authentication — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A service is using OAuth2 Client Credentials Flow to authenticate with another service. The token request fails with an 'invalid_client' error. What is the most likely cause?
- AMissing scope in the token request
- BInvalid JWKS endpoint
- CExpired JWT token
- DIncorrect client_id or client_secret
2.In a microservices architecture using mTLS with Istio, a developer notices that communication between services is failing. What could be the reason?
- AJWT token is expired
- BmTLS mode is set to STRICT
- CPeerAuthentication is set to PERMISSIVE
- DClient ID is incorrect
3.A developer configures a resource server to validate JWTs using a JWKS URI. What is the primary benefit of this setup?
- APrevents token replay attacks
- BReduces token size
- CNo need to manage client secrets
- DSimplifies certificate rotation
4.An engineer claims that embedding long-lived secrets in code is secure if the code is in a private repository. Why is this belief incorrect?
- AJWT tokens are better for authentication
- BLong-lived secrets are always secure
- CmTLS is the only secure method
- DPrivate repositories can be compromised
5.A service using OAuth2 Client Credentials Flow is unable to access another service due to a '403 Forbidden' error. What is the likely reason?
- AMissing or incorrect scope in the token
- BIncorrect JWKS URI
- CInvalid client ID
- DExpired client secret
6.In a system using Istio for mTLS, what happens if the PeerAuthentication is set to PERMISSIVE?
- AOnly non-mTLS traffic is allowed
- BNon-mTLS traffic is rejected
- CBoth mTLS and non-mTLS traffic are allowed
- DOnly mTLS traffic is allowed
7.A developer configures Spring Security for a resource server but JWT validation fails. What is the most likely cause?
- AIncorrect JWKS URI
- BExpired client secret
- CMissing client ID
- DInvalid OAuth2 scope
8.Why is it recommended to avoid embedding long-lived secrets in code or environment variables?
- AThey increase the risk of exposure
- BThey can be easily rotated
- CThey make the code run slower
- DThey are not compatible with OAuth2