> For the complete documentation index, see [llms.txt](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/integrations/connectivity/secrets-vaults/kubernetes-secrets.md). Agents can also search and read this documentation through its [MCP server](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/~gitbook/mcp).

# Filesystem secrets vault (Kubernetes Secrets)

Configure the filesystem secrets vault, so the Insight Point reads integration credentials from Kubernetes Secrets mounted on its pod

This reference guide explains how to configure the `filesystem` vault provider for Veza's Secrets Vaults feature, with Kubernetes Secrets mounted onto the Insight Point pod. For the complete setup process, see the [main Secrets Vaults guide](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/integrations/connectivity/secrets-vaults.md).

{% hint style="info" %}
**Available in Veza v2026.9.28 and later.** An earlier Insight Point rejects the vault entry with `Unsupported vault provider: filesystem`.
{% endhint %}

## Overview

The `filesystem` vault provider reads secret values from files on the Insight Point's local filesystem instead of calling an external vault API. It needs no credentials of its own. The usual source is a Kubernetes Secret that the kubelet mounts into the Insight Point pod as a volume. The Secret can also be kept in sync from HashiCorp Vault by the [Vault Secrets Operator](https://developer.hashicorp.com/vault/docs/platform/k8s/vso).

The provider reads the files again on every secret fetch and caches nothing. When the Kubernetes Secret changes, the kubelet updates the mounted volume in place, and the next fetch uses the new value without an Insight Point restart.

The `filesystem` provider is available only on an external Insight Point that you deploy. It reads any files at its `mount_path`. This guide covers Kubernetes, where the files come from mounted Secrets.

## Prerequisites

* An external [Insight Point](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/integrations/connectivity/insight-point.md) running in Kubernetes, version v2026.9.28 or later
* The Kubernetes Secrets you want to expose, in the same namespace as the Insight Point pod
* Permission to change the Insight Point's volume configuration. With the Helm chart, this is the [`filesystemVaultSecrets`](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/integrations/connectivity/insight-point/insight-point-kubernetes.md#filesystem-vault-secrets) value.

## How the provider finds a secret

Each `filesystem` vault has a `mount_path`, a directory on the Insight Point, and a `mode`. The **Secret Path** you enter on an integration (the `secret_id` in the API) names a secret relative to `mount_path`:

| Mode        | `mount_path` is                                             | Secret Path is                                        | Secret content                                                |
| ----------- | ----------------------------------------------------------- | ----------------------------------------------------- | ------------------------------------------------------------- |
| `directory` | The **parent** directory that the Secrets are mounted under | The name of one Secret's directory under `mount_path` | Every file in that directory is one field, keyed by file name |
| `file`      | The Secret's **own** mount directory                        | The name of one file (one Secret key) in `mount_path` | The file holds a JSON object with the fields                  |

Use `directory` mode for an ordinary Kubernetes Secret, where each key holds one credential field. This matches how the kubelet lays out a Secret volume, and how the Vault Secrets Operator syncs a Vault secret by default. Use `file` mode when one Secret key already holds the whole credential set as JSON, such as the output of a Vault Secrets Operator `destination.transformation` template.

One `directory` vault serves every Secret mounted under its `mount_path`, so you don't need a vault for each Secret. You can register more than one `filesystem` vault, for example one for each mode.

## Configure the vault on the Insight Point

Add a `filesystem` entry to the secrets vault configuration on your external Insight Point (see [Configure vault access on Insight Point](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/integrations/connectivity/secrets-vaults.md#configure-vault-access-on-insight-point) for how the file is loaded). With the Helm chart, add it under `secretsVaultsConfig`.

```yaml
vaults:
  - name: 'Kubernetes Secrets'
    vault_provider: 'filesystem'
    auth_type: 'none'
    auth_config:
      mount_path: '/etc/veza/filesystem-vault'
      mode: 'directory'
```

**Field reference:**

* `name`: The label for the vault in the **External Vault** list when you configure an integration.
* `auth_type`: Must be `none`. The provider authenticates nothing itself. Access control comes from Kubernetes RBAC on the Secrets and from the read-only volume mount.
* `mount_path`: The directory the provider reads from, as described in [How the provider finds a secret](#how-the-provider-finds-a-secret). Required. Use an absolute path. The Insight Point doesn't check the path when it loads the configuration, so a relative or misspelled path only fails when an integration fetches a secret.
* `mode`: `directory` or `file`, in lowercase. Required, with no default.

## Mount Kubernetes Secrets into the Insight Point pod

List each Secret in the Helm chart's [`filesystemVaultSecrets`](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/integrations/connectivity/insight-point/insight-point-kubernetes.md#filesystem-vault-secrets) value. The chart creates one read-only volume for each Secret at the `mountPath` you set. The Helm page lists the naming rules for each entry.

### Directory mode

Mount each Kubernetes Secret at a subdirectory of `mount_path`. The subdirectory name is the Secret Path. This example mounts two Secrets under one vault's `mount_path`:

```yaml
filesystemVaultSecrets:
  - name: prod-ad-credentials
    secretName: prod-ad-credentials
    mountPath: /etc/veza/filesystem-vault/prod-ad-credentials
  - name: prod-okta-credentials
    secretName: prod-okta-credentials
    mountPath: /etc/veza/filesystem-vault/prod-okta-credentials
```

A Secret created as:

```bash
kubectl create secret generic prod-ad-credentials \
  --from-literal=username='domain\serviceaccount' \
  --from-literal=password='secretpassword'
```

is stored on disk as `/etc/veza/filesystem-vault/prod-ad-credentials/username` and `/etc/veza/filesystem-vault/prod-ad-credentials/password`, one file per key. The Insight Point reads the directory and builds `{"username": "...", "password": "..."}`, the same JSON object Veza expects from any vault. Enter `prod-ad-credentials` as the **Secret Path** on the Active Directory integration, and `prod-okta-credentials` on the Okta integration.

When it reads a Secret's directory, the provider:

* Skips entries whose names start with `..`, such as the `..data` link that Kubernetes creates, and skips subdirectories.
* Uses each file's content as-is, including a trailing newline. Create Secrets with `--from-literal`, or strip the newline from files before you use `--from-file`.
* Ignores a key that doesn't name a field of the integration, such as the `_raw` key the Vault Secrets Operator adds.
* Fails the whole secret if a key names an integration field that can't come from a vault. For example, MySQL takes only `password` from a vault, so a Secret that also holds `username` fails with `field 'username' is not vault-sourced, cannot inject secret`. Keep only the vault-sourced fields in the Secret.

### File mode

Mount the whole Secret, and set the vault's `mount_path` to the Secret's own mount directory. The Secret Path is the key's file name. For example, for a Secret `prod-okta-json` whose key `credentials.json` holds `{"token": "..."}`:

```yaml
filesystemVaultSecrets:
  - name: prod-okta-json
    secretName: prod-okta-json
    mountPath: /etc/veza/filesystem-vault-json/prod-okta-json

secretsVaultsConfig:
  vaults:
    - name: 'Okta JSON credentials'
      vault_provider: 'filesystem'
      auth_type: 'none'
      auth_config:
        mount_path: '/etc/veza/filesystem-vault-json/prod-okta-json'
        mode: 'file'
```

Enter `credentials.json` as the **Secret Path**. The file must contain a JSON object whose keys are the integration's field names.

### If other tools manage the pod's volumes

If you create the Insight Point pod's volumes with your own manifests or tools instead of `filesystemVaultSecrets`, mount each Secret as its own read-only `secret` volume at the same paths. For the first directory-mode Secret above:

```yaml
spec:
  containers:
    - name: insight-point
      volumeMounts:
        - name: prod-ad-credentials
          mountPath: /etc/veza/filesystem-vault/prod-ad-credentials
          readOnly: true
  volumes:
    - name: prod-ad-credentials
      secret:
        secretName: prod-ad-credentials
```

{% hint style="warning" %}
Don't mount a single key with `subPath`. Kubernetes doesn't update a `subPath` mount when the Secret changes, so the Insight Point keeps reading the old value until the pod restarts. The Helm chart doesn't use `subPath`.
{% endhint %}

## Configure the provider with secrets vault

Follow [Configure provider with secrets vault](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/integrations/connectivity/secrets-vaults.md#configure-provider-with-secrets-vault) in the main guide. Select **External Secrets Vault**, choose the vault's `name` from the **External Vault** list, and enter the **Secret Path**: the Secret's directory name in `directory` mode, or the file name in `file` mode.

## Security considerations

* The provider rejects a Secret Path that is empty, absolute, `.`, or that leaves `mount_path` (such as `../other`). Even so, point `mount_path` at a directory that holds only secrets intended for Veza.
* Access control happens outside this provider. Use Kubernetes RBAC to restrict who can read or modify the Secret objects, and mount the volumes read-only.
* There is no vault-side audit log for this provider. Use Kubernetes audit logging (`get` and `list` on `secrets`) if you need a record of access to the Secret objects.

## Troubleshooting

Secret fetch failures appear in extraction errors in this form, followed by one of the messages below:

```
failed to fetch secret with ID '<secret-path>' from secrets vault '<vault-name>' of vault provider 'filesystem': ...
```

### Secret directory not found under the mount path

**Problem:** The error contains `failed to list secret directory '<secret-path>' under mount path '<mount_path>'`.

**Cause:** In `directory` mode, the provider looks for `<mount_path>/<secret-path>/`. This error usually means `mount_path` is set to a Secret's own directory instead of the parent directory, or the Secret is mounted at a relative or different path.

**Solution:** Mount each Secret at an absolute path one level under the vault's `mount_path`, and enter the last path segment as the Secret Path. For example, this Helm configuration fails:

```yaml
filesystemVaultSecrets:
  - name: example-secret
    secretName: example-secret
    mountPath: example-secret   # relative path

secretsVaultsConfig:
  vaults:
    - name: example-secret
      vault_provider: filesystem
      auth_type: none
      auth_config:
        mount_path: /etc/veza/filesystem-vault/example-secret   # the Secret's own directory
        mode: directory
```

The corrected configuration mounts the Secret at an absolute path and points `mount_path` at the parent directory. Name the vault for the set of Secrets it serves, not for one Secret:

```yaml
filesystemVaultSecrets:
  - name: example-secret
    secretName: example-secret
    mountPath: /etc/veza/filesystem-vault/example-secret

secretsVaultsConfig:
  vaults:
    - name: Kubernetes Secrets
      vault_provider: filesystem
      auth_type: none
      auth_config:
        mount_path: /etc/veza/filesystem-vault   # parent of every mounted Secret
        mode: directory
```

On the integration, select **Kubernetes Secrets** as the **External Vault** and enter `example-secret` as the **Secret Path**.

To confirm the layout, list the vault's `mount_path` inside the Insight Point container. Each Secret should appear as a subdirectory.

### Secret file not found

**Problem:** The error contains `failed to read secret file '<secret-path>' under mount path '<mount_path>'`.

**Solution:** In `file` mode, confirm that `mount_path` is the Secret's own mount directory and that the Secret Path matches the key name exactly.

### Secret Path rejected

**Problem:** The error contains one of:

* `secret id '.' must name a secret under the vault mount path, not the mount path itself`
* `secret id '<secret-path>' must be a relative path`
* `secret id '<secret-path>' must not escape the vault mount path`
* `secret id must not be empty`

**Solution:** Enter the Secret Path relative to `mount_path`: a directory name in `directory` mode, or a file name in `file` mode. To read a Secret mounted at `mount_path` itself, use `file` mode, or move `mount_path` up one level and use the directory name.

### No fields found

**Problem:** The error contains `no secret fields found in '<secret-path>' under mount path '<mount_path>'`.

**Solution:** The Secret's directory has no files. Confirm the Kubernetes Secret has at least one data key. Files in subdirectories don't count as fields.

### Field can't be filled from the vault

**Problem:** The error contains `field '<key>' is not vault-sourced, cannot inject secret`.

**Solution:** Remove that key from the Kubernetes Secret, so the Secret holds only fields the integration takes from a vault. See [Current limitations](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/integrations/connectivity/secrets-vaults.md#current-limitations) for the supported integrations.

### Secret isn't valid JSON

**Problem:** The error starts with `failed to map secret with ID '<secret-path>'` and contains `failed to unmarshal secret JSON`.

**Solution:** In `file` mode, the file must contain a JSON object. Check the Vault Secrets Operator transformation template, or the content of the Secret key.

### Vault entry is ignored

**Problem:** The vault doesn't appear in the **External Vault** list, and the Insight Point logs `Invalid secrets vault configuration` with a list of violations. The Insight Point skips an invalid entry and registers the rest.

**Solutions:**

1. `Unsupported vault provider: filesystem` means the Insight Point is older than v2026.9.28. Upgrade it.
2. `Must be one of: none` means `auth_type` is not `none`.
3. `Must be one of: directory, file` means `mode` is missing or misspelled.
4. `Cannot be empty` on `auth_config.mount_path` means `mount_path` is missing.

### Stale values after rotation

**Problem:** An updated Kubernetes Secret doesn't take effect.

**Solutions:**

1. Confirm the Secret object itself changed (`kubectl get secret <name> -o yaml`). The kubelet applies Secret changes to mounted volumes on its periodic sync, typically within a minute or two, not immediately.
2. If the Secret is mounted with `subPath`, restart the pod, or switch to a whole-Secret mount.
3. If you use the Vault Secrets Operator, confirm its sync completed and updated the destination Secret.

## See also

* [Main Secrets Vaults configuration guide](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/integrations/connectivity/secrets-vaults.md)
* [Deploy with Kubernetes (Helm): Filesystem vault secrets](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/integrations/connectivity/insight-point/insight-point-kubernetes.md#filesystem-vault-secrets)
* [Using secret references via API](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/integrations/connectivity/secrets-vaults/secret-references-api.md)
* [Kubernetes Secrets documentation](https://kubernetes.io/docs/concepts/configuration/secret/)
* [Vault Secrets Operator documentation](https://developer.hashicorp.com/vault/docs/platform/k8s/vso)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.veza.com/4yItIzMvkpAvMVFAamTf/integrations/connectivity/secrets-vaults/kubernetes-secrets.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
