Lecteurs connectés en auto-hébergement
On Ivy cloud, connected drives use Spaciv’s Microsoft app and Google service account. When you run Ivy yourself, you register your own, give the chart their credentials, and then follow the same admin steps as on Ivy cloud (Microsoft 365, Google Drive). Your files then never pass through Spaciv.
Connected drives use only your organisation’s app access: nobody signs in to Microsoft or Google for Ivy, so there are no delegated permissions or user consent screens to set up, and Ivy stores no personal tokens.
Throughout this page, {APP_ORIGIN} is your app’s origin, such as https://ivy.example.com (hosts.app in the chart).
What the installation needs
- Object storage and malware scanning. Ivy scans every file it serves from a connected drive and keeps the scanned copy in object storage under
cache/. The chart refuses to configure connectors without object storage, and object storage keeps requiring the scanner. See Self-hosting. - Outbound HTTPS from the API and the jobs worker to
login.microsoftonline.comandgraph.microsoft.com, or tooauth2.googleapis.comandwww.googleapis.com. The chart’s default network policies allow port 443 (networkPolicy.apiInternetEgress,networkPolicy.jobsInternetEgress). - Optional push notifications. Microsoft and Google can tell Ivy when files change, at
{APP_ORIGIN}/api/v1/connectors/microsoft/notificationsand{APP_ORIGIN}/api/v1/connectors/google/notifications. These must be reachable from the internet over HTTPS with a publicly trusted certificate. Without them, Ivy polls each mounted drive everydeltaIntervalSeconds(5 minutes by default), so an installation behind a firewall works too.
Microsoft 365
Register one app in your Microsoft Entra ID tenant:
-
In the Microsoft Entra admin center, go to Identity → Applications → App registrations → New registration.
-
Name it, for example “Ivy”, and choose Accounts in any organizational directory (multitenant), even if only your own tenant will connect. Ivy asks for admin consent through the multitenant endpoint and then pins each organisation to the tenant that consented, so no other tenant can connect. Single-tenant registrations aren’t supported yet.
-
Under Redirect URI, choose Web and enter
{APP_ORIGIN}/api/v1/connectors/microsoft/callback. Ivy uses it only for admin consent and the consenting admin’s sign-in that follows it. -
Select Register and copy the Application (client) ID.
-
Under API permissions, add the Microsoft Graph application permission
Sites.Selected, which every mount, flow and API key uses on the sites you grant. Ivy needs no delegated permissions beyond the OpenID sign-in that confirms which tenant consented.For your own tenant, you can also grant admin consent here (Grant admin consent for your tenant).
-
Under Token configuration, select Add groups claim, tick Directory roles and save. Ivy reads the consenting admin’s roles from that sign-in to check they may grant consent (Global Administrator or Privileged Role Administrator).
-
Under Certificates & secrets → Client secrets, create a secret and copy its Value (not its ID). Note when it expires, and replace it before then.
Store the secret in a Kubernetes Secret, for example:
kubectl -n ivy create secret generic ivy-connectors \
--from-literal=CONNECTOR_MICROSOFT_CLIENT_SECRET='<secret value>'
Google Drive
Ivy reaches shared drives only with a service account. Create it in the Google API Console (console.cloud.google.com), in a project owned by your Google Workspace organisation:
- Create a project, or pick one, and enable the Google Drive API under APIs & Services → Library.
- Under IAM & Admin → Service accounts, create one, for example
ivy-drives. It needs no roles in the project and no domain-wide delegation. - Under its Keys, select Add key → Create new key → JSON, and keep the downloaded file safe: it is the service account’s only credential. If your organisation policy
iam.disableServiceAccountKeyCreationblocks this, an organisation policy admin can allow it for this project. - Add the service account’s address to selected shared drives as Content manager, as described in Connected drives with Google Drive.
No OAuth client is needed: nobody signs in to Google through Ivy. Store the key in the Kubernetes Secret:
kubectl -n ivy create secret generic ivy-connectors \
--from-file=CONNECTOR_GOOGLE_SERVICE_ACCOUNT_KEY=./ivy-drives-key.json
Helm values
Set the connectors block in your values. Microsoft 365 is offered when its client ID is set and Google Drive when its Secret and serviceAccountKeyKey are, unless providers names the ones to offer:
connectors:
providers: [] # [] = every configured provider; or e.g. [microsoft]
cacheTtlSeconds: 900
maxFetchBytes: 104857600
deltaIntervalSeconds: 300
microsoft:
clientId: "00000000-0000-0000-0000-000000000000"
existingSecret: ivy-connectors
clientSecretKey: CONNECTOR_MICROSOFT_CLIENT_SECRET
google:
existingSecret: ivy-connectors
serviceAccountKeyKey: CONNECTOR_GOOGLE_SERVICE_ACCOUNT_KEY
The chart passes them to both the API and the jobs worker:
| Value | Env | Default |
|---|---|---|
connectors.providers |
CONNECTOR_PROVIDERS |
configured providers |
connectors.microsoft.clientId |
CONNECTOR_MICROSOFT_CLIENT_ID |
unset (off) |
connectors.microsoft.existingSecret |
CONNECTOR_MICROSOFT_CLIENT_SECRET |
– |
connectors.google.existingSecret |
CONNECTOR_GOOGLE_SERVICE_ACCOUNT_KEY |
unset (off) |
connectors.google.serviceAccountKeyKey |
the key in existingSecret |
unset (off) |
connectors.cacheTtlSeconds |
CONNECTOR_CACHE_TTL_SECONDS |
900 (60 to 86400) |
connectors.maxFetchBytes |
CONNECTOR_MAX_FETCH_BYTES |
104857600 (100 MiB) |
connectors.deltaIntervalSeconds |
CONNECTOR_DELTA_INTERVAL_SECONDS |
300 |
cacheTtlSecondsis how long a scanned copy may be served before Ivy fetches the file again. An hourly job deletes expired copies.maxFetchBytesis the largest file Ivy fetches and scans; larger files link out to the provider. The scanner’s stream limit (scanner.clamd.maxScanBytes) follows the larger of this andobjectStorage.maxUploadBytes.deltaIntervalSecondsis how often Ivy reads each mounted drive’s changes.
Rolling out new credentials needs a restart of the API and the jobs worker (kubectl -n ivy rollout restart deployment/ivy-api deployment/ivy-jobs).
Object storage lifecycle
Scanned copies live under cache/ in the files bucket, and Ivy deletes them itself once they expire. As a backstop, expire objects under cache/ after 1 day:
- the bundled MinIO (
objectStorage.mode: minio) gets this rule from the chart, together with the API’s and the worker’s access tocache/*; - on your own S3 bucket, add a lifecycle rule for the prefix
cache/with an expiration of 1 day (and, if the bucket is versioned, a noncurrent-version expiration of 1 day), and give both the API’s and the worker’s keys read, write and delete oncache/*,DeleteObjectVersiononcache/*andListBucketVersionson the bucket forcache/, so revocation can delete every version of a cached copy at once.
Checking the setup
GET /api/v1/organisations/{organisation_id}/connectorslists each provider withavailable: trueonce its client ID and secret are set.- If the API or the worker doesn’t start, its log names the missing or invalid variable, for example a client ID without its secret, or a
CONNECTOR_PROVIDERSentry without a client ID. - Ivy also refuses to start with a
CONNECTOR_GOOGLE_SERVICE_ACCOUNT_KEYthat isn’t a usable service account key: one withoutclient_email, or whoseprivate_keycan’t sign. The error never shows the key. Download a new JSON key from the service account’s Keys if this happens.