5.1.15. Class PermitUser

This class encapsulates an authorization decision based on usernames. Users who authenticate using one of the usernames specified in the policy receive access to the service. Otherwise access is denied.

Example 5.8. A simple PermitUser policy

The following example permits only the admin and root users to access the service.

AuthorizationPolicy(name="demo_permituser", authorization=PermitUser(userlist=("admin", "root")))