nvflare.lighter.impl.auth_policy module

class AuthPolicyBuilder(orgs, roles, groups, disabled)[source]

Bases: Builder

Build authorization.json.

Creates and writes authorization.json to the server’s startup directory with the authorization policy defining the groups each org is in and the admin client roles which controls the allowed rights. The participant information from project.yml is included in authorization.json with what orgs, groups, and roles are associated with each participant. This builder also checks for errors if the arguments are specified incorrectly.

Parameters
  • orgs – authorization configuration for orgs (it may be helpful to build this section with the UI)

  • roles – authorization configuration for roles (it may be helpful to build this section with the UI)

  • groups – authorization configuration for groups (it may be helpful to build this section with the UI)

  • disabled – if true, all users are super with all privileges

build(project: Project, ctx: dict)[source]