{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "title": "id_service_enable_command",
  "description": "ID Service enable command schema",
  "additionalProperties": false,
  "required": [
    "tenant_id",
    "environment_id"
  ],
  "properties": {
    "tenant_id": {
      "type": "string",
      "minLength": 32,
      "maxLength": 36,
      "format": "uuid",
      "description": "A UUID."
    },
    "environment_id": {
      "type": "string",
      "minLength": 32,
      "maxLength": 36,
      "format": "uuid",
      "description": "A UUID."
    },
    "config": {
      "type": "object",
      "title": "ax_id_service",
      "description": "ID Service config defaults",
      "additionalProperties": false,
      "properties": {
        "management_super_admins": {
          "type": "array",
          "description": "List of management super admins",
          "additionalItems": false,
          "items": {
            "type": "string"
          }
        },
        "allowed_origins": {
          "type": "array",
          "description": "List of allowed origins",
          "additionalItems": false,
          "items": {
            "type": "string"
          }
        },
        "access_token_lifetime": {
          "type": "integer",
          "description": "Access token lifetime in seconds"
        },
        "cookie_lifetime": {
          "type": "integer",
          "description": "Cookie lifetime in seconds"
        },
        "service_account_token_lifetime": {
          "type": "integer",
          "description": "Service account token lifetime in seconds"
        },
        "idp_configurations": {
          "type": "object",
          "title": "ax_idp_configurations",
          "description": "Configuration details for ID Providers",
          "additionalProperties": false,
          "properties": {
            "google": {
              "type": "object",
              "title": "google_configuration",
              "description": "IDP configuration for Google",
              "required": [
                "enabled",
                "use_built_in_idp"
              ],
              "additionalProperties": false,
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "Status of the IDP"
                },
                "use_built_in_idp": {
                  "type": "boolean",
                  "description": "Use built in Google IDP"
                },
                "client_id": {
                  "type": "string",
                  "description": "Client ID for Google IDP"
                },
                "client_secret": {
                  "type": "string",
                  "description": "Client secret for Google IDP"
                }
              },
              "if": {
                "properties": {
                  "use_built_in_idp": {
                    "const": false,
                    "description": "Use built in Google IDP"
                  }
                }
              },
              "then": {
                "required": [
                  "client_id",
                  "client_secret"
                ]
              }
            },
            "axinom": {
              "type": "object",
              "title": "axinom_idp_configuration",
              "description": "IDP configuration for Axinom",
              "required": [
                "enabled"
              ],
              "additionalProperties": false,
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "Status of the IDP"
                }
              }
            }
          }
        }
      }
    }
  }
}