Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

documentation for redaction configuration on listeners #23568

Merged

Conversation

peteski22
Copy link

@peteski22 peteski22 commented Oct 9, 2023

@peteski22 peteski22 added docs pr/no-changelog hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed labels Oct 9, 2023
@peteski22 peteski22 added this to the 1.16.0-rc1 milestone Oct 9, 2023
@peteski22 peteski22 requested a review from a team as a code owner October 9, 2023 11:54
@peteski22 peteski22 requested review from marcboudreau and a team October 9, 2023 11:54
@hashicorp hashicorp deleted a comment from digital-content-events bot Oct 9, 2023
@peteski22 peteski22 force-pushed the docs/peteski22/VAULT-19863/listener-response-redaction branch from bf8e762 to 8293f3c Compare October 9, 2023 12:50
Copy link
Contributor

@kubawi kubawi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Contributor

@ccapurso ccapurso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have one minor question regarding ordering of sections but this looks great!

Comment on lines +49 to +50
Please see [redaction settings](/vault/docs/configuration/listener#redaction-settings)
(below) for details on each redaction setting.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 I wonder if it would make sense to provide the settings first so that the reader has further context prior to reading through the examples. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, it's generally a better idea to provide instruction before the examples. Examples without context don't necessarily help the reader. Especially if the first sentence encourages the reader to jump to those instructions anyway 😅

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😨 I missed this comment before I just hit merge! 😢 Lemme fix that.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ccapurso #23572 👍🏼

@peteski22 peteski22 merged commit 2912f5b into main Oct 9, 2023
39 checks passed
@peteski22 peteski22 deleted the docs/peteski22/VAULT-19863/listener-response-redaction branch October 9, 2023 19:34
Comment on lines +21 to +27
There are four different types of information deemed sensitive that can be returned
by unauthenticated API endpoints:

1. Version number
2. Build date
3. Cluster name
4. IP address
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
There are four different types of information deemed sensitive that can be returned
by unauthenticated API endpoints:
1. Version number
2. Build date
3. Cluster name
4. IP address
Unauthenticated API endpoints may return the following sensitive
information:
1. Version number
1. Build date
1. Cluster name
1. IP address

Style correction: write in active voice

There are four different types of information deemed sensitive that can be returned
by unauthenticated API endpoints:

1. Version number
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we elaborate on these items a bit? What does the information belong to? For example, the version and build date of what?

- [TCP][tcp]
- [Unix Domain Socket][unix]

[tcp]: /vault/docs/configuration/listener/tcp
[unix]: /vault/docs/configuration/listener/unix

## Unauthenticated endpoints - sensitive data redaction
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Unauthenticated endpoints - sensitive data redaction
## Sensitive data redaction for unauthenticated endpoints

The key topic here seems to be about the sensitive data redaction, so lets lead with that in the heading

Comment on lines +29 to +32
Vault offers the ability to configure each `listener` stanza such that when appropriate,
these values will be redacted from responses.

The following API endpoints support redaction based on `listener` stanza configuration:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Vault offers the ability to configure each `listener` stanza such that when appropriate,
these values will be redacted from responses.
The following API endpoints support redaction based on `listener` stanza configuration:
You can protect sensitive information by configuring your `listener`
stanzas to redact key values in responses for the following API
endpoints:

Comment on lines +38 to +45
When a value is redacted by Vault, it will be replaced with an empty string (`""`).

~> Note: In certain situations, due to an empty string value, the related key may
no longer be present in the response object returned from the API, as that field is
omitted when the value is empty (`""`).

~> Note: The Vault API is also consumed by the Vault CLI and UI, therefore enabling redaction
settings will also affect them both.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When a value is redacted by Vault, it will be replaced with an empty string (`""`).
~> Note: In certain situations, due to an empty string value, the related key may
no longer be present in the response object returned from the API, as that field is
omitted when the value is empty (`""`).
~> Note: The Vault API is also consumed by the Vault CLI and UI, therefore enabling redaction
settings will also affect them both.
Vault replaces redacted information with an empty string (`""`). APIs that
omit response parameters with empty values also suppress redacted values in
response objects.
<Note title="Redacting values affects all API responses">
The Vault CLI and UI consume Vault API responses. As a result, your redaction
settings will apply to CLI and UI output in addition to direct API calls.
</Note>

Style correction: write in active voice, avoid back-to-back asides when possible

The following options apply to both types of listener (see above), and can be configured
for each individual listener stanza.

Please see the [sensitive data redaction](/vault/docs/configuration/listener#unauthenticated-endpoints-sensitive-data-redaction) explanation above for further information.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Including this link here doesn't make sense as we're expecting folks to have already skimmed past those sections to get here. In general, we should avoid in-page links unless it's really needed from an accessibility or discoverability perspective.

Suggested change
Please see the [sensitive data redaction](/vault/docs/configuration/listener#unauthenticated-endpoints-sensitive-data-redaction) explanation above for further information.

Comment on lines +180 to +181
The following options apply to both types of listener (see above), and can be configured
for each individual listener stanza.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this sentence adds much as folks typically assume a parameter applies unless we say otherwise. Something like "Use the following parameters to configure redaction for your listeners" would be more appropriate.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know what you mean, but I was trying to add something that meant the common config options section could be extended later if we had settings that weren't for just redaction (e.g. disabling an endpoint via config here). 🤔


### Redaction settings

- `redact_addresses` `(bool: false)` - If enabled, will redact `leader_address` and `cluster_leader_address` values when applicable.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `redact_addresses` `(bool: false)` - If enabled, will redact `leader_address` and `cluster_leader_address` values when applicable.
- `redact_addresses` `(bool: false)` - Redacts `leader_address` and `cluster_leader_address` values in applicable API responses when `true`.

### Redaction settings

- `redact_addresses` `(bool: false)` - If enabled, will redact `leader_address` and `cluster_leader_address` values when applicable.
- `redact_cluster_name` `(bool: false)` - If enabled, will redact `cluster_name` values when applicable.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `redact_cluster_name` `(bool: false)` - If enabled, will redact `cluster_name` values when applicable.
- `redact_cluster_name` `(bool: false)` - Redacts `cluster_name` values in applicable API responses when `true`.


- `redact_addresses` `(bool: false)` - If enabled, will redact `leader_address` and `cluster_leader_address` values when applicable.
- `redact_cluster_name` `(bool: false)` - If enabled, will redact `cluster_name` values when applicable.
- `redact_version` `(bool: false)` - If enabled, will redact `version` and `build_date` values when applicable.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `redact_version` `(bool: false)` - If enabled, will redact `version` and `build_date` values when applicable.
- `redact_version` `(bool: false)` - Redacts `version` and `build_date` values in applicable API responses when `true`.

@schavis
Copy link
Contributor

schavis commented Oct 9, 2023

In future, please do not merge documentation changes until a member of the EDU team has had a chance to review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed pr/no-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants