vault/website/content/docs/agent-and-proxy/autoauth/sinks/file.mdx
Seena Fallah 5c275e7d88
agent: allow changing file ownership in file sink (#27123)
* agent: allow changing file ownership in file sink

Allow changing the ownership of the token file in file sink.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

* Consistency: id -> ID

* Add changelog

* Remove empty line in changelog

* agent: add godoc for TestFileSinkMode_Ownership

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

---------

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2024-05-30 15:11:37 -04:00

30 lines
1.3 KiB
Plaintext

---
layout: docs
page_title: Vault Agent and Vault Proxy Auto-Auth File Sink
description: File sink for Auto-Auth
---
# Vault agent and Vault proxy Auto-Auth file sink
The `file` sink writes tokens, optionally response-wrapped and/or encrypted, to
a file. This may be a local file or a file mapped via some other process (NFS,
Gluster, CIFS, etc.).
Once the sink writes the file, it is up to the client to control lifecycle;
generally it is best for the client to remove the file as soon as it is seen.
It is also best practice to write the file to a ramdisk, ideally an encrypted
ramdisk, and use appropriate filesystem permissions. The file is currently
written with `0640` permissions as default, but can be overridden with the optional
'mode' setting.
## Configuration
- `path` `(string: required)` - The path to use to write the token file
- `mode` `(int: optional)` - Octal number string representing the bit pattern for the file mode, similar to `chmod`.
- `owner` `(int: optional)` - The UID to use for the token file. Defaults to the current user ID.
- `group` `(int: optional)` - The GID to use for token file. Defaults to the current group ID.
~> Note: Configuration options for response-wrapping and encryption for the sink
file are located within the [options common to all sinks](/vault/docs/agent-and-proxy/autoauth#configuration-sinks) documentation.