> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Box.com V2

> The Box V2 connector retrieves data from a Box.com cloud-based data repository.

export const schema = {
  "type": "object",
  "title": "Box (v2)",
  "description": "Connector for Box.com. This connector can work in one of two ways: 1) It can crawl a single user's files (and files shared with that user) using OAuth, or 2) It  supports a JWT Service account method that will crawl all users in an enterprise using Box.com's \"As-User\" header to simulate each user. For large distributed accounts, JWT Service Account is recommended. Otherwise you need to explicitly provide a single user access to every file you want to crawl.",
  "required": ["parserId", "id", "properties", "pipeline"],
  "properties": {
    "parserId": {
      "type": "string",
      "title": "Parser ID",
      "description": "The Parser to use in the associated IndexPipeline."
    },
    "id": {
      "type": "string",
      "title": "Configuration ID",
      "description": "A unique identifier for this Configuration.",
      "minLength": 1,
      "pattern": "^[a-zA-Z0-9_-]+$"
    },
    "pipeline": {
      "type": "string",
      "title": "Pipeline ID",
      "description": "Name of the IndexPipeline used for processing output.",
      "minLength": 1,
      "pattern": "^[a-zA-Z0-9_-]+$"
    },
    "description": {
      "type": "string",
      "title": "Description",
      "description": "Optional description",
      "hints": ["lengthy"],
      "maxLength": 125
    },
    "modified": {
      "type": "string",
      "title": "Date Modified",
      "description": "The date at which this Configuration was last modified.",
      "hints": ["readonly", "hidden"]
    },
    "created": {
      "type": "string",
      "title": "Date Created",
      "description": "The date at which this Configuration was created.",
      "hints": ["readonly", "hidden"]
    },
    "type": {
      "type": "string",
      "title": "Type",
      "description": "A type ID for this connector.",
      "hints": ["readonly", "hidden"]
    },
    "collection": {
      "type": "string",
      "title": "Collection ID",
      "description": "The associated content Collection.",
      "hints": ["readonly", "hidden"],
      "minLength": 1,
      "pattern": "^[a-zA-Z0-9_-]+$"
    },
    "diagnosticLogging": {
      "type": "boolean",
      "title": "Diagnostic Logging",
      "description": "[Deprecated] Enables verbose diagnostic logging for troubleshooting. May increase log volume. Disabled by default.",
      "default": false
    },
    "type_description": {
      "type": "string",
      "title": "Type Description",
      "default": "Connector for Box.com. This connector can work in one of two ways: 1) It can crawl a single user's files (and files shared with that user) using OAuth, or 2) It  supports a JWT Service account method that will crawl all users in an enterprise using Box.com's \"As-User\" header to simulate each user. For large distributed accounts, JWT Service Account is recommended. Otherwise you need to explicitly provide a single user access to every file you want to crawl.",
      "hints": ["hidden", "readonly"]
    },
    "category": {
      "type": "string",
      "title": "Category",
      "default": "Connector for Box.com. This connector can work in one of two ways: 1) It can crawl a single user's files (and files shared with that user) using OAuth, or 2) It  supports a JWT Service account method that will crawl all users in an enterprise using Box.com's \"As-User\" header to simulate each user. For large distributed accounts, JWT Service Account is recommended. Otherwise you need to explicitly provide a single user access to every file you want to crawl.",
      "hints": ["hidden", "readonly"]
    },
    "connector": {
      "title": "Connector Type",
      "description": "Connector type.",
      "minLength": 1,
      "type": "string",
      "hints": ["hidden"]
    },
    "properties": {
      "type": "object",
      "title": "Box properties",
      "description": "Plugin specific properties.",
      "required": ["authenticationProperties", "application"],
      "properties": {
        "application": {
          "type": "object",
          "title": "Box application",
          "description": "Box application to crawl.",
          "required": [],
          "properties": {
            "boxItems": {
              "type": "array",
              "title": "Box Items",
              "description": "Enter the IDs of the folders you want to crawl. For instance, if your folder URL is https://app.box.com/folder/12345, you should enter 12345. Leave this property empty in order to crawl the entire Box Account.",
              "default": [],
              "items": {
                "type": "string",
                "minLength": 1
              }
            },
            "includedFileExtensions": {
              "type": "array",
              "title": "Included file extensions",
              "description": "Set of file extensions to be fetched. If specified, all non-matching files will be skipped.",
              "default": [],
              "items": {
                "type": "string",
                "minLength": 1
              }
            },
            "excludedFileExtensions": {
              "type": "array",
              "title": "Excluded file extensions",
              "description": "A set of all file extensions to be skipped from the fetch.",
              "default": [],
              "items": {
                "type": "string",
                "minLength": 1
              }
            },
            "inclusiveRegexes": {
              "type": "array",
              "title": "Inclusive regexes",
              "description": "Regular expressions for URI patterns to include. This will limit this datasource to only URIs that match the regular expression.",
              "default": [],
              "items": {
                "type": "string",
                "minLength": 1
              }
            },
            "exclusiveRegexes": {
              "type": "array",
              "title": "Exclusive regexes",
              "description": "Regular expressions for URI patterns to exclude. This will limit this datasource to only URIs that do not match the regular expression.",
              "default": [],
              "items": {
                "type": "string",
                "minLength": 1
              }
            },
            "indexFolderMetadata": {
              "type": "boolean",
              "title": "Index Folder Metadata",
              "description": "Enable indexing of folder metadata. Each folder will be represented by a document in the collection.",
              "default": false
            },
            "regexCacheSize": {
              "type": "number",
              "title": "",
              "default": 10000,
              "hints": ["hidden"],
              "maximum": 2147483647,
              "exclusiveMaximum": false,
              "minimum": -2147483648,
              "exclusiveMinimum": false,
              "multipleOf": 1
            }
          }
        },
        "authenticationProperties": {
          "type": "object",
          "title": "Authentication settings",
          "required": ["apiKey"],
          "properties": {
            "jwtProperties": {
              "type": "object",
              "title": "JWT Authentication settings",
              "required": [],
              "properties": {
                "appEntityId": {
                  "type": "string",
                  "title": "App Entity ID",
                  "description": "The JWT App User ID or JWT App Enterprise ID with access to crawl."
                },
                "publicKeyId": {
                  "type": "string",
                  "title": "Public Key Id",
                  "description": "The public key prefix from the box.com public keys"
                },
                "privateKeyBase64": {
                  "type": "string",
                  "title": "Private Key (Base64)",
                  "description": "Content of the private key. To get this value, open your key file and convert its content (including first and last line) to base64 string.",
                  "hints": ["secret"]
                },
                "privateKeyBase64VaultLabel": {
                  "type": "string",
                  "title": "Private Key (Base64) from Vault",
                  "description": "The Fusion managed secret to use for Private Key (Base64).",
                  "hints": ["vaultvaluetarget:privateKeyBase64", "enumUrl:/apps-manager/vault/labels?type=secret", "vaultref"]
                },
                "privateKeyPassword": {
                  "type": "string",
                  "title": "Private Key Password",
                  "description": "The password you entered for the private key file.",
                  "hints": ["secret"]
                },
                "privateKeyPasswordVaultLabel": {
                  "type": "string",
                  "title": "Private Key Password from Vault",
                  "description": "The Fusion managed secret to use for Private Key Password.",
                  "hints": ["vaultvaluetarget:privateKeyPassword", "enumUrl:/apps-manager/vault/labels?type=secret", "vaultref"]
                },
                "encryptionAlgorithm": {
                  "type": "string",
                  "title": "Encryption Algorithm",
                  "description": "Encryption Algorithm.",
                  "enum": ["RSA_SHA_256", "RSA_SHA_384", "RSA_SHA_512"],
                  "default": "RSA_SHA_256"
                },
                "accountType": {
                  "type": "string",
                  "title": "Account type",
                  "description": "App account type.",
                  "enum": ["USER", "ENTERPRISE"],
                  "default": "USER"
                },
                "tokenCacheEntries": {
                  "type": "number",
                  "title": "Max Token Cache Entries",
                  "description": "Max Token Cache Entries",
                  "default": 512,
                  "maximum": 2147483647,
                  "exclusiveMaximum": false,
                  "minimum": -2147483648,
                  "exclusiveMinimum": false,
                  "multipleOf": 1
                }
              }
            },
            "oAuthProperties": {
              "type": "object",
              "title": "OAuth Authentication settings",
              "required": [],
              "properties": {
                "refreshToken": {
                  "type": "string",
                  "title": "OAuth Refresh Token",
                  "description": "OAuth Refresh token"
                }
              }
            },
            "apiKey": {
              "type": "string",
              "title": "API Key",
              "description": "The box API Key"
            },
            "apiSecret": {
              "type": "string",
              "title": "API Secret",
              "description": "The Box API Secret",
              "hints": ["secret"]
            },
            "apiSecretVaultLabel": {
              "type": "string",
              "title": "API Secret from Vault",
              "description": "The Fusion managed secret to use for API Secret.",
              "hints": ["enumUrl:/apps-manager/vault/labels?type=secret", "vaultref", "vaultvaluetarget:apiSecret"]
            },
            "userCacheSize": {
              "type": "number",
              "title": "User cache size",
              "description": "Size of the user cache to save connection for impersonation",
              "default": 2000,
              "maximum": 2147483647,
              "exclusiveMaximum": false,
              "minimum": -2147483648,
              "exclusiveMinimum": false,
              "multipleOf": 1
            },
            "userCacheExpirationTime": {
              "type": "number",
              "title": "User cache expiration time",
              "description": "Time (minutes) before removing an item from the cache since it was last accessed by a read or a write",
              "default": 5,
              "maximum": 2147483647,
              "exclusiveMaximum": false,
              "minimum": -2147483648,
              "exclusiveMinimum": false,
              "multipleOf": 1
            }
          }
        },
        "proxyProperties": {
          "type": "object",
          "title": "Proxy settings",
          "required": [],
          "properties": {
            "proxyType": {
              "type": "string",
              "title": "Proxy type",
              "description": "Type of proxy to use.",
              "enum": ["HTTP", "SOCKS"]
            },
            "proxyHost": {
              "type": "string",
              "title": "Proxy host",
              "description": "The address to use when connecting through the proxy."
            },
            "proxyPort": {
              "type": "number",
              "title": "Proxy port",
              "description": "The port to use when connecting through the proxy.",
              "maximum": 2147483647,
              "exclusiveMaximum": false,
              "minimum": -2147483648,
              "exclusiveMinimum": false,
              "multipleOf": 1
            }
          },
          "hints": ["advanced"]
        },
        "connectionsConfig": {
          "type": "object",
          "title": "Connection settings",
          "required": [],
          "properties": {
            "readTimeout": {
              "type": "number",
              "title": "API Read Timeout (ms)",
              "description": "The box api read timeout in milliseconds.",
              "default": 120000,
              "maximum": 2147483647,
              "exclusiveMaximum": false,
              "minimum": -2147483648,
              "exclusiveMinimum": false,
              "multipleOf": 1
            },
            "connectTimeout": {
              "type": "number",
              "title": "API Connection Timeout (ms)",
              "description": "The box api connection timeout in milliseconds.",
              "default": 120000,
              "maximum": 2147483647,
              "exclusiveMaximum": false,
              "minimum": -2147483648,
              "exclusiveMinimum": false,
              "multipleOf": 1
            },
            "pageSize": {
              "type": "number",
              "title": "Request page size",
              "description": "Maximum number of items per paginated request",
              "default": 1000,
              "maximum": 1000,
              "exclusiveMaximum": false,
              "minimum": 1,
              "exclusiveMinimum": false,
              "multipleOf": 1
            }
          },
          "hints": ["advanced"]
        },
        "incrementalCrawlingConfig": {
          "type": "object",
          "title": "Incremental crawling settings",
          "required": [],
          "properties": {
            "cacheSize": {
              "type": "number",
              "title": "Folder collaborations cache size",
              "description": "Size of the folder collaborations cache",
              "default": 1000,
              "maximum": 2147483647,
              "exclusiveMaximum": false,
              "minimum": -2147483648,
              "exclusiveMinimum": false,
              "multipleOf": 1
            },
            "cacheExpirationTime": {
              "type": "number",
              "title": "Folder collaborations cache expiration time",
              "description": "Time in minutes before removing a folder collaboration set",
              "default": 5,
              "maximum": 2147483647,
              "exclusiveMaximum": false,
              "minimum": -2147483648,
              "exclusiveMinimum": false,
              "multipleOf": 1
            }
          },
          "hints": ["advanced"]
        },
        "maximumItemLimitConfig": {
          "type": "object",
          "title": "Item Count Limit",
          "required": [],
          "properties": {
            "maxItems": {
              "type": "number",
              "title": "Maximum Output Limit",
              "description": "Limits the number of items emitted to the configured IndexPipeline. The default is no limit (-1).",
              "default": -1,
              "maximum": 2147483647,
              "exclusiveMaximum": false,
              "minimum": -2147483648,
              "exclusiveMinimum": false,
              "multipleOf": 1
            }
          },
          "hints": ["advanced"]
        },
        "sizeLimitProperties": {
          "type": "object",
          "title": "Item Size Limits",
          "description": "Options for including or excluding items based on size, in bytes.",
          "required": [],
          "properties": {
            "maxSizeBytes": {
              "type": "number",
              "title": "Maximum",
              "description": "Used for excluding items when the item size is larger than the configured value.",
              "default": -1,
              "maximum": 2147483647,
              "exclusiveMaximum": false,
              "minimum": -2147483648,
              "exclusiveMinimum": false,
              "multipleOf": 1
            },
            "minSizeBytes": {
              "type": "number",
              "title": "Minimum",
              "description": "Used for excluding items when the item size is smaller than the configured value.",
              "default": 1,
              "maximum": 2147483647,
              "exclusiveMaximum": false,
              "minimum": -2147483648,
              "exclusiveMinimum": false,
              "multipleOf": 1
            }
          },
          "hints": ["advanced"]
        },
        "itemRetryProperties": {
          "type": "object",
          "title": "Item retry settings",
          "description": "Options to configure the retry operation for items.",
          "required": [],
          "properties": {
            "maxRetries": {
              "type": "number",
              "title": "Max retry attempts",
              "description": "The maximum number of attempts for a failed item",
              "default": 3,
              "maximum": 20,
              "exclusiveMaximum": false,
              "minimum": 0,
              "exclusiveMinimum": false,
              "multipleOf": 1
            },
            "retryDelayInSeconds": {
              "type": "number",
              "title": "Retry delay",
              "description": "The amount of time, in seconds, before process again a failed item",
              "default": 30,
              "maximum": 600,
              "exclusiveMaximum": false,
              "minimum": 1,
              "exclusiveMinimum": false,
              "multipleOf": 1
            }
          },
          "hints": ["advanced"]
        },
        "security": {
          "type": "object",
          "title": "Graph security filtering configuration",
          "required": [],
          "properties": {
            "collectionId": {
              "type": "string",
              "title": "ACL collection id",
              "description": "Sidecar collection ID for storing ACL records. Defaults to the content collection if not specified."
            },
            "enabled": {
              "type": "boolean",
              "title": "Enable security trimming",
              "description": "Enable query-time security-trimming",
              "default": true
            }
          }
        }
      }
    },
    "coreProperties": {
      "type": "object",
      "title": "Core Properties",
      "description": "Common behavior and performance settings.",
      "required": [],
      "properties": {
        "fetchSettings": {
          "type": "object",
          "title": "Fetch Settings",
          "description": "System level settings for controlling fetch behavior and performance.",
          "required": [],
          "properties": {
            "numFetchThreads": {
              "type": "number",
              "title": "Fetch Threads",
              "description": "Maximum number of fetch threads; defaults to 5.This setting controls the number of threads that call the Connectors fetch method.Higher values can, but not always, help with overall fetch performance.",
              "default": 5,
              "maximum": 500,
              "exclusiveMaximum": false,
              "minimum": 1,
              "exclusiveMinimum": false,
              "multipleOf": 1
            },
            "indexingThreads": {
              "type": "number",
              "title": "Index Subscription Threads",
              "description": "Maximum number of indexing threads; defaults to 4.This setting controls the number of threads in the indexing service used for processing content documents emitted by this datasource.Higher values can sometimes help with overall fetch performance.",
              "default": 4,
              "maximum": 10,
              "exclusiveMaximum": false,
              "minimum": 1,
              "exclusiveMinimum": false,
              "multipleOf": 1
            },
            "pluginInstances": {
              "type": "number",
              "title": "Number of plugin instances for distributed fetching",
              "description": "Maximum number of plugin instances for distributed fetching. Only specified number of plugin instanceswill do fetching. This is useful for distributing load between different instances.",
              "default": 0,
              "maximum": 500,
              "exclusiveMaximum": false,
              "minimum": 0,
              "exclusiveMinimum": false,
              "multipleOf": 1
            },
            "fetchItemQueueSize": {
              "type": "number",
              "title": "Fetch Item Queue Size",
              "description": "Size of the fetch item queue.Larger values result in increased memory usage, but potentially higher performance.Default is 10k.",
              "default": 10000,
              "hints": ["hidden"],
              "maximum": 500000,
              "exclusiveMaximum": false,
              "minimum": 1,
              "exclusiveMinimum": false,
              "multipleOf": 1
            },
            "fetchRequestCheckInterval": {
              "type": "number",
              "title": "Fetch request check interval(ms)",
              "description": "The amount of time to wait before check if a request is done",
              "default": 15000,
              "hints": ["hidden"],
              "maximum": 500000,
              "exclusiveMaximum": false,
              "minimum": 1000,
              "exclusiveMinimum": false,
              "multipleOf": 1
            },
            "fetchResponseScheduledTimeout": {
              "type": "number",
              "title": "Fetch response scheduled timeout(ms)",
              "description": "The maximum amount of time for a response to be scheduled. The task will be canceled if this setting is exceeded.",
              "default": 300000,
              "maximum": 500000,
              "exclusiveMaximum": false,
              "minimum": 1000,
              "exclusiveMinimum": false,
              "multipleOf": 1
            },
            "fetchResponseCompletedTimeout": {
              "type": "number",
              "title": "Fetch response completion timeout(ms)",
              "description": "The maximum amount of time for a response to be completed. If exceeded, the task will be retried if the job is still running",
              "default": 300000,
              "hints": ["hidden"],
              "maximum": 600000,
              "exclusiveMaximum": false,
              "minimum": 1,
              "exclusiveMinimum": false,
              "multipleOf": 1
            },
            "indexingInactivityTimeout": {
              "type": "number",
              "title": "Indexing inactivity timeout(seconds)",
              "description": "The maximum amount of time to wait for indexing results (in seconds). If exceeded, the job will fail with an indexing inactivity timeout.",
              "default": 86400,
              "maximum": 691200,
              "exclusiveMaximum": false,
              "minimum": 60,
              "exclusiveMinimum": false,
              "multipleOf": 1
            },
            "pluginInactivityTimeout": {
              "type": "number",
              "title": "Plugin inactivity timeout(seconds)",
              "description": "The maximum amount of time to wait for plugin activity (in seconds). If exceeded, the job will fail with a plugin inactivity timeout.",
              "default": 600,
              "maximum": 691200,
              "exclusiveMaximum": false,
              "minimum": 60,
              "exclusiveMinimum": false,
              "multipleOf": 1
            },
            "indexMetadata": {
              "type": "boolean",
              "title": "Index metadata",
              "description": "When enabled the metadata of skipped items will be indexed to the content collection.",
              "default": false
            },
            "indexContentFields": {
              "type": "boolean",
              "title": "Index content fields",
              "description": "When enabled, content fields will be indexed to the crawl-db collection.",
              "default": false
            },
            "asyncParsing": {
              "type": "boolean",
              "title": "Async Parsing",
              "description": "When enabled, content will be indexed asynchronously.",
              "default": false
            }
          }
        },
        "strayDeletionSettings": {
          "type": "object",
          "title": "Stray Content Deletion Settings",
          "description": "System level settings for controlling stray content deletion behavior",
          "required": [],
          "properties": {
            "enableStrayDeletion": {
              "type": "boolean",
              "title": "Enable Stray Deletion",
              "description": "When enabled, items not re-encountered in the current crawl are deleted from the content collection. Defaults to true.",
              "default": true
            },
            "circuitBreakerSettings": {
              "type": "object",
              "title": "Circuit Breaker Settings",
              "description": "Settings that control the circuit breaker, which prevents mass deletion when an unusually high percentage of items are identified as stray in a crawl.",
              "required": [],
              "properties": {
                "percentageThreshold": {
                  "type": "number",
                  "title": "Stray Deletion Threshold (%)",
                  "description": "Maximum percentage of indexed items that may be deleted as stray in a crawl. If the total stray item exceeds this percentage, the circuit breaker blocks the deletion to prevent accidental data loss. Accepts values from 0 to 100. Defaults to 80.",
                  "default": 80,
                  "maximum": 100,
                  "exclusiveMaximum": false,
                  "minimum": 0,
                  "exclusiveMinimum": false,
                  "multipleOf": 1
                },
                "enableCircuitBreaker": {
                  "type": "boolean",
                  "title": "Enable Circuit Breaker",
                  "description": "When enabled, stray deletion is blocked if the percentage of items to be deleted exceeds the configured threshold. Disable only if unconditional stray deletion is required regardless of volume. Defaults to true.",
                  "default": true
                }
              }
            }
          }
        },
        "skipConfigValidation": {
          "type": "boolean",
          "title": "Skip Validation",
          "description": "Enable to skip configuration validation when it takes too long and causes timeout issue",
          "default": false
        }
      },
      "hints": ["advanced"]
    }
  },
  "category": "FileSystem",
  "categoryPriority": 1
};

export const SchemaParamFields = ({schema}) => {
  const sanitize = str => {
    if (typeof str !== "string") return str;
    return str.replace(/^"(.*)"$/s, "$1").replace(/\\/g, "").replace(/"/g, "'");
  };
  const renderMd = str => {
    const s = sanitize(str);
    const text = (/[.!?]\)*$/).test(s) ? s : `${s}.`;
    return text.split(/(\*\*[^*]+\*\*|_[^_]+_|`[^`]+`)/g).map((part, i) => {
      if (part.startsWith("**")) return <strong key={i}>{part.slice(2, -2)}</strong>;
      if (part.startsWith("_")) return <em key={i}>{part.slice(1, -1)}</em>;
      if (part.startsWith("`")) return <code key={i}>{part.slice(1, -1)}</code>;
      return part;
    });
  };
  const {description, properties = {}, required: requiredProps = []} = schema;
  const visibleProps = useMemo(() => Object.entries(properties).filter(([, prop]) => !prop.hints?.includes("hidden")), [properties]);
  const renderProp = ([name, prop]) => {
    const isRequired = requiredProps.includes(name);
    const hasDefault = prop.default !== undefined;
    const rawDefault = prop.default;
    const hints = prop.hints || [];
    const isComplexDefault = hasDefault && (typeof rawDefault === "object" || typeof rawDefault === "string" && (rawDefault.length > 20 || rawDefault.includes('"')));
    const postBadges = [];
    if (prop.title) {
      postBadges.push(<><span className="text-stone-400 dark:text-stone-500">API property: </span>{name}</>);
    }
    const constraints = [];
    if (prop.minimum !== undefined && prop.maximum !== undefined) {
      constraints.push(`Range: ${prop.minimum} – ${prop.maximum}`);
    } else if (prop.minimum !== undefined) {
      constraints.push(`Min: ${prop.minimum}`);
    } else if (prop.maximum !== undefined) {
      constraints.push(`Max: ${prop.maximum}`);
    }
    if (prop.minLength !== undefined && prop.maxLength !== undefined) {
      constraints.push(`Length: ${prop.minLength} – ${prop.maxLength}`);
    } else if (prop.minLength !== undefined) {
      constraints.push(`Min length: ${prop.minLength}`);
    } else if (prop.maxLength !== undefined) {
      constraints.push(`Max length: ${prop.maxLength}`);
    }
    const fieldProps = {
      key: name,
      body: prop.title || name,
      type: prop.type,
      ...postBadges.length > 0 && ({
        post: postBadges
      }),
      ...isRequired && ({
        required: true
      }),
      ...!isComplexDefault && hasDefault ? {
        default: sanitize(String(rawDefault))
      } : {}
    };
    const isObject = prop.type === "object" && prop.properties;
    const isArrayOfObjects = prop.type === "array" && prop.items?.type === "object" && prop.items.properties;
    return <ParamField {...fieldProps}>
        {prop.description && <p>{renderMd(prop.description)}</p>}

        {prop.enum && <p>
            Allowed values: 
            {prop.enum.map((v, i) => <>{i > 0 && ", "}<code key={i}>{String(v)}</code></>)}
          </p>}

        {constraints.length > 0 && <p className="text-stone-500 dark:text-stone-400 text-sm">
            {constraints.join(" · ")}
          </p>}

        {isComplexDefault && <div className="flex">
            <p>
              <strong>Default:</strong>
            </p>
            <pre className="!my-0">
              <code>
                {JSON.stringify(rawDefault, null, 2)}
              </code>
            </pre>
          </div>}

        {isArrayOfObjects && <Expandable title="item properties">
            <SchemaParamFields schema={{
      properties: prop.items.properties,
      required: prop.items.required
    }} />
          </Expandable>}

        {isObject && <Expandable title="properties">
            <SchemaParamFields schema={{
      properties: prop.properties,
      required: prop.required
    }} />
          </Expandable>}
      </ParamField>;
  };
  return <div>
      {description && <p>{renderMd(description)}</p>}

      {visibleProps.map(renderProp)}
    </div>;
};

export const LwTemplate = ({title = "Key questions to get you started", icon = "sparkles", cta = "Powered by Agent Studio", linkHref = "https://lucidworks.com/demo/?utm_source=docs&utm_medium=referral&utm_campaign=docs_cta_ai"}) => {
  const [isLoaded, setIsLoaded] = useState(false);
  useEffect(() => {
    const timer = setTimeout(() => {
      setIsLoaded(true);
    }, 500);
    return () => clearTimeout(timer);
  }, []);
  return <div className="lw-template-container">
      <Card title={title} icon={icon}>
        {isLoaded && <span dangerouslySetInnerHTML={{
    __html: `<lw-template id="a029c1a9-28be-427e-b0e1-5d918920246a"></lw-template
            >`
  }} />}
        <Link href={linkHref} className="agent-studio-link text-left text-gray-600 gap-2 dark:text-gray-400 text-sm font-medium flex flex-row items-center hover:text-primary dark:hover:text-primary-light group-hover:text-primary group-hover:dark:text-primary-light">Powered by Lucidworks Agent Studio</Link>
      </Card>
    </div>;
};

[localhost link]: http://localhost:3000/docs/fusion-connectors/connectors/box.com-v2

[mintlify link]: https://doc.lucidworks.com/docs/fusion-connectors/connectors/box.com-v2

[old doc.lw link]: https://doc.lucidworks.com/fusion-connectors/3244

<Callout icon="plug" color="#A4C6F7" iconType="solid">
  * **Latest version:** v2.2.0
  * **Compatible with Fusion version:** 5.9.4 and later
</Callout>

To fetch content from multiple Box users, you must configure a Box.com datasource. For limited testing using a single user account, you can configure Box.com tokens.

<img src="https://mintcdn.com/lucidworks/Au994d8iJwF79HiU/assets/images/connectors/connector-api-flow-box.png?fit=max&auto=format&n=Au994d8iJwF79HiU&q=85&s=5b7a1dad638a1d7f259c928c8646b726" alt="Connector flow" width="4157" height="1915" data-path="assets/images/connectors/connector-api-flow-box.png" />

<LwTemplate />

## Prerequisites

Perform these prerequisites to ensure the connector can reliably access, crawl, and index your data.
Proper setup helps avoid configuration or permission errors, so use the following guidelines to keep your content available for discovery and search in Fusion.

Configure the Box app and authentication:

* To crawl multiple users' content, create a Box app configured for OAuth 2.0 with JWT.
* For single users, you may use a Box app with standard OAuth 2.0 credentials.

Confirm network connectivity:

* Fusion must be able to reach the Box APIs over HTTPS. If running the connector remotely, you also need to allow HTTP/2 (gRPC) egress from your network into your Fusion cluster.

Remote-connector setup if running as an on-prem process:

* A Fusion user with the `remote-connectors` or `admin` role for gRPC authentication.
* The `connector-plugin-standalone.jar` alongside the plugin ZIP on the remote host.
* A configured connector backend gRPC endpoint (`hostname:port`) in your YAML.
* If the remote host doesn't trust Fusion's TLS cert, point to a truststore file path in your config.

link:/how-to/ssl8ue/configure-remote-v-2-connectors\[Configure Remote V2 Connectors] provides complete instructions for remote connector setup.

## Authentication

Setting up the correct authentication according to your organization's data governance policies helps keep sensitive data secure while allowing authorized indexing.

The Box.com V2 connector supports two OAuth-based schemes:

* OAuth 2.0 for single-user access
* JWT service account for enterprise-wide crawling

After deciding which authentication type you require, read below to learn more about implementing it.

### Standard OAuth 2.0 user authentication for single-user testing

For limited or single account crawls, you can create a Box app with the standard OAuth 2.0 "User Authentication" flow.
See the [Box documentation](https://developer.box.com/guides/authentication/oauth2/oauth2-setup/) for additional guidance.

In Fusion, you then add the:

* API key using the Box client ID.
* API secret using the Box client secret.
* Refresh token as obtained through the OAuth consent flow.

Fusion will use these credentials to fetch and refresh an access token for the Box user.

## JWT server authentication for enterprise-wide crawls

To fetch content from multiple Box users, you must register a Box app and enable JWT authentication.
See the [Box documentation](https://developer.box.com/guides/authentication/jwt/jwt-setup/) for additional guidance.

In Fusion, you then add the following:

* `App Entity ID` using the Box app entity ID
* `Public Key ID` using the Box public key ID
* `Private Key (Base64)` using the Box private key in Base64
* `Private Key Password`
* `Encryption Algorithm`, such as `RSA_SHA_256`
* `Account Type` as either `USER` or `ENTERPRISE`

Fusion will use the JWT to obtain "As-User" tokens, allowing it to crawl data while respecting each user’s permissions and access rights.

<AccordionGroup>
  <Accordion title="Configure a Box.com datasource">
    The Box connector retrieves data from a Box.com cloud-based data repository.

    This topic applies to the Box.com V1 and Box.com V2 connectors. The Box.com V1 connector is available in Fusion 5.2 and earlier. The Box.com V2 connector is available in Fusion 5.3 and later.

    ## Configuration overview

    <Note>These steps are for a multi-user Box.com data repository. For limited testing using a single user account, you can create a Box app that uses Standard OAuth 2.0 authentication.</Note>

    Following is an overview of the steps required to set up Box and Fusion, and to crawl a Box data repository.

    1. Sign up for a Box developer account.

    2. Enable 2-step verification.

    3. Create a Box app that Fusion can use to crawl the Box files.

    4. Configure your app to use a Box service account.

    5. Install Fusion’s Box Connector.

    6. Create datasources in Fusion that use the Box connector.

    7. Crawl the Fusion datasources.

    ## Set Up Box

    Set up Box so that Fusion can crawl Box data repositories.

    ### Step 1: Sign Up for a Box Developer Account

    If you already have an account, proceed to Step 2: Enable 2-Step Verification.

    1. Open the [Box Developers Console](https://app.box.com/developers/console).
    2. In the top right corner, click **Sign Up**.
    3. Select an appropriate Platform Developer plan.
    4. Enter the requested information and click **Submit**.
    5. Open the confirmation email and click **Verify Email**.
    6. Log in to your Box account.

    ### Step 2: Enable 2-Step Verification

    1. Log in to your Box developer account.
       1. Open the [Box Developers Console](https://app.box.com/developers/console).
       2. Log in as the admin.
    2. <a name="Box-CreateCrawlAccount" /> Create the Box account that you want to use for crawling.
       1. Open the [Users page](https://app.box.com/master/users) in the Box admin console.
       2. Click **+Users** to create a new user account.
       3. Enter the Name and Email for the user, and then click **Add user**.
       4. Click the user you just created to enter its user settings.
       5. Make this user a [Co-Admin](https://support.box.com/hc/en-us/articles/360043694174-Understanding-Administrator-and-Co-Administrator-Permissions) by selecting Co-Admin checkbox. Once clicked, a pane titled "User is granted the following administrative privileges" appears. Select all of the following:

          * Manage users
          * Manage groups
          * View users' content
          * Log in to users' accounts
          * Run new reports and access existing reports

                <img src="https://mintcdn.com/lucidworks/9iE2X4O8aa8U8XL3/assets/images/common/BoxPermissions.png?fit=max&auto=format&n=9iE2X4O8aa8U8XL3&q=85&s=8cada4a2881da0051b220cce5f36f2c1" alt="accept screen for Box connector permissions" width="724" height="622" data-path="assets/images/common/BoxPermissions.png" />
       6. Click **Save**.
       7. Close the Admin Console browser tab.
    3. Enable 2-step verification for unrecognized logins:
       1. Open the [Account Settings](https://app.box.com/account) page. (You can reach this page from the drop-down menu under your initials.)
       2. On the **Account** tab, under **Authentication**, select **Require 2-step verification for unrecognized logins**.
       3. Choose your **Country** and enter a **Mobile Phone Number**, and then click **Continue**.
       4. Enter the verification code you receive, and then click **Continue**.
       5. If you are using a new mobile device, Box will send you a second code. Enter it, and then click **Submit**.
       6. Click **Save Changes**.

    ### Step 3: Create a Box App that Fusion Can Use to Crawl the Box files

    Create a Box app that uses OAuth 2.0 with JWT server authentication.

    If you already have an app, proceed to Step 4: Configure Your App to Use a Box Service Account.

    1. Open the [Box Developers Console](https://app.box.com/developers/console).
    2. Click **Create New App**.
    3. Select **Custom App**, and then click **Next**.
    4. Click **OAuth 2.0 with JWT (Server Authentication)**, and then click **Next**.
    5. Name your app, and then click **Create App**. The name must be globally unique across all apps created by all Box users.
    6. Click **View Your App**.

    ### Step 4: Configure Your App to Use a Box Service Account

    1. <a name="Box-Key-Creation" /> Use OpenSSL to create a private/public key pair:
       1. Install OpenSSL if you need to. Windows instructions are [here](http://gnuwin32.sourceforge.net/packages/openssl.htm).
       2. Open a Command Prompt window and run these commands to generate a private/public key pair:

          ```
          openssl genrsa -aes128 -out private_key.pem 2048
          ```

          Enter a password for the private key when prompted.

          ```
          openssl rsa -pubout -in private_key.pem -out public_key.pem
          ```

          In the current directory of the Command Prompt, you now have private and public key files, `private_key.pem` and `public_key.pem` respectively.
    2. Open the [Box Developers Console](https://app.box.com/developers/console), log in as Admin if you are asked to log in, and click your app.
    3. <a name="Box-ConfigureApp-Step3" /> In the left navigation menu, click **Configuration**.
    4. Configure scopes and advanced features:

       1. Under **Application Access**, select **Enterprise**.
       2. Under **Application Scopes**, deselect **Manage groups**.
       3. Under **Advanced Features**, enable **Generate User Access Tokens** and **Perform Actions as Users**.
       4. Click **Save Changes**.
    5. <a name="Box-ConfigureApp-AddPublicKey" /> In the **Add and Manage Public Keys** area, click **Add a Public Key** and paste the contents of the `public_key.pem` file (generated from
       Step 4: Configure Your App to Use a Box Service Account) into the text box.
       1. Make a note of the new **Public Key ID** that you just created.
    6. <a name="Box-ConfigureApp-Step6" /> Under **OAuth 2.0 Credentials**, click **COPY** for the Client ID.
    7. Authorize your app:

       1. Open the [Box Admin Console](https://app.box.com/master).
       2. In the left navigation menu, click **Settings** > **Enterprise Settings** (or **Business Settings**) > **Apps**.
       3. Under **Custom Applications**, click **Authorize New App**.
       4. In the **API Key** box, paste the Client ID credential you copied in Step 6, and then click **Next**.
       5. Read the App Authorization dialog and click **Authorize**.
       6. Close the Admin Console browser tab.

       <Note>   If you change your app’s configuration later, you must repeat this step to re-authorize your app.</Note>
    8. Close the Dev Console browser tab.

    ## Set Up Fusion

    Set up Fusion to crawl Box data repositories.

    ### Step 5: Install Fusion’s Box Connector

    1. Navigate to the [Fusion 4.x Connector Downloads](/docs/fusion-connectors/downloads/fusion-4-x-connector-downloads)
    2. Select the Box connector link for the release to download. The .zip file is downloaded.
    3. Do not unzip the file.
    4. Open the Fusion UI and click **System** > **Blobs**.
    5. Click **Add**.
    6. Select **Connector Plugin**.
    7. Click **Choose File**, select the file, and then click **Open**.
    8. Click **Upload**.

    ### Step 6: Create Datasources

    Create datasources that use the Box connector to access the Box data repository.

    For each datasource:

    1. In the Fusion UI, Navigate to **Indexing** > **Datasources**.
    2. Click **Add**.
    3. Select **Box.com**.
    4. Fill in the form. Note the following regarding configuration settings to use:

       |                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
       | ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
       | Setting                                   | Notes                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
       | Start Links                               | Each start link defined for the datasource must consist of a numeric Box file ID or directory ID. The root directory of any Box account has ID 0 (zero). To crawl your entire Box repository, enter '0'. These images indicate with underlines where you can get a folder ID or file ID. Select a folder or file at [Box.com](https://account.box.com/login?). Folder ID: <img src="https://mintcdn.com/lucidworks/2n5qtVSsU54oMlB1/assets/images/3.1/box-folder-ID.png?fit=max&auto=format&n=2n5qtVSsU54oMlB1&q=85&s=b8441a7103d5a4d1016c9dcf87b17715" alt="Folder ID" width="735" height="74" data-path="assets/images/3.1/box-folder-ID.png" /> Enter the start link `34192617287`. File ID: <img src="https://mintcdn.com/lucidworks/2n5qtVSsU54oMlB1/assets/images/3.1/box-file-ID.png?fit=max&auto=format&n=2n5qtVSsU54oMlB1&q=85&s=2d4aec2cbf6002350967f24e44edf537" alt="File ID" width="721" height="76" data-path="assets/images/3.1/box-file-ID.png" /> Enter the start link `204871656422`: |
       | API Key                                   | In the [Box Developers Console](https://app.box.com/developers/console), select the app. On the **Configuration** tab under **OAuth 2.0 Credentials**, use the **Client ID**.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
       | API Secret                                | In the [Box Developers Console](https://app.box.com/developers/console), select the app. On the **Configuration** tab under **OAuth 2.0 Credentials**, use the **Client Secret**.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
       | JWT App User ID                           | Email address that you use to sign in to your Box co-admin account. Use the Co-admin account you created in Step 4.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
       | JWT Public Key Id                         | In the [Box Developers Console](https://app.box.com/developers/console), select the app. On the **Configuration** tab, under **Add and Manage Public Keys**, use the **ID** for a public key.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
       | JWT Private Key                           | Base64-encoded contents of the private-key file that matches your JWT Public Key Id. Base64 encode the *entire* contents of the file, including the first and last lines. *(Fusion 5.0+ only.)*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
       | JWT Private Key File                      | Full path to the private-key file you created that matches your JWT Public Key Id.  *(Prior to Fusion 5.0 only.)*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
       | JWT Private Key Password                  | Passphrase for the private key (from the private-key file you created in Step 4).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
       | Distributed crawl collection name         | Collection that contains the pre-fetch index.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
       | Box.com children responses per page       | Use the default value of 1000.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
       | Nested folder depth limit                 | Generally, you want a number that will crawl all documents, so keep the default value. For testing, you could reduce the number substantially to speed up the crawl.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
       | Number of partition buckets               | Divide the number of files by 5000. Use that number or 10000, whichever is smaller.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
       | Number distributed crawl datasources      | Use 1 to 27.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
       | Number of pre-fetch index creator threads | A number between 2 and 5. Use 2 for small datasources and 5 for huge datasources (over 10 million files).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
    5. Click **Save**.

    ## Crawl a Box Data Repository

    Crawl a Box data repository.

    ### Step 7: Crawl the Fusion Datasources

    Crawl the datasources, which use Fusion’s Box connector to access the Box data repository. Fusion’s Box connector uses the pre-fetch index to fetch the contents of each file from Box.com, get metadata from both the distributed index and Box.com, and index the documents through Fusion’s index pipeline.

    You can:

    * **Run the crawl now.**

      1. From the Fusion launcher, click **Search** > **Home** > **Datasources**.
      2. Click the datasource.
      3. Click **Start Crawl**.
    * **Schedule the crawl** (For Fusion 4.2 through 5.5):

      1. From the Fusion launcher, click **Devops** > **Home** > **Scheduler**.
      2. Click the row for the job that corresponds to the datasource.
      3. Specify schedule information, and then click **Save**.
  </Accordion>

  <Accordion title="Configure Box.com tokens">
    This topic explains how to configure Box.com authorization, access, and refresh tokens. The information applies to the Box.com V1 and Box.com V2 connectors. The Box.com V1 connector is available in Fusion 5.2 and earlier. The Box.com V2 connector is available in Fusion 5.3 and later.

    Fusion supports two methods of authentication with the Box API:

    * JSON Web Token (JWT)
    * OAuth2

    ## Box App Users Using JWT

    Box.com has rather recently released a [Box Developer Edition](https://www.box.com/blog/box-developer-edition/). The Box Developer Edition lets a user access an application without having to create their own Box account.

    App Auth uses the [JSON Web Token (JWT)](https://docs.box.com/docs/app-auth) authentication architecture to establish a trusted connection with Box, allowing an application to provision and manage a Box account while minimizing the number of logins for a user and authentication services to manage.

    For this option, Fusion needs the inputs below to crawl your Box data.

    Required options are highlighted.

    |                                                               |                                                                                                              |
    | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
    | UI Label,<br /> API Name                                      | Description                                                                                                  |
    | JWT App User ID<br /> `f.fs.appUserId`                        | The Developer Edition API App User ID that you want to crawl as.                                             |
    | JWT Public Key ID<br /> `f.fs.publicKeyId`                    | The public key prefix registered in Box Auth that you want to use to authenticate with.                      |
    | JWT Private Key<br /> `f.fs.privateKeyBase64`                 | Base64-encoded JWT private key for the app user you want to authenticate as. *(Fusion 5.0+ only.)*           |
    | JWT Private Key File Path<br /> `f.fs.privateKeyFile`         | Path to the JWT private key file for the app user you want to authenticate as. *(Prior to Fusion 5.0 only.)* |
    | JWT Private Key File Password<br /> `f.fs.privateKeyPassword` | The password that secures the public key.                                                                    |

    <Tip>The biggest advantage to using the JWT App Auth Users approach is that you do not have to generate new refresh tokens. The public/private key file combination remain valid indefinitely.</Tip>

    ## Authentication Using OAuth 2.0

    For limited testing using a single user account, you can create a Box app that uses Standard OAuth 2.0 authentication.

    1. Log in to your Box developer account as the Admin.
       1. Open the [Box Developers web portal](https://developer.box.com/).
       2. In the top right corner, click **Log In**.
    2. Open the page for creating a new app and click **Create New App**.
    3. Click **Custom App**, and then click **Next**.
    4. Click **Standard OAuth 2.0 (User Authentication)**, and then click **Next**.
    5. Name your app, and then click **Create App**. The name must be globally unique across all apps created by all Box users.
    6. Click **View Your App**.
    7. On the Configuration page:
       1. Click the Authentication Method **Standard OAuth 2.0 (User Authentication)**.
       2. Set the **Redirect URI** to `http://localhost` or `http://0.0.0.0`. This address is not used by Fusion, but cannot be left blank.
       3. Click **Save Changes**.
  </Accordion>
</AccordionGroup>

## Security trimming

<Tip>
  **Important**

  The v2.2.0 version of this connector is only compatible with Fusion 5.9.4 and later when using security trimming. The v2.2.0 connector version uses [Graph Security Trimming](/docs/5/fusion/reference/config-ref/pipeline-stages/query-stages/security-trimming-graph-query-stage) and not regular security trimming. It is imperative to treat this as a new connector, as configurations do not transfer over due to disparities between newer versions and previous ones. A full crawl is mandatory.
</Tip>

The Box V2 connector supports graph security trimming. If you are using Fusion 5.18.0 or later, you can use separate collections to store your content and your ACLs. Use a separate sidecar collection if you need to manage ACL data independently of the rest of your content.

To use a sidecar collection for your ACLs, you must create the ACL collection before configuring your datasource to read from this collection.

To enable graph security trimming for your datasource:

1. Navigate to **Indexing > Datasources**.
2. Open your datasource.
3. Under **Graph Security Filtering Configuration**, select **Enable security trimming**.
4. If you are using a sidecar collection in Fusion 5.18.0 or later, set **ACL Collection ID** to your ACL collection name (for example, `acl_collection`).
5. Save your changes.

After configuring your datasource, you must reference the ACL collection in the [Graph Security Trimming stage](/docs/5/fusion/reference/config-ref/pipeline-stages/query-stages/security-trimming-graph-query-stage).

<Note>
  If you are transitioning from using the same collection to creating a sidecar collection for ACLs, you must run a full recrawl of your datasource so the ACLs route to the sidecar collection. ACL documents stored in the content collection from before the migration remain in the content collection unless the collection is reindexed or manually cleaned.
</Note>

## Remote connectors

V2 connectors support [running remotely](/docs/fusion-connectors/developers/remote-v2-connectors) in Fusion versions 5.7.1 and later.

<Accordion title="Configure remote V2 connectors">
  If you need to index data from behind a firewall, you can configure a V2 connector to run remotely on-premises using TLS-enabled gRPC.

  ## Prerequisites

  Before you can set up an on-prem V2 connector, you must configure the egress from your network to allow HTTP/2 communication into the Fusion cloud. You can use a [forward proxy server](#egress-and-proxy-server-configuration) to act as an intermediary between the connector and Fusion.

  The following is required to run V2 connectors remotely:

  * The [plugin zip file and the connector-plugin-standalone JAR](https://plugins.lucidworks.com/).
  * A configured connector backend gRPC endpoint.
  * Username and password of a user with a `remote-connectors` or `admin` role.
  * If the host where the remote connector is running is not configured to trust the server’s TLS certificate, you must configure the file path of the trust certificate collection.

  <Note>If your version of Fusion doesn’t have the `remote-connectors` role by default, you can create one. No API or UI permissions are required for the role.</Note>

  ## Connector compatibility

  Only V2 connectors are able to run remotely on-premises.
  You also need the remote connector client JAR file that matches your Fusion version.
  You can download the latest files at [V2 Connectors Downloads](/docs/fusion-connectors/downloads/v2-connectors-downloads).

  <Note>Whenever you upgrade Fusion, you must also update your remote connectors to match the new version of Fusion.</Note>

  The gRPC connector backend is not supported in Fusion environments deployed on AWS.

  ## System requirements

  The following is required for the on-prem host of the remote connector:

  * (Fusion 5.9.0-5.9.10) JVM version 11
  * (Fusion 5.9.11) JVM version 17
  * Minimum of 2 CPUs
  * 4GB Memory

  Note that memory requirements depend on the number and size of ingested documents.

  ## Enable backend ingress

  In your `values.yaml` file, configure this section as needed:

  ```yaml theme={"dark"}
  ingress:
    enabled: false
    pathtype: "Prefix"
    path: "/"
    #host: "ingress.example.com"
    ingressClassName: "nginx"   # Fusion 5.9.6 only
    tls:
      enabled: false
      certificateArn: ""
      # Enable the annotations field to override the default annotations
      #annotations: ""
  ```

  * Set `enabled` to `true` to enable the backend ingress.
  * Set `pathtype` to `Prefix` or `Exact`.
  * Set `path` to the path where the backend will be available.
  * Set `host` to the host where the backend will be available.
  * In Fusion 5.9.6 *only*, you can set `ingressClassName` to one of the following:
    * `nginx` for Nginx Ingress Controller
    * `alb` for AWS Application Load Balancer (ALB)
  * Configure TLS and certificates according to your CA’s procedures and policies.

    <Note>  TLS must be enabled in order to use AWS ALB for ingress.</Note>

  ## Connector configuration example

  ```yaml theme={"dark"}
  kafka-bridge:
    target: mynamespace-connectors-backend.lucidworkstest.com:443 # mandatory
    plain-text: false # optional, false by default.  
      proxy-server: # optional - needed when a forward proxy server is used to provide outbound access to the standalone connector
      host: host
      port: some-port
      user: user # optional
      password: password # optional
    trust: # optional - needed when the client's system doesn't trust the server's certificate
      cert-collection-filepath: path1

  proxy: # mandatory fusion-proxy
    user: admin
    password: password123
    url: https://fusiontest.com/ # needed only when the connector plugin requires blob store access

  plugin: # mandatory
    path: ./fs.zip
    type: #optional - the suffix is added to the connector id
      suffix: remote
  ```

  ### Minimal example

  ```yaml theme={"dark"}
  kafka-bridge:
    target: mynamespace-connectors-backend.lucidworkstest.com:443

  proxy:
    user: admin
    password: "password123"

  plugin:
    path: ./testplugin.zip
  ```

  ### Logback XML configuration file example

  ```xml theme={"dark"}
  <configuration>
      <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
          <encoder class="com.lucidworks.logging.logback.classic.LucidworksPatternLayoutEncoder">
              <pattern>%d - %-5p [%t:%C{3.}@%L] - %m{nolookups}%n</pattern>
              <charset>utf8</charset>
          </encoder>
      </appender>

      <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
          <file>${LOGDIR:-.}/connector.log</file>
          <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
              <!-- rollover daily -->
              <fileNamePattern>${LOGDIR:-.}/connector-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
              <maxFileSize>50MB</maxFileSize>
              <totalSizeCap>10GB</totalSizeCap>
          </rollingPolicy>
          <encoder class="com.lucidworks.logging.logback.classic.LucidworksPatternLayoutEncoder">
              <pattern>%d - %-5p [%t:%C{3.}@%L] - %m{nolookups}%n</pattern>
              <charset>utf8</charset>
          </encoder>
      </appender>

      <root level="INFO">
          <appender-ref ref="CONSOLE"/>
          <appender-ref ref="FILE"/>
      </root>
  </configuration>
  ```

  ## Run the remote connector

  ```java theme={"dark"}
  java [-Dlogging.config=[LOGBACK_XML_FILE]] \
    -jar connector-plugin-client-standalone.jar [YAML_CONFIG_FILE]
  ```

  The `logging.config` property is optional. If not set, logging messages are sent to the console.

  ## Test communication

  You can run the connector in communication testing mode. This mode tests the communication with the backend without running the plugin, reports the result, and exits.

  ```java theme={"dark"}
  java -Dstandalone.connector.connectivity.test=true -jar connector-plugin-client-standalone.jar [YAML_CONFIG_FILE]
  ```

  ## Encryption

  In a deployment, communication to the connector’s backend server is encrypted using TLS. You should only run this configuration without TLS in a testing scenario. To disable TLS, set `plain-text` to `true`.

  ## Egress and proxy server configuration

  One of the methods you can use to allow outbound communication from behind a firewall is a proxy server. You can configure a proxy server to allow certain communication traffic while blocking unauthorized communication. If you use a proxy server at the site where the connector is running, you must configure the following properties:

  * **Host.** The hosts where the proxy server is running.
  * **Port.** The port the proxy server is listening to for communication requests.
  * **Credentials.** Optional proxy server user and password.

  When you configure egress, it is important to disable any connection or activity timeouts because the connector uses long running gRPC calls.

  ## Password encryption

  If you use a login name and password in your configuration, run the following utility to encrypt the password:

  1. Enter a user name and password in the [connector configuration YAML](#configuration).

  2. Run the standalone JAR with this property:

     ```java theme={"dark"}
     -Dstandalone.connector.encrypt.password=true
     ```

  3. Retrieve the encrypted passwords from the log that is created.

  4. Replace the clear password in the configuration YAML with the encrypted password.

  ## Connector restart (5.7 and earlier)

  The connector will shut down automatically whenever the connection to the server is disrupted, to prevent it from getting into a bad state. Communication disruption can happen, for example, when the server running in the `connectors-backend` pod shuts down and is replaced by a new pod. Once the connector shuts down, connector configuration and job execution are disabled. To prevent that from happening, you should restart the connector as soon as possible.

  You can use Linux scripts and utilities to restart the connector automatically, such as [Monit](https://mmonit.com/monit/).

  ## Recoverable bridge (5.8 and later)

  If communication to the remote connector is disrupted, the connector will try to recover communication and gRPC calls. By default, six attempts will be made to recover each gRPC call. The number of attempts can be configured with the `max-grpc-retries` bridge parameters.

  ## Job expiration duration (5.9.5 only)

  The timeout value for irresponsive backend jobs can be configured with the `job-expiration-duration-seconds` parameter. The default value is `120` seconds.

  ## Use the remote connector

  Once the connector is running, it is available in the Datasources dropdown. If the standalone connector terminates, it disappears from the list of available connectors. Once it is re-run, it is available again and configured connector instances will not get lost.

  ## Enable asynchronous parsing (5.9 and later)

  To separate document crawling from document parsing, enable Tika Asynchronous Parsing on remote V2 connectors.
</Accordion>

Below is an example configuration showing how to specify the file system to index under the `connector-plugins` entry in your `values.yaml` file:

```yaml wrap  theme={"dark"}
additionalVolumes:
- name: fusion-data1-pvc
    persistentVolumeClaim:
    claimName: fusion-data1-pvc
- name: fusion-data2-pvc
    persistentVolumeClaim:
    claimName: fusion-data2-pvc
additionalVolumeMounts:
- name: fusion-data1-pvc
    mountPath: "/connector/data1"
- name: fusion-data2-pvc
    mountPath: "/connector/data2"
```

You may also need to specify the user that is authorized to access the file system, as in this example:

```yaml wrap  theme={"dark"}
securityContext:
    fsGroup: 1002100000
    runAsUser: 1002100000
```

## Configuration

<Tip>
  When entering configuration values in the UI, use *unescaped* characters, such as `\t` for the tab character. When entering configuration values in the API, use *escaped* characters, such as `\\t` for the tab character.
</Tip>

<SchemaParamFields schema={schema} />
