Microservices - Authentication and AuthorizationWhich of the following JSON snippets correctly represents a role with permissions in an RBAC microservice?A{"role": "guest", "actions": "read"}B{"user": "admin", "access": ["read", "write"]}C{"role": "admin", "permissions": ["read", "write", "delete"]}D{"permission": "admin", "roles": ["read", "write"]}Check Answer
Step-by-Step SolutionSolution:Step 1: Check correct RBAC structureRBAC roles have a 'role' key and a list of 'permissions'.Step 2: Validate JSON keys and values{"role": "admin", "permissions": ["read", "write", "delete"]} correctly uses 'role' and 'permissions' with an array of actions.Final Answer:{"role": "admin", "permissions": ["read", "write", "delete"]} -> Option CQuick Check:Correct RBAC JSON = role + permissions array [OK]Quick Trick: Roles map to permissions array in JSON [OK]Common Mistakes:MISTAKESUsing 'user' instead of 'role'Permissions as string instead of arraySwapping keys 'role' and 'permission'
Master "Authentication and Authorization" in Microservices9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepArchTryChallengeDesignRecallScale
More Microservices Quizzes Authentication and Authorization - JWT token propagation - Quiz 5medium Event-Driven Architecture - Event store concept - Quiz 7medium Event-Driven Architecture - Event store concept - Quiz 1easy Event-Driven Architecture - Event replay - Quiz 7medium Event-Driven Architecture - Eventual consistency handling - Quiz 10hard Monitoring and Observability - Distributed tracing (Jaeger, Zipkin) - Quiz 14medium Resilience Patterns - Health check pattern - Quiz 9hard Resilience Patterns - Graceful degradation - Quiz 1easy Service Mesh - Sidecar proxy pattern - Quiz 10hard Service Mesh - Why service mesh manages inter-service traffic - Quiz 4medium