Skip to content

YAML Import Schema ​

ProAuth 3.x uses API-versioned YAML resources for CLI imports. The schema no longer uses YAML tags such as !CustomerDto or v1 DTO names. Each document declares its type with apiVersion and kind, and the CLI imports the file through the v2 Management API and v2 User Store API.

This page describes the v3 YAML standard used by:

  • proauthcli data import
  • proauthcli label import
  • proauthcli viewdefinition import
  • the matching migrate-yaml commands

WARNING

Legacy YAML files that use !TypeDto tags are not accepted by the ProAuth 3.x import commands. Convert them first with the corresponding migrate-yaml command.

API Versions ​

Use the same ProAuth version for the CLI and backend. YAML apiVersion values describe the API family used by the CLI, not the ProAuth product version. Older CLIs may not support newer configuration collections such as token-exchange policies.

Import areaapiVersionSupported kind values
Management datamanagement.proauth.net/v2Management configuration entities
User Store datauserstore.proauth.net/v2User Store users and groups
Data import list wrapperimport.proauth.net/v1List
Labels and legacy view wrappersmanagement.proauth.io/v2LabelBundle, ViewDefinition, List
Canonical React AdminApp viewsreafx.net/v3ViewDefinition

Data Import Resources ​

Each data import document has the following shape:

yaml
apiVersion: management.proauth.net/v2
kind: Customer
metadata:
  id: "09f43e7d-571a-4a24-b3d1-edf492640a0c"
spec:
  name: 4tecture

The top-level fields are:

FieldRequiredDescription
apiVersionYesSelects the Management API v2 or User Store API v2 resource family.
kindYesSelects the resource type.
metadataYesContains import metadata. metadata.id is the entity ID. User Store resources also require metadata.userStoreId.
specYesContains the v2 create/update command fields and owned child configuration.
relationshipsNoContains explicit relationship reconciliation rules.

Top-level unknown fields are rejected. Unknown apiVersion or kind values are rejected.

Supported Data Kinds ​

Management resources use apiVersion: management.proauth.net/v2:

KindDescription
CustomerCustomer organization
SubscriptionCustomer subscription
TenantTenant
ClientAppOAuth/OIDC client application
ClientAppAuthenticationConfigurationClient authentication method, certificate-bound token, DPoP settings, and tls_client_auth certificate metadata for a client application
ClientAppKeySetOne key set for an existing client application identified by spec.clientAppId
ClaimRuleClaim filter or transformation rule
CertStoreCertificate store entry
IPAddressRangeTenant IP range
IdpInstanceIdentity provider instance
MfaInstanceMFA instance
ClientAppRoleRole assigned to a client application
ProAuthUserRoleRole assigned to a ProAuth user
ProAuthGroupRoleRole assigned to a ProAuth group
ProAuthRoleAssignmentImmutable scoped role assignment to a user, group, or service principal
ProAuthGroupProAuth group
CustomViewCustom authentication view
CustomAssetCustom asset

User Store resources use apiVersion: userstore.proauth.net/v2:

KindDescription
UserUser Store user
GroupUser Store group

Multiple Documents And Lists ​

You can split imports across multiple files, use multiple YAML documents in one file, or wrap resources in a list.

Multiple documents:

yaml
apiVersion: management.proauth.net/v2
kind: Customer
metadata:
  id: "{{guid:customer}}"
spec:
  name: Example
---
apiVersion: management.proauth.net/v2
kind: Subscription
metadata:
  id: "{{guid:subscription}}"
spec:
  customerId: "{{guid:customer}}"
  name: Example
  status: active

List wrapper:

yaml
apiVersion: import.proauth.net/v1
kind: List
items:
  - apiVersion: management.proauth.net/v2
    kind: Customer
    metadata:
      id: "{{guid:customer}}"
    spec:
      name: Example
  - apiVersion: management.proauth.net/v2
    kind: Subscription
    metadata:
      id: "{{guid:subscription}}"
    spec:
      customerId: "{{guid:customer}}"
      name: Example
      status: active

Placeholder System ​

The v3 YAML format keeps the existing double-curly placeholder system.

PlaceholderDescription
{{guid}}Generates a new GUID.
{{guid:name}}Generates a GUID on first use and reuses the same value for the same name.
{{secret:length}}Generates a cryptographically secure random string.
{{env:VARIABLE_NAME}}Reads an environment variable.
{{idptype:key}}Looks up an IdP type by key.
{{mfatype:key}}Looks up an MFA type by key.
{{proauthuserfromuserstore:idpInstanceId.userId}}Resolves a ProAuth user from a User Store user.
{{proauthgroupfromuserstore:idpInstanceId.groupId}}Resolves a ProAuth group from a User Store group.

Placeholders can be nested when a later lookup depends on a generated value:

yaml
proAuthUserId: "{{proauthuserfromuserstore:{{guid:userstore}}.{{guid:user}}}}"

Named GUID placeholders are reused within one processing run, not persisted across independent runs. Generate IDs once with proauthcli data parse "./templates/*.yml" --outputPath "./resolved", review and retain the resolved files, then import those files on every deployment. Do not repeatedly import an unresolved GUID template: it creates new identities on each run. Keep environment-based secrets outside committed resolved files; --replaceDynamicPlaceholders also resolves those values.

When adopting existing configuration, copy its actual IDs from the Management API or administration interface. Assigning new IDs to existing rows creates additional records instead of updating them.

spec And Owned Child Configuration ​

The spec section contains the fields of the v2 create/update command for the resource. It can also contain owned child collections that belong to the resource.

Owned children are not relationship declarations. They are configuration objects whose lifecycle is owned by the parent.

CertStore resources support the legacy certificate and password fields as well as the v2 certificateInput object. Use certificateInput for PEM based automation:

yaml
apiVersion: management.proauth.net/v2
kind: CertStore
metadata:
  id: "{{guid:certstore}}"
spec:
  name: Tenant signing certificate
  certType: OidcTokenSigning
  applyToTenantId: "{{guid:tenant}}"
  certificateInput:
    pemCertificateFilePath: certs/tls.crt
    pemPrivateKeyFilePath: certs/tls.key
    password: "{{env:CERT_PASSWORD}}"

Certificate file paths in CLI YAML imports are resolved relative to the YAML file and sent inline to the Management API. Passwords may be omitted when the private key or PFX is not password-protected.

ClientAppAuthenticationConfiguration uses the client application ID as its resource ID. The importer copies metadata.id to spec.clientAppId, so clientAppId can be omitted from the YAML:

yaml
apiVersion: management.proauth.net/v2
kind: ClientAppAuthenticationConfiguration
metadata:
  id: "10000000-0000-4000-8000-000000000005"
spec:
  tokenEndpointAuthMethod: tls_client_auth
  requireCertificateBoundAccessTokens: true
  tlsClientAuthSubjectDn: CN=identity-protocols-mtls-client

The same resource also supports DPoP settings:

yaml
apiVersion: management.proauth.net/v2
kind: ClientAppAuthenticationConfiguration
metadata:
  id: "10000000-0000-4000-8000-000000000006"
spec:
  tokenEndpointAuthMethod: client_secret_post
  dpopBoundAccessTokens: true
  requireDpopNonce: true

Asymmetric client public keys are configured as ClientApp owned children named clientAppKeySets. Use key sets for private_key_jwt, JAR request-object signatures, self_signed_tls_client_auth, and token encryption:

yaml
apiVersion: management.proauth.net/v2
kind: ClientApp
metadata:
  id: "{{guid:clientapp}}"
spec:
  subscriptionId: "{{guid:subscription}}"
  name: "Portal"
  enabled: true
  isPublic: false
  clientAppKeySets:
    - id: "{{guid:clientapp-private-key-jwt}}"
      name: "Portal private_key_jwt signing keys"
      sourceType: InlinePublicJwks
      usage: ClientAssertionSigning
      status: Active
      jwksJson: '{"keys":[{"kty":"RSA","kid":"portal-signing-2026-01","use":"sig","alg":"RS256","n":"...","e":"AQAB"}]}'
    - id: "{{guid:clientapp-token-encryption}}"
      name: "Portal token encryption keys"
      sourceType: RemoteJwksUri
      usage: TokenEncryption
      status: Active
      jwksUri: "https://portal.example.com/.well-known/jwks.json"

The keySets alias is also accepted, but clientAppKeySets is recommended for configuration repositories. The importer creates missing key sets and updates existing key sets by id.

Import one key set for an existing client ​

When the client already exists, you can manage a single key set independently. For example, save this document as admin-jar.yml, substitute the existing Admin App client ID in spec.clientAppId, and set ADMIN_JAR_PUBLIC_JWKS to its compact public JWKS JSON.

yaml
apiVersion: management.proauth.net/v2
kind: ClientAppKeySet
metadata:
  id: "20000000-0000-4000-8000-000000000001"
spec:
  clientAppId: "10000000-0000-4000-8000-000000000005"
  name: Admin App JAR signing
  sourceType: InlinePublicJwks
  usage: RequestObjectSigning
  status: Active
  jwksJson: >-
    {{env:ADMIN_JAR_PUBLIC_JWKS}}

Run proauthcli data import admin-jar.yml. For a new key set, choose a GUID once for metadata.id and retain it in the file. To manage an existing key set, use its stored ID. Each import writes only that record. An update checks the client ID and uses the key set's concurrency token. Supply the full desired fields for that key set, including all keys you want to retain in its JWKS.

Other client application examples ​

yaml
apiVersion: management.proauth.net/v2
kind: ClientApp
metadata:
  id: "20000000-0000-4000-8000-000000000001"
spec:
  subscriptionId: "20000000-0000-4000-8000-000000000002"
  name: "Portal"
  enabled: true
  isPublic: false
  scopeFilterEnabled: true
  resourceFilterEnabled: true
  secrets:
    - id: "20000000-0000-4000-8000-000000000003"
      name: "Default Secret"
      secret: "{{env:CLIENTAPP_SECRET}}"
  resources:
    - id: "20000000-0000-4000-8000-000000000004"
      key: "ProAuthManagementService"
      name: "PROAUTH_MANAGEMENT_SERVICE"
  scopes:
    - id: "20000000-0000-4000-8000-000000000005"
      key: "openid"
      name: "openid"
  redirectUris:
    - id: "20000000-0000-4000-8000-000000000006"
      uri: "https://portal.example.com/signin-oidc"
      redirectType: RedirectUri
  metadata:
    - key: app
      value: portal

Supported owned child collections include:

Owner kindOwned child collections
Tenantoptions, ipAddressRanges
ClientAppsecrets, clientAppSecrets, resources, clientAppResources, scopes, clientAppScopes, redirectUris, clientAppRedirectUris, federatedIdentities, clientAppFederatedIdentities, keySets, clientAppKeySets, tokenExchangePolicies, authenticationAssurancePolicies, metadata
IdpInstanceoptions, metadata
MfaInstanceoptions, metadata
ProAuthGroupmetadata
Userprofiles, userProfiles
Groupmetadata

Stable child IDs and repeated imports ​

The repeatable client sample shows a complete customer, subscription, and client manifest with retained IDs. Adapt its example IDs once for your deployment.

Set an explicit, stable id for every identified child in new manifests, including redirects, secrets, scopes, resources, federated identities, key sets, token-exchange policies, and tenant IP ranges. Keep each ID unchanged across deployments. The schema still accepts omitted IDs for backward compatibility; the CLI prints a warning with the source document, owner, collection, and child position.

With an explicit ID, a missing child is created and an existing child is updated in place. Its actual owner must match the containing resource. A foreign child ID or a contradictory owner field is rejected; the importer does not adopt or move the record. Existing concurrency checks still apply. Previously accepted manifests that pointed at another owner's children must be corrected.

For redirectUris and clientAppRedirectUris without IDs, the CLI reads all pages for that client and compares the exact URI string and redirect type. One match is reused without a write; no match creates a record; multiple matches stop the import and report the duplicate IDs. Repeated entries in the same import are also reused. URI case, escaping, path, and redirect type are not normalized. Changing an ID-less URI creates another entry and leaves the old entry in place. Use the existing record's ID to update it intentionally.

Concurrent imports using this CLI derive the same ID for the same client, exact URI, and redirect type; the database primary key prevents those creates from producing two records. This does not prevent duplicates created by older CLIs or other API callers using unrelated IDs. A conflicting record or changing lookup fails safely for review/retry. No database migration or automatic duplicate deletion is performed.

Other identified children retain their previous create behavior when an ID is omitted, with a warning that repeats may create duplicates. Names are not assumed unique, and secrets are not compared for reuse. Owner/name options and key-based metadata keep their existing reconciliation rules and do not require a GUID merely to avoid this warning.

Import dependencies ​

Ordinary owned children are processed after their parent. Client-scoped claim rules are processed after client applications exist. Required creation associations are derived from ClaimRule.relationships.clientApps using set or add; inverse ClientApp.relationships.claimRules declarations also work. The existing inline spec.clientApps creation payload remains supported. Choose one relationship owner consistently. A remove declaration does not supply a creation prerequisite.

For example, declare the client elsewhere in the same import, then use:

yaml
apiVersion: management.proauth.net/v2
kind: ClaimRule
metadata:
  id: "20000000-0000-4000-8000-000000000007"
spec:
  name: Portal claim filter
  subscriptionId: "20000000-0000-4000-8000-000000000002"
  ruleLevel: ClientApp
  ruleType: Filter
  filterTarget: Type
  typeEvaluationRule: '^portal\.'
  destination: All
  isActive: true
relationships:
  clientApps:
    mode: set
    refs:
      - id: "20000000-0000-4000-8000-000000000001"

Relationships are reconciled after top-level resources. Client tokenExchangePolicies and authenticationAssurancePolicies are processed last, after client authentication settings and both clients' tenant relationships are available. Declare the required clients and tenant associations in the same import, or provision them beforehand. The server continues to validate tenant/subscription ownership, authentication, and token-binding requirements. Explicit set, add, and remove modes retain their meaning.

Imports remain sequential and are not whole-file transactions. A failure leaves earlier successful operations applied; correct the failed prerequisites and reimport the retained manifest. Other dependencies, such as a subscription's customer, must still appear in creation order.

Immutable role assignments ​

An unchanged ProAuthRoleAssignment is a no-op: it retains its ID, concurrency token, and existing grant. A changed principal, role, or scope is rejected with instructions and leaves the existing assignment intact. The importer no longer deletes an assignment before attempting a replacement. To change access intentionally, create the intended assignment with a new stable ID, verify the resulting permissions, then explicitly revoke the old assignment through the supported API or administration workflow. Review the temporary overlap in permissions when following that sequence.

Relationship Management ​

Relationships are declared in the relationships section. This replaces the legacy v1 style where navigation properties were sometimes embedded under either side of a relationship.

The goals are:

  • relationships are explicit;
  • the operation is deterministic;
  • clearing a relationship is intentional;
  • import files can be split across files without relying on nesting order.

Relationship Declaration Shape ​

Use this shape for new files:

yaml
relationships:
  idpInstances:
    mode: set
    refs:
      - "{{guid:userstore-idp}}"
      - "88f30d7c-113d-4acf-bf8d-067bf6c67534"

The shorthand form is also accepted and defaults to mode: set:

yaml
relationships:
  idpInstances:
    - "{{guid:userstore-idp}}"
    - "88f30d7c-113d-4acf-bf8d-067bf6c67534"

Use the explicit form for long-lived configuration files. It is clearer during review and makes destructive changes visible.

Relationship Modes ​

ModeBehavior
setReplaces the complete relationship set with refs. This is the default.
addAdds the referenced items and leaves existing items untouched.
removeRemoves the referenced items and leaves all other existing items untouched.

Omitting a relationship means the CLI does not manage that relationship. Existing database relationships stay unchanged.

Declaring an empty set clears the relationship:

yaml
relationships:
  clientApps:
    mode: set
    refs: []

An empty relationship declaration is equivalent to mode: set with no refs:

yaml
relationships:
  clientApps: []

Relationship References ​

For most relationships, a ref can be a string ID:

yaml
relationships:
  tenants:
    mode: set
    refs:
      - "14bb3908-d77b-4a5f-90ec-d4e7358e3194"

Mappings are also accepted. This is useful when the same relationship list contains IDs that are easier to review with their target kind:

yaml
relationships:
  tenants:
    mode: set
    refs:
      - kind: Tenant
        id: "14bb3908-d77b-4a5f-90ec-d4e7358e3194"

The importer validates that relationship refs are not empty. Use refs: [] when you want to clear a relationship.

Supported Relationship Owners ​

Relationships can only be declared on registered owner kinds. If a relationship name is not valid for the selected owner kind, the import fails.

Management relationships:

Owner kindRelationship names
TenantidpInstances, mfaInstances, clientApps
ClientApptenants, idpInstances, mfaInstances, claimRules, allowedTokenExchangeClientApps, authorizedUsers, authorizedGroups
ClaimRuleclientApps
CertStoreidpInstances
IdpInstancetenants, certStores, clientApps, mfaInstances
MfaInstancetenants, idpInstances, clientApps, idpTypes, proAuthUsers
ProAuthGroupmemberUsers, parentGroups, memberGroups

User Store relationships:

Owner kindRelationship names
Usergroups
GroupmemberUsers, parentGroups, memberGroups

Deterministic Ownership Guidance ​

Some relationships can be expressed from either side because the Management API exposes dedicated endpoints on both resources. To keep imports deterministic, pick one owner for each relationship in your configuration set and keep that ownership consistent.

Recommended ownership:

RelationshipRecommended YAML owner
Tenant to IdP instancesTenant.relationships.idpInstances
Tenant to MFA instancesTenant.relationships.mfaInstances
Tenant to client appsTenant.relationships.clientApps
Client app to allowed token exchange appsClientApp.relationships.allowedTokenExchangeClientApps
Client app authorization users/groupsClientApp.relationships.authorizedUsers / authorizedGroups
Claim rule to client appsClaimRule.relationships.clientApps
Cert store to IdP instancesCertStore.relationships.idpInstances
IdP instance to cert storesIdpInstance.relationships.certStores
MFA instance to IdP types and ProAuth usersMfaInstance.relationships.idpTypes / proAuthUsers
ProAuth group membershipProAuthGroup.relationships.memberUsers, parentGroups, memberGroups
User Store user group membershipUser.relationships.groups or Group.relationships.memberUsers, but not both in the same import set
User Store group nestingGroup.relationships.parentGroups or Group.relationships.memberGroups, but not both for the same pair

Avoid declaring the same relationship pair from both sides in the same import set. If both sides are declared with mode: set, the later relationship reconciliation can overwrite the earlier one and make the final result harder to reason about. The migration command reports relationship conflicts it can detect; review those warnings before committing migrated files.

Example: Tenant With IdP Relationship ​

yaml
apiVersion: management.proauth.net/v2
kind: Tenant
metadata:
  id: "{{guid:tenant}}"
spec:
  subscriptionId: "{{guid:subscription}}"
  name: "Example Tenant"
  accessGrantConsent: Inactive
  logoutConsent: Inactive
relationships:
  idpInstances:
    mode: set
    refs:
      - "{{guid:userstore-idp}}"

Example: User Store User And Group ​

User Store resources require both metadata.id and metadata.userStoreId.

yaml
apiVersion: userstore.proauth.net/v2
kind: User
metadata:
  id: "{{guid:user-akira}}"
  userStoreId: "{{guid:userstore-idp}}"
spec:
  loginName: akira
  firstName: Akira
  lastName: Example
  emailAddress: akira@example.com
  passwordNeverExpires: true
  emailAddressConfirmed: true
  isUserActive: true
  profiles:
    - key: department
      value: engineering
---
apiVersion: userstore.proauth.net/v2
kind: Group
metadata:
  id: "{{guid:group-admins}}"
  userStoreId: "{{guid:userstore-idp}}"
spec:
  name: Admins
relationships:
  memberUsers:
    mode: set
    refs:
      - "{{guid:user-akira}}"

Labels ​

Labels use apiVersion: management.proauth.io/v2 and kind: LabelBundle.

See Label Import And Export for detailed command usage, export filters, fallback behavior, and CI/CD guidance.

yaml
apiVersion: management.proauth.io/v2
kind: LabelBundle
metadata:
  name: common-labels
spec:
  entries:
    - contentPath: /authviews/userlogin-sign-in
      labels:
        - language: en
          fallback: true
          content: Sign in
        - language: de
          fallback: false
          content: Anmelden

Import labels:

bash
proauthcli label import "./labels/*.yml"

Exported label files are written in the same resource format.

ProAuth 3.x label content paths must use scoped roots such as /authviews, /accountmgmt, /oidc, /system, or /adminapp. Legacy /label and /page roots are not runtime fallback roots in ProAuth 3.x. Use proauthcli label migrate-yaml to rewrite legacy label files before import.

View Definitions ​

View definitions for the React AdminApp use apiVersion: reafx.net/v3 and kind: ViewDefinition. Export an installed view to obtain its current schema, fields, and API operation bindings:

bash
proauthcli viewdefinition export "./viewdefinitions" --routeFilter "tenants"

Use an ordinary route value, as shown above. The CLI escapes it as a single literal; it is not a query expression. The previous outer-single-quote workaround remains accepted. For a route containing a literal backslash followed by r, f, n, b, or t, use --idFilter; the query API cannot represent those sequences literally. To export a specific identity, use a plain GUID:

bash
proauthcli viewdefinition export "./viewdefinitions" --idFilter "20000000-0000-4000-8000-000000000008"

Use either route or ID filtering, or omit both to export all pages. Malformed GUIDs and whitespace-only filters are rejected locally. Exports use the canonical reafx.net/v3 format and can be reimported directly; the legacy management.proauth.io/v2 wrapper is a separate compatibility format.

Import view definitions:

bash
proauthcli viewdefinition import "./viewdefinitions/*.yml"

The CLI preserves legacy scalar semantics during migration. Blank legacy fields remain null, while explicitly quoted strings such as "true" remain strings.

Migration Commands ​

Convert legacy data import files:

bash
proauthcli data migrate-yaml "./config/*.yml" --outputPath "./config-v3" --overwrite

Convert labels:

bash
proauthcli label migrate-yaml "./labels/*.yml" --outputPath "./labels-v3" --overwrite

Convert view definitions:

bash
proauthcli viewdefinition migrate-yaml "./viewdefinitions/*.yml" --outputPath "./viewdefinitions-v3" --overwrite

The label migration rewrites legacy label paths to the ProAuth 3.x scoped roots and preserves culture suffixes. The view definition migration rewrites full /page/... label IDs to /adminapp/...; short label IDs are left unchanged.

The data migration command also supports:

bash
--replaceDynamicPlaceholders
--conflictStrategy fail|preferCanonicalOwner

The data import and data parse commands resolve processed YAML in memory by default and do not modify the input file. Use --outputPath to write processed YAML to a separate folder, or --writeProcessedInput to explicitly write processed YAML back to the source file when no output folder is set.

Use the default --conflictStrategy fail for customer migrations. It stops when the old files contain incompatible relationship declarations that need human review.

After migration:

  1. Review the generated files and migration warnings.
  2. Commit the migrated YAML files to your configuration repository.
  3. Update deployment scripts to import the migrated files.
  4. Run the imports against a non-production ProAuth 3.x environment.
  5. Verify relationship-sensitive flows such as tenant login, user-store login, client app sign-in, role assignments, and group memberships.

Repeated option imports ​

Tenant, identity-provider, and MFA options are reconciled within their owner across all result pages. A single existing match is updated in place; a missing option is created. Ambiguous duplicates stop processing instead of being deleted automatically. See option preflight and recovery before upgrading an installation that used older importers.

Explicit option IDs are optional regardless of collection size. Existing stable IDs remain supported and must agree with the owner/name match. Unchanged values, including secrets, are not rewritten. Concurrent-create protection also requires the server uniqueness migration described in the recovery guide.

See API authentication assurance for the opt-in policy fields and defaults.