Security

NVIDIA FLARE's security model is federated: the project defines identities, but each site keeps control over what runs on it, what leaves it, and which resources jobs may use. This page covers identity and roles, the authorization policy format, connection security, site policies (resources, privacy scopes, component allow lists), per-job certificates, and auditing. Provisioning itself is covered in Provisioning.

Key principles:

  • No raw data movement. Only model updates and task results leave a site, and they pass through filters the site controls.
  • Federated authorization. Each organization's sites enforce their own policy; the server cannot override it.
  • Site-specific authentication. Sites can plug in their own authentication through FLARE's event-based component framework.
  • Defense in depth. PKI identities, TLS/mTLS, signed startup kits, optionally signed jobs, filters, and confidential computing support.

Identities and Roles

Every participant gets an X.509 certificate signed by the project root CA. Admin users carry a role in their certificate:

Role Typical holder Default rights
project_admin The person running the project Everything.
org_admin IT administrator of an organization View everything; manage and download jobs submitted by their org; operate and run shell commands on their org's sites; cannot submit jobs.
lead Researcher or data scientist Submit jobs (including custom code); manage, clone, and download their own jobs; operate and shell on their org's sites.
member Observer View only.

Authorization Policy

Each server and client kit has local/authorization.json.default, generated from the provisioning template. A site overrides it by creating local/authorization.json. The default policy:

{
  "format_version": "1.0",
  "permissions": {
    "project_admin": "any",
    "org_admin": {
      "submit_job": "none",
      "clone_job": "none",
      "manage_job": "o:submitter",
      "download_job": "o:submitter",
      "view": "any",
      "operate": "o:site",
      "shell_commands": "o:site",
      "byoc": "none",
      "server-predeployed-flwr": "none"
    },
    "lead": {
      "submit_job": "any",
      "clone_job": "n:submitter",
      "manage_job": "n:submitter",
      "download_job": "n:submitter",
      "view": "any",
      "operate": "o:site",
      "shell_commands": "o:site",
      "byoc": "any",
      "server-predeployed-flwr": "none"
    },
    "member": {
      "view": "any"
    }
  }
}

Condition values

Value Granted when
any Always.
none Never.
o:site The user's org equals the org of the site enforcing the policy.
o:submitter The user's org equals the job submitter's org.
o:<org> The user's org equals the literal <org>.
n:submitter The user's name equals the job submitter's name (their own jobs).
n:<name> The user's name equals the literal <name>.

byoc ("bring your own code") controls whether a job may carry custom Python code in its custom/ folders (and, for container launchers, choose its own job image). Without it, the job's components are also restricted to the site's component allow list.

To preview a policy, nvflare authz-preview exists but is deprecated (see Deployment).

Connection Security

connection_security can be set in project.yml at the project level and overridden per participant:

Value Meaning
mtls Mutual TLS: both sides present certificates. The default when not specified.
tls One-way TLS: only the server side is authenticated by TLS. Useful with a TLS-terminating proxy.
clear No TLS on this hop, for example a server that sits behind a secure proxy.
api_version: 3
name: my_project
connection_security: tls
custom_ca_cert: /path/of/customRoot.pem   # CA of the proxy; used only for TLS server authentication

participants:
  - name: server
    type: server
    org: nvidia
    fed_learn_port: 8002
    admin_port: 8003
    connection_security: clear            # the server is behind the proxy
  - name: site-1
    type: client
    org: nvidia

Independently of transport security, the server authenticates every message it routes, so tls and clear hops do not drop participant authentication. The server can also expose several addresses with host_names and default_host (IP addresses are allowed).

Site Policies

The provisioned local/ folder contains defaults that the site overrides by creating a file without the .default or .sample suffix:

Default file Override Controls
resources.json.default resources.json Resource manager and consumer, job launcher, component allow list, and other site-local settings.
authorization.json.default authorization.json Authorization policy (above).
privacy.json.sample privacy.json Privacy scopes and mandatory filters.
log_config.json.default log_config.json Python logging configuration.

Custom site code (for example a private filter) goes in local/custom/. To avoid a half-written policy being picked up, edit a copy under a temporary name and rename it into place.

Privacy scopes

privacy.json defines named scopes and filters the site always applies, whatever the job says:

{
  "scopes": [
    {
      "name": "public",
      "properties": {"train_dataset": "/data/public/train"},
      "task_result_filters": [
        {
          "path": "nvflare.app_common.filters.percentile_privacy.PercentilePrivacy",
          "args": {"percentile": 10, "gamma": 0.02}
        }
      ],
      "task_data_filters": []
    },
    {
      "name": "private",
      "task_result_filters": [
        {
          "path": "nvflare.app_common.filters.svt_privacy.SVTPrivacy",
          "args": {"fraction": 0.1, "epsilon": 0.2}
        }
      ]
    }
  ],
  "default_scope": "public"
}

Rules:

  • No privacy.json: no privacy control is applied.
  • A job selects a scope with the scope key in meta.json. Without it, the site's default_scope is used; if the site has none, the job is rejected at deploy time with privacy scope '...' is not allowed.
  • A scope name unknown to the site is rejected the same way.
  • default_scope must name an existing scope, or the policy fails to load.
  • The scope's filters run before the job's own filters.

Component allow list

When a job does not have BYOC rights, every component in its configuration is checked against class_allow_list in the site's resources.json (or resources.json.default). Standard provisioning writes a curated list; if the key is missing, the built-in default from nvflare/app_common/default_component_policy.py is used and an audit event is recorded. An explicit list replaces the default.

  • Entries ending in . are package prefixes ("nvflare."); other entries must be fully qualified paths, matched exactly or on a . boundary. A bare "nvflare" is rejected as ambiguous, and "nvflare." does not match nvflareevil.module.Component.
  • Component configs must use path or class_path. If both exist, path wins even when it is empty or invalid. Configs using name are rejected.
  • Nested component configs inside args, at any depth, are checked too.
  • class_list_enforcement_mode is enforce (the default) or warn.
  • SimEnv installs the curated list in new simulation workspaces too.

For custom checks, add a site component that handles EventType.BEFORE_BUILD_COMPONENT and raises UnsafeComponentError:

from nvflare.apis.event_type import EventType
from nvflare.apis.fl_component import FLComponent
from nvflare.apis.fl_constant import FLContextKey
from nvflare.apis.fl_context import FLContext
from nvflare.apis.fl_exception import UnsafeComponentError


class ComponentChecker(FLComponent):
    def handle_event(self, event_type: str, fl_ctx: FLContext):
        if event_type != EventType.BEFORE_BUILD_COMPONENT:
            return
        config = fl_ctx.get_prop(FLContextKey.COMPONENT_CONFIG)
        path = config.get("path") or config.get("class_path")
        if path == "bad_package.BadComponent":
            raise UnsafeComponentError(f"component is not allowed: {path}")

Other useful context properties: FLContextKey.COMPONENT_NODE (location in the config tree), CONFIG_CTX, CURRENT_JOB_ID, JOB_META (submitter name, org, and role), and WORKSPACE_OBJECT.

Per-Job Certificates

In secure mode every job runs with a short-lived certificate issued by the server's job CA (job_ca.crt/job_ca.key in the server startup kit). There is no fallback to site certificates. If the job CA is missing (enable_job_ca: false, or a kit from before the feature) or has less than one hour of validity left, jobs end in FINISHED:FAILED_TO_RUN with a reason in job_deploy_detail. See Troubleshooting.

Signed Startup Kits and Jobs

Provisioning signs each kit's startup files (startup/signature.json), so modified kits are detected. StaticFileBuilder also accepts require_signed_jobs: true, which is rendered into the server and client startup configuration.

Auditing

Each site writes audit events as JSON Lines with UTC timestamps to audit.jsonl. Set NVFL_AUDIT_ROOT to write audit (and, unless NVFL_LOG_ROOT is set, logs) to another location; see Architecture.

Confidential Computing

FLARE supports hardware-backed trusted execution environments (AMD SEV-SNP and Intel TDX confidential VMs, optionally with NVIDIA confidential GPUs) for secure aggregation and model IP protection. The nvflare-cvmctl command and examples/advanced/cvm_builder belong to this feature; setup guides are in the repository under docs/user_guide/confidential_computing.

See Also