Provisioning
Provisioning creates the identities of a federation: a project root CA, a certificate and private key for every server, client, relay, and admin user, and a ready-to-run startup kit for each. NVIDIA FLARE supports two workflows. In centralized provisioning (nvflare provision), one Project Admin generates every kit from a project.yml and distributes them. In distributed provisioning (nvflare cert and nvflare package), each participant generates its own private key locally, sends only a certificate request, and assembles its own kit from the signed response. This page covers both, plus the project.yml format and dynamic additions.
Centralized Provisioning: nvflare provision
nvflare provision -g # write a sample ./project.yml
# edit project.yml
nvflare provision -p project.yml # generate startup kits under ./workspace
| Option | Default | Description |
|---|---|---|
-p, --project_file |
— | Project file to provision. |
-g, --generate |
— | Write a sample project.yml into the current directory and exit. |
-e, --gen_edge |
— | Write a sample edge project.yml and exit. |
-w, --workspace |
workspace |
Output directory (relative to the current directory). |
-c, --custom_folder |
. |
Extra folder added to sys.path for custom builders. |
--add_user |
— | YAML file describing one user to add. |
--add_client |
— | YAML file describing one client to add. |
-s, --gen_scripts |
off | Also generate helper scripts such as start_all.sh. |
--force |
off | Skip Y/N confirmation prompts. |
Warning: Running
nvflare provisionwithout-p(or with-g) copies the sample file to./project.ymlwith a plain file copy, overwriting any existingproject.ymlin the current directory without asking. Keep your project file elsewhere or under version control. Combining-pand-gis rejected withcannot use -p/--project_file together with -g/--generate.
Other errors: project file does not exist: <path> and project file is empty or not a valid YAML mapping: <path>, both exit 4.
Output layout
workspace/
└── example_project/
├── prod_00/ # first successful run
│ ├── server1/
│ ├── site-1/
│ ├── site-2/
│ └── [email protected]/
├── prod_01/ # next run, and so on
├── resources/
└── state/ # persisted CA and certificates, reused by later runs
Each successful run creates the next prod_NN folder; a temporary wip/ folder is used during the run. After prod_99 the provisioner stops and asks you to remove old prod_NN folders. Because the root CA and certificates in state/ are reused, rerunning provisioning keeps existing identities stable. To start from scratch, use a fresh workspace.
A client kit contains (in startup/) rootCA.pem, client.crt, client.key, fed_client.json, start.sh, sub_start.sh, and stop_fl.sh; the server kit has server.crt/server.key, fed_server.json, signature.json, and (by default) the job CA job_ca.crt/job_ca.key instead. Admin kits contain fed_admin.json, fl_admin.sh, and their certificate. Server and client kits also have a local/ folder with site-local defaults (resources.json.default, authorization.json.default, privacy.json.sample, log_config.json.default); see Security.
Warning: Do not hand-edit
startup/fed_server.jsonorstartup/fed_client.jsonin a signed kit.startup/signature.jsoncovers the startup configuration and manual edits invalidate it. Changeproject.ymland reprovision.
The project.yml File
The sample generated by nvflare provision -g:
api_version: 3
name: example_project
description: NVIDIA FLARE sample project yaml file
participants:
- name: server1 # use the server's FQDN in real deployments
type: server
org: nvidia
fed_learn_port: 8002
- name: site-1
type: client
org: nvidia
# listening_host: site-1-lh
- name: site-2
type: client
org: nvidia
- name: [email protected]
type: admin
org: nvidia
role: project_admin
- name: [email protected]
type: admin
org: nvidia
role: org_admin
- name: [email protected]
type: admin
org: nvidia
role: lead
builders:
- path: nvflare.lighter.impl.workspace.WorkspaceBuilder
args:
template_file:
- master_template.yml
- aws_template.yml
- azure_template.yml
- path: nvflare.lighter.impl.static_file.StaticFileBuilder
args:
config_folder: config
- path: nvflare.lighter.impl.cert.CertBuilder
- path: nvflare.lighter.impl.signature.SignatureBuilder
Top-level keys
| Key | Description |
|---|---|
api_version |
3 for standard projects; 4 enables multi-study features together with a studies: section. |
name |
Project name; becomes the folder under the workspace. |
description |
Free text. |
participants |
List of servers, clients, relays, and admins. |
builders |
Ordered list of builder classes; their methods are called in this order. |
Participant keys
| Key | Applies to | Description |
|---|---|---|
name |
all | Unique name. For servers, the FQDN that clients connect to. For admins, an email-like identity. |
type |
all | server, client, admin, or relay. |
org |
all | Organization; used by o: authorization rules. |
fed_learn_port |
server | Port for federated communication (sample: 8002). |
admin_port |
server | Admin port; defaults to fed_learn_port when omitted. |
role |
admin | project_admin, org_admin, lead, or member. |
listening_host |
client | Also create a server certificate so the client can accept connections (for third-party integration). |
auth_identity |
any | Certificate CN when it differs from the FLARE name (for example server.example.com for site site-1). |
capacity |
client | num_of_gpus and mem_per_gpu_in_GiB written into the client's GPUResourceManager defaults (0 when omitted). |
components |
client | Site components such as resource_manager and resource_consumer (reserved IDs). |
Builder arguments
StaticFileBuilder accepts config_folder, scheme (default http), app_validator, download_job_url, docker_image (generates docker.sh scripts), and require_signed_jobs. The overseer_agent argument is obsolete and ignored with a warning.
CertBuilder options:
| Argument | Default | Description |
|---|---|---|
root_valid_days |
360 | Validity of a newly created root CA. Only applies when the workspace creates its root; a later mismatch with the existing root fails. |
enable_job_ca |
true |
Create the job-signing intermediate CA in the server kit. In secure mode jobs cannot run without it. |
public_root_cert |
— | Use an enterprise root certificate without its private key; all endpoints must then use externally issued credentials. |
A server participant can set external_job_ca: true in project.yml; job CA generation is then skipped and deployment tooling must install the job CA credentials. Participant certificates are valid 360 days, unless the root expires sooner.
Dynamic Provisioning
Add a participant to an existing project without reprovisioning everyone:
# user.yaml
name: [email protected]
org: nvidia
role: project_admin
# client.yaml
name: new-site
org: nvidia
components:
resource_manager:
path: nvflare.app_common.resource_managers.gpu_resource_manager.GPUResourceManager
args:
num_of_gpus: 0
mem_per_gpu_in_GiB: 0
resource_consumer:
path: nvflare.app_common.resource_consumers.gpu_resource_consumer.GPUResourceConsumer
args:
nvflare provision -p project.yml --add_user user.yaml
nvflare provision -p project.yml --add_client client.yaml
The new kit appears in a new prod_NN folder. To make the addition permanent, also add it to project.yml.
Distributed Provisioning
In distributed provisioning, private keys never leave the participant's machine.
Requester Project Admin
--------- -------------
nvflare cert request ──request.zip──▶ nvflare cert init (once)
nvflare cert approve
nvflare package ◀──signed.zip───
1. Project Admin: create the profile and CA
# project_profile.yaml (any location)
name: hospital_federation
scheme: grpc
connection_security: tls
server:
host: server1.hospital-central.org
fed_learn_port: 8002
admin_port: 8003 # optional; defaults to fed_learn_port
nvflare cert init --profile project_profile.yaml -o ./ca --deploy-version 00
cert init option |
Default | Description |
|---|---|---|
--profile |
required | Profile path; init reads only name. |
-o, --output-dir |
required | Writes rootCA.pem, rootCA.key (secret), and ca.json. |
--deploy-version |
00 |
Generation number, mapped to prod_00, prod_01, ... |
--org |
— | Organization for the root certificate's O field. |
--valid-days |
3650 |
Root CA validity. |
--force |
off | Replace CA files (after backup) only with a new deploy version. |
Note the different defaults: a distributed root is valid 3650 days by default, a centralized one 360.
2. Requester: create a request
Each participant writes a definition with exactly one entry in participants, using the Project Admin's exact project name:
name: hospital_federation
participants:
- name: hospital-a
type: client
org: hospital_alpha
For a user add type: admin and role: lead (or org_admin, member); for a server add fed_learn_port and optionally admin_port (its listen ports).
nvflare cert request --participant hospital-a.yaml
This writes ./hospital-a/ containing hospital-a.key, hospital-a.csr, site.yaml, request.json, and hospital-a.request.zip. Send only the zip. Options: -p/--participant (required), --out (default ./<name>), --force.
3. Project Admin: approve
nvflare cert approve hospital-a/hospital-a.request.zip --ca-dir ./ca --profile project_profile.yaml
| Option | Default | Description |
|---|---|---|
request_zip |
required | The request zip. |
-c, --ca-dir |
required | Folder with rootCA.pem, rootCA.key, ca.json. |
--profile |
required | The project profile. |
--out |
<name>.signed.zip next to the request |
Output path. |
--valid-days |
1095 |
Participant certificate validity. |
--force |
off | Overwrite an existing signed zip. |
Approval rejects requests whose project name does not match, signs the CSR, embeds the server endpoint, scheme, and connection security from the profile, and signs CA metadata into signed.json (with signed.json.sig). The output prints rootca_fingerprint_sha256: share it with the requester through a trusted channel. Request zips from older releases without a site_yaml_sha256 field are rejected; regenerate them.
4. Requester: package the kit
nvflare package hospital-a/hospital-a.signed.zip --fingerprint <rootca_fingerprint_sha256>
| Option | Default | Description |
|---|---|---|
input |
required | The *.signed.zip. |
-w, --workspace |
workspace |
Output root. |
--request-dir |
next to the zip | Local request folder, if the zip was moved. |
--fingerprint, --expected-fingerprint |
— | Expected root CA SHA-256; mismatch fails. |
--force |
off | Replace an existing participant under the same CA and deploy version. |
package verifies the zip contents, the signature on signed.json, that no private key is included, that the local key matches the certificate, the certificate chain, and that local and signed metadata agree. Without --fingerprint there is no out-of-band trust check, because the zip carries its own rootCA.pem. Output goes to <workspace>/<project>/prod_<NN>/<identity>/; participants approved by the same CA and deploy version share one prod_NN, and a root CA mismatch in an existing prod_NN is a hard error that --force does not bypass.
A server definition may set connection_security: mtls as a local package-time override; it is not approved by the Project Admin. If the server endpoint changes after approval, update the profile and reissue signed zips.
Note: NVFLARE 2.8.0 had a bug in
cert init --orgthat omitted the organization from the root's issuer name. If your root's subject and issuer differ, recreate the CA with a new deploy version and reissue all kits.
Startup Kits and Kubernetes or Slurm
Kubernetes and Slurm runtimes use the participant certificate for both TLS roles on internal links, so it must allow both clientAuth and serverAuth. Kits from NVFLARE 2.8 distributed provisioning carry only one of them and must be re-provisioned before using those runtimes. See Deployment.
See Also
- Security
- Deployment
- poc, which provisions automatically