Skip to content

Commit 401cfbb

Browse files
authored
Merge branch 'main' into biazmoreira/VAULT-38804
2 parents a0413e2 + 312c963 commit 401cfbb

File tree

15 files changed

+698
-400
lines changed

15 files changed

+698
-400
lines changed

CODEOWNERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* @hashicorp/web-devdot
33

44
# Content CODEOWNERS
5+
/docs @hashicorp/vault-education-approvers @hashicorp/education
56

67
# Terraform documentation ownership
78
/content/terraform-plugin-framework @hashicorp/terraform-devex @hashicorp/terraform-education
@@ -20,7 +21,7 @@
2021
/content/terraform/*/docs/language/backend/s3.mdx @hashicorp/terraform-education @hashicorp/terraform-core @hashicorp/team-docs-packer-and-terraform @hashicorp/terraform-aws
2122

2223
/content/terraform-docs-common/ @hashicorp/team-docs-packer-and-terraform
23-
/content/terraform-docs-common/docs/plugin/ @hashicorp/terraform-devex
24+
/content/terraform-docs-common/docs/plugin/ @hashicorp/terraform-devex
2425
/content/terraform-docs-common/data/plugin-nav-data.json @hashicorp/terraform-devex
2526

2627
/content/terraform-enterprise @hashicorp/team-docs-packer-and-terraform @hashicorp/ptfe-review

content/terraform-docs-common/docs/cloud-docs/run/run-environment.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ HCP Terraform automatically injects the following environment variables for each
124124
| `TFC_CONFIGURATION_VERSION_GIT_COMMIT_SHA` | The full commit hash of the commit that the associated Terraform configuration version was ingressed from. | `abcd1234...` |
125125
| `TFC_CONFIGURATION_VERSION_GIT_TAG` | The name of the tag that the associated Terraform configuration version was ingressed from. | `v0.1.0` |
126126
| `TFC_PROJECT_NAME` | The name of the project used in this run. | `proj-name` |
127+
| `TFC_PROJECT_ID`. | The id of the project used in this run. | `proj-91XJpbLvbdohC6RD` |
127128

128129
They are also available as Terraform input variables by defining a variable with the same name. For example:
129130

content/vault/global/partials/important-changes/summary-tables/1_19.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ Found | Fixed | Workaround | Edition | Issue
3939
1.19.0 | 1.19.4 | **Yes** | Enterprise | [External Enterprise plugins cannot run on a standby node when it becomes active](/vault/docs/v1.19.x/updates/important-changes#external-ent-plugins)
4040
1.19.0 | 1.19.1 | Upgrade | All | [Vault log file missing subsystem logs](/vault/docs/v1.19.x/updates/important-changes#missing-logs)
4141
1.19.1 | 1.19.4 | **Yes** | All | [Azure authN fails to authenticate Uniform VMSS instances](/vault/docs/v1.19.x/updates/important-changes#azure-vmss)
42+
1.18.4 | No | **Yes** | All | [Failing credential refresh for Snowflake DB secrets engine key pair authentication](/vault/docs/v1.19.x/updates/important-changes#snowflake-keypair-refresh)

content/vault/global/partials/important-changes/summary-tables/1_20.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ Found | Fixed | Workaround | Edition | Issue
2525
1.20.0 | 1.20.1 | **Yes** | Enterprise | [Secondary cluster reload overwrites development cluster setting](/vault/docs/v1.20.x/updates/important-changes#development-cluster-reload)
2626
1.20.0 | 1.20.1 | **Yes** | All | [UI login fails for auth mounts with underscores and unauthenticated listing](/vault/docs/v1.20.x/updates/important-changes#ui-login-underscore)
2727
1.20.0 | 1.20.1 | **Yes** | All | [GUI navigation error for KV v2 secret paths containing underscores](/vault/docs/v1.20.x/updates/important-changes#ui-kvv2-underscore-secrets)
28-
1.20.0 | 1.20.1 | **Yes** | All | [Failing credential refresh for Snowflake DB secrets engine key pair authentication](/vault/docs/v1.20.x/updates/important-changes#snowflake-keypair-refresh)
28+
1.18.4 | No | **Yes** | All | [Failing credential refresh for Snowflake DB secrets engine key pair authentication](/vault/docs/v1.20.x/updates/important-changes#snowflake-keypair-refresh)
2929
1.20.0 | 1.20.1 | **Yes** | All | [Duplicate LDAP password rotations on standby node check-in](/vault/docs/v1.20.x/updates/important-changes#ldap-checkin)

content/vault/v1.19.x/content/docs/updates/important-changes.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,3 +473,15 @@ to the billing start date for the cluster.
473473
To avoid issues and unexpected behavior with Vault Community, always provide a
474474
valid `start_time` value when calling `/sys/internal/counters/activity` or
475475
upgrade to v1.20.x.
476+
477+
### Failing credential refresh for Snowflake DB secrets engine key pair authentication ((#snowflake-keypair-refresh))
478+
479+
| Change | Affected version | Fixed version
480+
| ----------- | -------------------------------------- | --------------------
481+
| Known issue | 1.20.x, 1.19.x, 1.18.x+ent, 1.17.x+ent, 1.16.x+ent | None
482+
483+
Users using keypair or username and password authentication with Snowflake databases may receive errors
484+
due to improper credential refreshes and stale connections in the connection pool.
485+
When two or more concurrent operations occur, Vault tries to reuse an idle
486+
connection from the pool and the request fails due to session timeout in the
487+
Snowflake database.

content/vault/v1.20.x/content/docs/about-vault/how-vault-works.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ description: >-
77

88
# How Vault works
99

10-
1110
Vault is an identity-based secrets and encryption management system
1211
that centralizes secret management, rotates old credentials, generates
1312
credentials on demand, audits client interactions, and supports regulatory
@@ -35,7 +34,12 @@ them access to secrets or stored sensitive data.
3534

3635
## Core Vault workflow
3736

38-
Vault works primarily with tokens and a token is associated to the client's policy. Each policy is path-based and policy rules constrains the actions and accessibility to the paths for each client. With Vault, you can create tokens manually and assign them to your clients, or the clients can log in and obtain a token. The illustration below displays Vault's core workflow.
37+
Vault works primarily with tokens associated to a client policy. The path-based
38+
policy defines rules that constrain the actions and accessibility of the
39+
associated paths for each client.
40+
41+
Clients can authenticate against Vault to log in and obtain a token automatically
42+
or you can create tokens manually and explicitly assign them to your clients.
3943

4044
![Vault Workflow](/img/vault-workflow-diagram1.png)
4145

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
layout: docs
3+
page_title: Audit logging best practices
4+
description: Recommendations for setting up audit logging in HashiCorp Vault.
5+
---
6+
7+
# Best practices for audit logging
8+
9+
The following recommendations apply generally to most Vault deployments. You should always independently evaluate whether a given recommendation makes sense in the context of your deployment and use of Vault.
10+
11+
## Test configuration changes
12+
13+
Always test your audit logging changes in a non-production environment that closely mirrors your production environment. Your test environment should include performance benchmarking under production-like loads and match in all aspects relevant to the audit logging configuration you want to test.
14+
15+
## Enable audit devices at cluster initialization
16+
17+
Enable at least one audit device immediately after you initialize a new Vault cluster, and ensure that the configuration of your audit device is [valid for all Vault cluster nodes](/vault/docs/audit#enabling-and-disabling-audit-devices).
18+
19+
Audit logging is disabled by default on new Vault clusters. By enabling at least one audit device post-initialization, you ensure that Vault will audit all subsequent API requests, including those for initial cluster configuration and root token revocation.
20+
21+
## Enable at least two audit devices
22+
23+
Enable at least two audit devices, of different types, on each Vault cluster. Configure *at least one* of those devices to forward logs to a remote system for analysis and long-term storage.
24+
25+
Vault does not respond to client requests it cannot log. Enabling at least two audit devices reduces the risk of Vault not responding to client requests when the only audit device becomes partially or fully unavailable.
26+
27+
<Warning>
28+
29+
Vault sends each audit log entry to all enabled devices, and guarantees that it writes the audit log entry successfully to at least one audit device. To ensure that you have a complete record of all API requests and responses, you **must** analyze audit log entries across all configured devices. You may deduplicate audit log entries based on the value of `.request.id`.
30+
31+
</Warning>
32+
33+
<Tabs>
34+
35+
<Tab heading="File devices">
36+
37+
If you enable a `file` audit device, use a dedicated volume or partition for Vault's audit logs to protect against other workloads on the system taking up the disk space intended for your log files.
38+
39+
Additionally, establish a log rotation process that is appropriate for your organization, deployment, and policies, using a purpose-built system like *logrotate*. Configure your log rotation system to send Vault an `HUP` signal, which causes Vault to start writing audit log entries to the new log file.
40+
41+
<Tip title="Logging with Kubernetes">
42+
43+
When running Vault on a Kubernetes cluster, a common approach is to configure a `file` audit device with `file_path` set to `stdout`. Vault will write audit logs to the standard output for the container, which lets you process the logs with a Kubernetes cluster-level log collector.
44+
45+
If you choose this approach, we suggest configuring the audit device with a `prefix`, so your log collector can separate audit logs from server logs.
46+
47+
</Tip>
48+
49+
</Tab>
50+
51+
<Tab heading="Syslog devices">
52+
53+
To configure a `syslog` audit device, you must deploy Vault on Unix, and you must use the default syslog service running on the same host as the Vault server. If you enable a `syslog` audit device, use a TCP listener so that Vault can record large audit log entries that may exceed the size limit of UDP listeners.
54+
55+
</Tab>
56+
57+
<Tab heading="Socket devices">
58+
59+
If you configure a `socket` audit device, configure a local service to bind a Unix socket.
60+
61+
Socket devices using TCP and UDP listeners can result in lost audit log data if the TCP connection is interrupted or the receiving UDP endpoint becomes unavailable. Using a local socket helps protect against data loss.
62+
63+
</Tab>
64+
65+
</Tabs>
66+
67+
## Configure audit devices
68+
69+
Review the configuration options that are specific to the type of audit device, as well as those [common](/vault/api-docs/system/audit#parameters) to all audit device types, and ensure that you configure all audit devices in a way that is appropriate for your organization and deployment.
70+
71+
In general, we recommend the following options for all audit devices:
72+
73+
- Set `elide_list_responses = true` to reduce the volume of log data produced by API list requests (see [Eliding list response bodies](/vault/docs/audit#eliding-list-response-bodies)).
74+
- Set `hmac_accessor = false`. A token accessor is generally not considered sensitive information: it does not grant any access to Vault, but rather serves as a unique identifier for a single Vault token. A token accessor enables you to [revoke](/vault/docs/commands/token/revoke) its corresponding Vault token, even when you do not know the token itself. By disabling token accessor hashing, if you identify unusual access patterns in your audit logs, you can quickly revoke the corresponding Vault token through its accessor.
75+
76+
## Monitor audit device health
77+
78+
Configure monitoring and alerting on the health of your audit devices through Vault telemetry and device-specific monitoring (such as available disk space, disk IOPS, and log rotation status for `file` type audit devices).
79+
80+
Vault produces several audit logging [telemetry metrics](/vault/docs/internals/telemetry/metrics/audit). We especially recommend monitoring the following metrics for spikes, which can indicate one or more audit devices failing:
81+
82+
- [`vault.audit.log_request_failure`](/vault/docs/internals/telemetry/metrics/audit#vault-audit-log_request_failure)
83+
- [`vault.audit.log_response_failure`](/vault/docs/internals/telemetry/metrics/audit#vault-audit-log_response_failure)
84+
- [`vault.audit.{DEVICE}.log_request`](/vault/docs/internals/telemetry/metrics/audit#vault-audit-device-log_request)
85+
- [`vault.audit.{DEVICE}.log_response`](/vault/docs/internals/telemetry/metrics/audit#vault-audit-device-log_response)
86+
87+
## Configure attribute hashing
88+
89+
Evaluate which request and response attributes need *not* be [hashed](/vault/docs/audit#hashing-sensitive-values) in the audit logs for each authentication backend and secrets engine mount you configure in Vault. Leave hashing enabled for attributes that are sensitive (e.g., passwords, private keys) or that may be excessively large for your audit log.
90+
91+
You can disable hashing for individual request and response attributes with the `audit_non_hmac_request_keys` and `audit_non_hmac_response_keys` attributes in the following tuning endpoints:
92+
93+
- [`/sys/auth/{path}/tune`](/vault/api-docs/system/auth#tune-auth-method)
94+
- [`/sys/mounts/{path}/tune`](/vault/api-docs/system/mounts#tune-mount-configuration)
95+
96+
## Monitor suspicious activity
97+
98+
Configure monitoring and alerting for unusual or suspicious activity in your audit logs. Examples of events to monitor include:
99+
100+
- Root token creation
101+
- Root token usage
102+
- Modifications to audit logging configuration
103+
- Spikes in authentication failures
104+
- Spikes in permission denied failures

0 commit comments

Comments
 (0)