nvflare.fuel.sec.authz module¶
- class AuthzContext(user_name: str, site_names: List[str])[source]¶
Bases:
object
Base class to contain context data for authorization.
- Parameters
user_name (str) – user name to be checked
site_names (List[str]) – site names to be checked against
- class Policy(conf: dict)[source]¶
Bases:
object
The authorization policy definition.
Authorization policy definition with methods to access information about the policy. Init creates the internal representation of the policy from a config dictionary.
Policy evaluation result:
For bool type of rules or rights:
True - the rule is satisfied or the right is granted False - the rule is not satisfied; the right iis not granted None - the rule or right is not applicable (precondition not met)
For int type or rules or rights:
Number - the value of the evaluation None - the rule or right is not applicable (precondition not met)
- Parameters
conf (dict) – the configuration dictionary with keys=groups, users, rights, rules, sites, orgs