{
  "realm": "b2b-flight-platform",
  "enabled": true,
  "sslRequired": "none",
  "registrationAllowed": false,
  "loginWithEmailAllowed": true,
  "duplicateEmailsAllowed": false,
  "resetPasswordAllowed": true,
  "editUsernameAllowed": false,
  "bruteForceProtected": true,
  "permanentLockout": false,
  "maxFailureWaitSeconds": 900,
  "minimumQuickLoginWaitSeconds": 60,
  "waitIncrementSeconds": 60,
  "quickLoginCheckMilliSeconds": 1000,
  "maxDeltaTimeSeconds": 43200,
  "failureFactor": 5,
  "roles": {
    "realm": [
      {
        "name": "SUPER_ADMIN",
        "description": "Platform administrator with full system access"
      },
      {
        "name": "AGENCY_ADMIN",
        "description": "Sub-agency administrator managing their agency"
      },
      {
        "name": "HR_USER",
        "description": "Human resources role within a sub-agency"
      },
      {
        "name": "FINANCE_USER",
        "description": "Financial management role within a sub-agency"
      },
      {
        "name": "AGENT",
        "description": "Standard user performing flight operations"
      }
    ]
  },
  "clients": [
    {
      "clientId": "b2b-flight-backend",
      "enabled": true,
      "clientAuthenticatorType": "client-secret",
      "secret": "b2b-flight-backend-secret",
      "redirectUris": [
        "http://localhost:8081/*",
        "http://localhost:3000/*"
      ],
      "webOrigins": [
        "http://localhost:8081",
        "http://localhost:3000"
      ],
      "protocol": "openid-connect",
      "publicClient": false,
      "bearerOnly": false,
      "standardFlowEnabled": true,
      "implicitFlowEnabled": false,
      "directAccessGrantsEnabled": true,
      "serviceAccountsEnabled": true,
      "authorizationServicesEnabled": false,
      "fullScopeAllowed": true,
      "attributes": {
        "access.token.lifespan": "1800",
        "client.session.idle.timeout": "1800",
        "client.session.max.lifespan": "36000"
      }
    },
    {
      "clientId": "b2b-flight-frontend",
      "enabled": true,
      "publicClient": true,
      "redirectUris": [
        "http://localhost:3000/*"
      ],
      "webOrigins": [
        "http://localhost:3000"
      ],
      "protocol": "openid-connect",
      "standardFlowEnabled": true,
      "implicitFlowEnabled": false,
      "directAccessGrantsEnabled": true,
      "attributes": {
        "access.token.lifespan": "1800"
      }
    }
  ],
  "requiredActions": [
    {
      "alias": "CONFIGURE_TOTP",
      "name": "Configure OTP",
      "providerId": "CONFIGURE_TOTP",
      "enabled": true,
      "defaultAction": false,
      "priority": 10
    }
  ],
  "otpPolicyType": "totp",
  "otpPolicyAlgorithm": "HmacSHA1",
  "otpPolicyInitialCounter": 0,
  "otpPolicyDigits": 6,
  "otpPolicyLookAheadWindow": 1,
  "otpPolicyPeriod": 30,
  "otpSupportedApplications": [
    "totpAppGoogleName",
    "totpAppMicrosoftAuthenticatorName"
  ],
  "users": [
    {
      "username": "superadmin",
      "enabled": true,
      "email": "superadmin@b2bflight.com",
      "emailVerified": true,
      "firstName": "Super",
      "lastName": "Admin",
      "credentials": [
        {
          "type": "password",
          "value": "SuperAdmin123!",
          "temporary": false
        }
      ],
      "realmRoles": [
        "SUPER_ADMIN"
      ],
      "requiredActions": []
    }
  ]
}
