Microservices - Authentication and Authorization
A microservice uses this RBAC check:
def check_access(role, permission):
role_permissions = {
"editor": ["read", "write"],
"viewer": ["read"]
}
return permission in role_permissions[role]
print(check_access("admin", "write"))
What is the problem and how to fix it?