SolidX
ReferenceMetadata Schema

Users

Metadata schema for populating users in SolidX applications.

Where it lives

JSON Pointer: /users JSONPath: $.users Parent: Root of the metadata file

Overview

Use the users metadata section to populate initial user accounts in the platform.

Each user record can define identity fields such as full name, username, email, mobile number, and optional role assignments. If no roles are specified for a user, SolidX assigns the role defined by IAM_DEFAULT_ROLE. If that environment variable is not set, the Public role is used.

Example: Seeded Users

The example below creates two users with their basic account details. Because no passwords are provided, SolidX generates secure passwords and sends them to the configured email addresses.

Users schema example
{
  ..., // Other metadata
  "users": [ // Array of user metadata
    {
      "fullName": "John Doe",
      "username": "johndoe",
      "email": "john.doe@example.com",
      "mobile": "919999999999",
    },
    {
      "fullName": "Jane Smith",
      "username": "janesmith",
      "email": "jane.smith@example.com",
      "mobile": "918888888888",
      "roles": ["Admin", "Editor"] // Ensure these roles exist in the system or are provided in the roles metadata
    }  
  ]
}

Users Metadata Attributes

fullName (string, required)

Full name of the user.

username (string, required, unique)

Unique username for the user.

email (string, required, unique)

Unique email address of the user.

mobile (string, optional)

Includes country code (e.g. 919876543210 for India)

Mobile number of the user.

roles (array of strings, optional)

List of roles to be assigned to the user. If not provided, the user will be assigned the default role specified in the environment variable IAM_DEFAULT_ROLE or Public role if the environment variable is not set. Also note, if roles are provided and the IAM_DEFAULT_ROLE is present, it will be added to the list of roles assigned to the user.

Further Reference