Applies to v1.3.18

AISI — storage connections

A storage connection tells AISI where documents live and how to sign in there: an SFTP or FTP server, a OneDrive or SharePoint library, a Google Drive, or an S3 bucket. A connection holds an address and the secrets it binds, nothing more. Which folder is indexed, and into which index, is decided by a sync. This page covers what each kind of storage needs before you start, every field of the connection form, and what Test, Browse, health, disabling and deleting do. Roles, credentials and network access in general are in AISI — security and governance. Push and queue notifications are in AISI — push and queue notifications.


1. Before you start

  • Roles. Every action on this page needs AISI Manage configuration (AISI_MANAGE): creating, editing, testing, browsing, enabling, disabling and deleting a connection. AISI Read (AISI_READ) can view connections and their settings. Every other action is shown disabled, with the missing role named. See Roles.
  • Secrets go in the Secret Store first. A connection never takes a password, key or token directly. Create each secret in the platform Secret Store, then bind it to the connection by name. See Credentials.
  • Hosts go on the Outbound Allowlist first. Every host a connection reaches must be on the tenant's Outbound Allowlist, or it is refused with HOST_NOT_ALLOWED before anything is sent. The hosts per storage are listed in Network access.
  • Two places reach the storage. The Jobs Worker reads documents. The Portal API runs Test and Browse. Both need network access to the storage.
  • Grant read access only. AISI never writes to storage. Give each account read access to what it should index, and nothing else.

2. Adding a connection

AISI → Storage connections → New connection opens the wizard Add a storage connection on its own page, with its steps listed beside it and a running summary of what you have entered. It has five steps:

Step What you enter
Provider Tenant (only when working across tenants), Provider, Name and Description
Settings the provider's settings, described per provider below
Credentials one secret per credential the provider needs, chosen from the Secret Store by name
Test Save and test saves the connection and opens it once, as a sync will
Review what was saved
  • The name must be unique within the tenant.
  • The provider is fixed once the connection is saved. To change it, create another connection.
  • Settings that do not apply are hidden. For example, Pinned certificate appears only for encrypted FTP. A value for a setting or secret that does not apply is not stored.
  • The connection is saved at the Test step, whether or not the test succeeds. The wizard moves on only after a successful test. If you leave it before then, select the connection in the grid, choose Open connection and fix it on the connection's page.
  • Going back and changing a setting turns the button into Save changes and test again.

Done ends the wizard with Connection added. Create a sync to start indexing from it. and opens the connection's page.

The Provider list shows the providers this deployment offers, with how each one detects changes:

Provider Reads Change detection
SFTP a directory on an SFTP server polling
FTP / FTPS a directory on an FTP server, over TLS by default polling
OneDrive / SharePoint one OneDrive or one SharePoint document library, through Microsoft Graph polling, or push
Google Drive one shared drive, or one user's My Drive polling, or push
S3 / S3-compatible one bucket on AWS S3 or an S3-compatible service such as MinIO polling, queue (AWS SQS) or push (MinIO)

3. Local and mounted folders

AISI does not index folders on the platform's own disks, and that includes a network share mounted into its containers. Every storage connection reaches its storage over a network protocol, with its own sign-in, credentials bound from the tenant's Secret Store and a host on the tenant's outbound allowlist. A folder mounted on the platform's hosts has none of that: its access is whatever the mount grants, and it would be within reach of every tenant of the installation.

To index the documents on a file server, publish the folder over SFTP or FTPS (section 4 or 5), or move them to a SharePoint library, a Google shared drive or an S3 bucket.


4. SFTP

Prerequisites:

  • An account on the server that may read the directory to index.
  • The server's SHA-256 host-key fingerprint, from the server's administrator, to compare with what Test shows.
  • The server's host on the Outbound Allowlist.
Field Required Meaning
Host yes The server's host name or IP address
Port yes 22 by default
Username yes The login, up to 128 characters
Root directory no An absolute directory on the server, such as /exports/documents. Empty for the login directory
Pinned host key no The server's SHA-256 host-key fingerprint, as ssh-keygen -l prints it: SHA256: followed by the key's hash
Secret Required Holds
Password one of the two the account's password
Private key one of the two an OpenSSH or PEM private key
Private key passphrase no the key's passphrase, only when the key is encrypted

Bind a password, a private key, or both. The server decides which it accepts.

The host key is always pinned. Nothing, not even the login, is sent to a server whose key is not the pinned one. A new connection therefore has no pin and its first test fails with HOST_KEY_MISMATCH, showing the key the server presented. Compare it with the fingerprint from the server's administrator, then choose Trust and test again (see §9).


5. FTP / FTPS

Prerequisites:

  • An account on the server that may read the directory to index.
  • TLS on the server. Plain FTP is refused unless the deployment sets AISI__FTP__ALLOWPLAINFTP (see Network access).
  • For a server with a self-signed certificate, its SHA-256 thumbprint, from the server's administrator.
  • The server's host on the Outbound Allowlist.
Field Required Meaning
Host yes The server's host name or IP address
Port yes 21 by default: 21 for explicit FTPS and plain FTP, usually 990 for implicit FTPS
Username yes The login, up to 128 characters
Root directory no An absolute directory on the server. Empty for the login directory
Encryption yes Explicit (the default), Implicit, or None for plain FTP
Pinned certificate no Only with Explicit or Implicit. The SHA-256 thumbprint of a self-signed certificate to trust: 64 hexadecimal digits, colons allowed. Leave it empty when the certificate validates
Secret Required Holds
Password yes the account's password
  • Plain FTP is labelled. Choosing None shows Plain FTP: the password and every document cross the network unencrypted. beside the field, and the connection carries a Warning badge in the grid.
  • A certificate must validate or be pinned. One that does neither fails with HOST_KEY_MISMATCH, and Test shows its thumbprint so that you can pin it (see §9).
  • Servers without MLSD still work. Test then reports that listings are parsed from LIST, whose times may be coarse, so a change within the same minute can be missed.

6. OneDrive / SharePoint

A connection reads one drive: a user's OneDrive or one SharePoint document library. It signs in as an application, never as a user.

Prerequisites in Microsoft Entra ID:

  1. Register an application in the directory that owns the drive.

  2. Grant it a Microsoft Graph application permission, and have an administrator consent to it:

    • Files.Read.All, to read every drive in the directory; or
    • Sites.Selected, with read access granted to the drive's site only.

    Push notifications need Files.Read.All. A connection granted only Sites.Selected polls.

  3. Give it a credential: a client secret, or a certificate whose public part you upload to the registration.

  4. Find the drive ID as Microsoft Graph reports it. It starts with b!.

  5. Approve the hosts on the Outbound Allowlist: the sign-in host, the Graph host, and the SharePoint and OneDrive hosts files download from. A refused download names the host to add.

Field Required Meaning
Cloud yes Global (the default), UsGovernment, UsGovernmentDoD or China
Directory (tenant) ID yes The Microsoft Entra tenant ID, or one of its verified domains
Application (client) ID yes The app registration's client ID
Authentication yes ClientSecret (the default) or Certificate
Drive ID yes The OneDrive or document library's drive ID, such as b!Xy…
Secret Applies to Required Holds
Client secret ClientSecret yes the app registration's client secret value
Certificate (PFX, base64) Certificate yes the PFX file with its private key, base64-encoded
Certificate password Certificate no the PFX's password, only when it has one

The cloud decides which hosts the connection reaches:

Cloud Sign-in host Graph host
Global login.microsoftonline.com graph.microsoft.com
UsGovernment login.microsoftonline.us graph.microsoft.us
UsGovernmentDoD login.microsoftonline.us dod-graph.microsoft.us
China login.chinacloudapi.cn microsoftgraph.chinacloudapi.cn
  • A missing permission is named. A refusal from Graph says which permission to grant.

7. Google Drive

A connection reads one drive: a shared drive, or one user's My Drive. It signs in as a Google Cloud service account, with the read-only scope https://www.googleapis.com/auth/drive.readonly and nothing more.

Prerequisites in Google Cloud and Google Workspace:

  1. Create a service account in a Google Cloud project, and enable the Google Drive API in that project.
  2. Create a JSON key for it, and store the key file, as downloaded, in the Secret Store.
  3. Give it access to the drive:
    • A shared drive: add the service account to the shared drive as a member. Viewer is enough.
    • A user's My Drive: in the Google Workspace admin console, authorize the service account's client ID for domain-wide delegation with the scope https://www.googleapis.com/auth/drive.readonly. Name the user in Impersonated user.
  4. Approve the hosts oauth2.googleapis.com and www.googleapis.com on the Outbound Allowlist.
Field Required Meaning
Shared drive ID no The shared drive's ID, from its address in Google Drive, such as 0AbCdEfGhIjKlUk9PVA. Empty for a My Drive
Impersonated user no With domain-wide delegation, the user whose access the service account uses, such as records@example.com. Empty to use the service account's own access
Secret Required Holds
Service account key (JSON) yes the JSON key file Google Cloud issued for the service account, as downloaded
  • Leaving both fields empty reads the service account's own My Drive.
  • The key file cannot redirect AISI. The token address written in the key is never used.
  • Google Docs and Sheets are exported as DOCX and XLSX and indexed as such. Google Slides are not supported, so they are left out. Forms, drawings, sites and shortcuts are not offered.

8. S3 and S3-compatible storage

A connection reads one bucket, on AWS S3 or an S3-compatible service such as MinIO. A sync's folder is a key prefix in that bucket.

Prerequisites:

  1. Create an access key for an identity allowed to read the bucket. Access keys are the only credentials AISI accepts: IAM roles and instance profiles are not used.

  2. Grant it these actions and nothing more:

    Action On Used to
    s3:ListBucket the bucket list folders and objects
    s3:GetObject the bucket's objects read an object and look up its version
    sqs:GetQueueAttributes, sqs:ReceiveMessage, sqs:DeleteMessage the sync's queue Queue notifications only

    For example, on AWS:

    {
      "Version": "2012-10-17",
      "Statement": [
        { "Effect": "Allow", "Action": "s3:ListBucket", "Resource": "arn:aws:s3:::contoso-documents" },
        { "Effect": "Allow", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::contoso-documents/*" }
      ]
    }
    

    A policy that allows s3:ListBucket only under a prefix (an s3:prefix condition) works too: name that prefix as the connection's Key prefix. Test then lists the prefix instead of the top of the bucket, the folder picker starts there, and every sync's folder must lie within it.

  3. Approve the host on the Outbound Allowlist. Requests go to one host:

    Addressing Host
    AWS, virtual-hosted (the default) {bucket}.s3.{region}.amazonaws.com
    AWS, path-style, or a bucket name containing a dot s3.{region}.amazonaws.com
    S3-compatible, path-style the Endpoint's host
    S3-compatible, virtual-hosted {bucket}. followed by the Endpoint's host
Field Required Meaning
Endpoint no Empty for AWS S3. For an S3-compatible service, its base URL without a path, such as https://s3.example.com
Region yes The region requests are signed for, such as eu-west-1. us-east-1 by default; S3-compatible services usually accept it
Bucket yes The bucket's name: 3 to 63 lower-case letters, digits, dots and hyphens
Path-style addressing no Off by default. Names the bucket in the URL path rather than the host name. Most S3-compatible services need it
Require TLS no On by default. Refuses an endpoint, or a sync's queue, that is not HTTPS. Turn it off only for a service on a trusted network
Key prefix no Empty for the whole bucket. For an access key confined to part of the bucket, the folder (key prefix) it may list, such as teams/legal. Test lists it, and a sync's folder must lie within it
Secret Required Holds
Access key ID yes the access key's ID
Secret access key yes the access key's secret
Webhook token no for Push from MinIO only: the auth_token of the bucket's webhook targets, at least 16 characters without spaces
  • No redirect is followed, so a signed request never leaves for another host.
  • Notifications are set up at the storage service. An SQS queue on AWS, or a webhook target on MinIO, is configured by you, not by AISI. What each storage needs has the steps.

9. Testing a connection

Test connection, on the connection's summary panel or at the top of its page, or Save and test in the wizard, opens the connection once, the way a sync does, and reads only what proves access. It must answer within 30 seconds, or it fails with TIMEOUT.

Provider A successful test means
SFTP, FTP / FTPS The server is reachable, accepted the login, and the root directory is readable.
OneDrive / SharePoint Microsoft Entra ID issued a token and the drive can be read.
Google Drive Google issued a token for the service account and the drive can be read.
S3 / S3-compatible The bucket is reachable, accepted the access key, and can be listed, or, with a Key prefix, … and its prefix teams/legal can be listed.

The result stays in the summary panel, or at the top of the connection's page, until you dismiss it. It shows reachable or not reachable, the failure's classification, the message, details such as the host, the drive's name or the number of entries found (counted up to 1,000), and how long the storage took to answer. It never shows a secret. Each classification's remedy is in When documents fail.

Trusting a server identity. When an SFTP server presents a host key that is not pinned, or an FTPS server a certificate that neither validates nor is pinned, the result shows the key's fingerprint or the certificate's thumbprint in full.

  1. Compare it, character by character, with the value the server's administrator gives you over a channel you already trust.
  2. Choose Trust and test again. The value is saved as Pinned host key or Pinned certificate, and the connection is tested again.

If another value is already pinned, the button reads Replace the pinned identity… and asks for a second confirmation. A rotated key and a server impersonated look the same until the administrator confirms the new value.


10. Browsing folders

AISI can list a connection's folders one level at a time, so that a sync's folder can be picked rather than typed. It needs AISI Manage configuration. In the sync wizard's Scope step, and on the Name & scope tab of the sync's page, Browse folders… opens it: walk the tree and choose Use this folder. Typing the folder into the Folder field works too.

  • Folders only. No file, and no file name, is listed.
  • At most 500 folders are shown per level.
  • It must answer within 30 seconds. Otherwise it reports The storage did not answer in time. Test the connection and try again.

11. Health, enabling and disabling

The grid shows each connection's health (Healthy, Degraded, Unhealthy, or Unknown before the first probe), when it was last probed, a Disabled badge, and a Throttled badge while the storage has asked AISI to slow down. Health is recorded by Test, by the aisi-connection-health job every 15 minutes (AISI__CHANGETRACKING__HEALTHPROBEINTERVAL), and whenever a sync or a document fails because of the connection. In the Portal explains each state.

Disable connection, on the connection's summary panel or its page, stops everything that reads through it, without changing any configuration:

  • its syncs stop checking for changes;
  • its queued documents wait;
  • the health job no longer probes it;
  • a new sync cannot be created on it;
  • documents already indexed stay in their index.

Enable connection resumes all of it.


12. Editing and deleting

To edit a connection, select it in the grid and choose Open connection, or double-click its row. Its page has three tabs: Overview (name and description), Settings and Credentials. Save changes in the save bar saves all three together, in one request: settings and secrets either both change or neither does. A secret the new settings no longer use is unbound. Saving also makes the connection's push and queue syncs check their notifications again at once.

Delete connection, on the summary panel or the connection's page, is refused while any sync uses the connection. The button is disabled and says Used by N syncs. Delete them first; their documents leave the index as they go. Delete the syncs first, choosing for each whether its documents are removed from the index or kept there (Deleting a sync). A deleted sync still counts until the worker has finished tearing it down.

Deleting removes the connection only. Its secrets stay in the Secret Store. Delete them there if nothing else uses them.