Consider a microservices system where a client app needs to access multiple services securely using OAuth 2.0. Which component is responsible for issuing access tokens that microservices validate?
Think about the OAuth 2.0 roles: who grants tokens and who protects resources.
In OAuth 2.0, the Authorization Server issues access tokens. Resource Servers (microservices) validate these tokens to allow or deny access.
In a microservices architecture using OAuth 2.0, what is the best approach to efficiently validate access tokens across many services?
Consider reducing network calls while keeping token validation secure and fresh.
Caching token introspection results locally reduces latency and load on the Authorization Server while maintaining security by respecting token expiration.
Which is a key tradeoff when choosing JWT tokens over opaque tokens for OAuth 2.0 in microservices?
Think about token size, validation method, and revocation challenges.
JWT tokens carry claims and can be validated without contacting the Authorization Server, but revoking them immediately is difficult. Opaque tokens require introspection calls but can be revoked instantly.
In OAuth 2.0 for microservices, what is the main purpose of a refresh token?
Think about how long access tokens last and user experience.
Refresh tokens allow clients to get new access tokens after the old ones expire without asking the user to log in again, improving usability and security.
A microservices system has 100 services, each receiving 1000 requests per second. Each request requires validating an OAuth 2.0 token. If each token introspection call to the Authorization Server takes 10ms, what is the minimum number of Authorization Server instances needed to handle token introspection without queuing delays, assuming each instance can handle 1000 introspections per second?
Calculate total introspection calls per second and divide by capacity per instance.
Total requests = 100 services * 1000 requests = 100,000 introspections per second. Each instance handles 1000 introspections per second, so 100,000 / 1000 = 100 instances needed.