{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nexus/json-schema/nexus-ldap-verify-login-xo-schema.json",
  "title": "LdapVerifyLoginXo",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nexus-security-management-ldap-api-openapi.yml#/components/schemas/LdapVerifyLoginXo",
  "required": [
    "base64Password",
    "base64Username",
    "ldapServer"
  ],
  "type": "object",
  "properties": {
    "base64Username": {
      "minLength": 1,
      "type": "string",
      "description": "Base64-encoded username to test"
    },
    "base64Password": {
      "minLength": 1,
      "type": "string",
      "description": "Base64-encoded password to test"
    },
    "ldapServer": {
      "$ref": "#/$defs/CreateLdapServerXo"
    }
  },
  "$defs": {
    "CreateLdapServerXo": {
      "required": [
        "authScheme",
        "connectionRetryDelaySeconds",
        "connectionTimeoutSeconds",
        "host",
        "maxIncidentsCount",
        "name",
        "port",
        "protocol",
        "searchBase",
        "userEmailAddressAttribute",
        "userIdAttribute",
        "userObjectClass",
        "userRealNameAttribute"
      ],
      "type": "object",
      "properties": {
        "name": {
          "minLength": 1,
          "type": "string",
          "description": "LDAP server name"
        },
        "protocol": {
          "type": "string",
          "description": "LDAP server connection Protocol to use",
          "enum": [
            "LDAP",
            "LDAPS"
          ]
        },
        "useTrustStore": {
          "type": "boolean",
          "description": "Whether to use certificates stored in Nexus Repository Manager's truststore"
        },
        "host": {
          "minLength": 1,
          "type": "string",
          "description": "LDAP server connection hostname"
        },
        "port": {
          "type": "integer",
          "description": "LDAP server connection port to use",
          "format": "int32"
        },
        "searchBase": {
          "minLength": 1,
          "type": "string",
          "description": "LDAP location to be added to the connection URL"
        },
        "authScheme": {
          "type": "string",
          "description": "Authentication scheme used for connecting to LDAP server",
          "enum": [
            "NONE",
            "SIMPLE",
            "CRAM_MD5",
            "DIGEST_MD5"
          ]
        },
        "authRealm": {
          "type": "string",
          "description": "The SASL realm to bind to. Required if authScheme is CRAM_MD5 or DIGEST_MD5"
        },
        "authUsername": {
          "type": "string",
          "description": "This must be a fully qualified username if simple authentication is used. Required if authScheme other than none."
        },
        "connectionTimeoutSeconds": {
          "maximum": 3600,
          "minimum": 1,
          "type": "integer",
          "description": "How long to wait before timeout",
          "format": "int32"
        },
        "connectionRetryDelaySeconds": {
          "minimum": 0,
          "type": "integer",
          "description": "How long to wait before retrying",
          "format": "int32"
        },
        "maxIncidentsCount": {
          "minimum": 0,
          "type": "integer",
          "description": "How many retry attempts",
          "format": "int32"
        },
        "userBaseDn": {
          "type": "string",
          "description": "The relative DN where user objects are found (e.g. ou=people). This value will have the Search base DN value appended to form the full User search base DN."
        },
        "userSubtree": {
          "type": "boolean",
          "description": "Are users located in structures below the user base DN?"
        },
        "userObjectClass": {
          "minLength": 1,
          "type": "string",
          "description": "LDAP class for user objects"
        },
        "userLdapFilter": {
          "type": "string",
          "description": "LDAP search filter to limit user search"
        },
        "userIdAttribute": {
          "minLength": 1,
          "type": "string",
          "description": "This is used to find a user given its user ID"
        },
        "userRealNameAttribute": {
          "minLength": 1,
          "type": "string",
          "description": "This is used to find a real name given the user ID"
        },
        "userEmailAddressAttribute": {
          "minLength": 1,
          "type": "string",
          "description": "This is used to find an email address given the user ID"
        },
        "userPasswordAttribute": {
          "type": "string",
          "description": "If this field is blank the user will be authenticated against a bind with the LDAP server"
        },
        "ldapGroupsAsRoles": {
          "type": "boolean",
          "description": "Denotes whether LDAP assigned roles are used as Nexus Repository Manager roles"
        },
        "groupType": {
          "type": "string",
          "description": "Defines a type of groups used: static (a group contains a list of users) or dynamic (a user contains a list of groups). Required if ldapGroupsAsRoles is true.",
          "enum": [
            "DYNAMIC",
            "STATIC"
          ]
        },
        "groupBaseDn": {
          "type": "string",
          "description": "The relative DN where group objects are found (e.g. ou=Group). This value will have the Search base DN value appended to form the full Group search base DN."
        },
        "groupSubtree": {
          "type": "boolean",
          "description": "Are groups located in structures below the group base DN"
        },
        "groupObjectClass": {
          "type": "string",
          "description": "LDAP class for group objects. Required if groupType is static"
        },
        "groupIdAttribute": {
          "type": "string",
          "description": "This field specifies the attribute of the Object class that defines the Group ID. Required if groupType is static"
        },
        "groupMemberAttribute": {
          "type": "string",
          "description": "LDAP attribute containing the usernames for the group. Required if groupType is static"
        },
        "groupMemberFormat": {
          "type": "string",
          "description": "The format of user ID stored in the group member attribute. Required if groupType is static"
        },
        "userMemberOfAttribute": {
          "type": "string",
          "description": "Set this to the attribute used to store the attribute which holds groups DN in the user object. Required if groupType is dynamic"
        },
        "authPassword": {
          "type": "string",
          "description": "The password to bind with. Required if authScheme other than none."
        }
      }
    }
  }
}