chore: add storage policy documentation (#4246)
* chore: update create storage bucket readme * chore: update domain model docs for storage policy * fix(website): update docs nav data * docs: Update navigation * docs: Copy edits * chore: add resultant set of policy examples * doc: Update resultant set of policy examples * docs: Add policies to CLI commands * docs: Add note about default policy name * adds configure storage policies usage docs * updates s3 policies to include the bucket resource itself * adds commands/policies routes back * Apply suggestions from code review Co-authored-by: Dan Heath <76443935+Dan-Heath@users.noreply.github.com> * adds Manual deletion section * updates UI step * adds update storage policies usage doc * attribute description updates and formatting fixes * Apply suggestions from code review Co-authored-by: Dan Heath <76443935+Dan-Heath@users.noreply.github.com> --------- Co-authored-by: Dan Heath <76443935+Dan-Heath@users.noreply.github.com> Co-authored-by: stellarsquall <stellarsquall@protonmail.ch> Co-authored-by: Robin Beck <stellarsquall@users.noreply.github.com>
This commit is contained in:
13 files changed
+1480
-13
No files matched your search
@@ -67,13 +67,22 @@ A scope has the following configurable attributes:
|
||||
|
||||
- `description` - (optional)
|
||||
|
||||
## Storage policy association
|
||||
|
||||
<EnterpriseAlert product="boundary">This feature requires <a href="https://www.hashicorp.com/products/boundary">HCP Boundary or Boundary Enterprise</a></EnterpriseAlert>
|
||||
|
||||
[Storage policies][] that are created in the global scope can be associated with any org scope.
|
||||
However, a storage policy created in an org scope can only be associated with that org scope.
|
||||
Changing the storage policy assigned to a scope can impact the resultant set of policy, but such a change only affects future recordings that you create within that scope or using that storage policy.
|
||||
|
||||
## Referenced by
|
||||
|
||||
- [Auth Method][]
|
||||
- [Credential Store][]
|
||||
- [Auth method][]
|
||||
- [Credential store][]
|
||||
- [Group][]
|
||||
- [Host Catalog][]
|
||||
- [Host catalog][]
|
||||
- [Role][]
|
||||
- [Storage policies][]
|
||||
- [Target][]
|
||||
- [User][]
|
||||
|
||||
@@ -94,6 +103,7 @@ A scope has the following configurable attributes:
|
||||
[projects]: /boundary/docs/concepts/domain-model/scopes#projects
|
||||
[role]: /boundary/docs/concepts/domain-model/roles
|
||||
[roles]: /boundary/docs/concepts/domain-model/roles
|
||||
[storage policies]: /boundary/docs/concepts/domain-model/storage-policy
|
||||
[target]: /boundary/docs/concepts/domain-model/targets
|
||||
[targets]: /boundary/docs/concepts/domain-model/targets
|
||||
[user]: /boundary/docs/concepts/domain-model/users
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
layout: docs
|
||||
page_title: Domain model - session recordings
|
||||
description: |-
|
||||
The anatomy of a Boundary session recording
|
||||
Use session recordings to audit user sessions in Boundary. Learn how to configure session recordings to monitor usage.
|
||||
---
|
||||
|
||||
# Session recordings
|
||||
@@ -45,9 +45,58 @@ A session recording belongs to the scope of the [storage bucket][]
|
||||
it is stored in. The scope can be either the global scope or an [organization][]
|
||||
scope.
|
||||
|
||||
## Referenced by
|
||||
## Resultant set of policy calculation
|
||||
|
||||
- [Storage Bucket][]
|
||||
[Storage policies][] codify how long session recordings must be kept and when they should be deleted.
|
||||
The resultant set of policy (RSoP) refers to the set of policy attributes that apply to a resource.
|
||||
When you apply policies on multiple levels, the results can conflict.
|
||||
Boundary evaluates each storage policy attribute individually, starting at the global scope and then evaluating any storage policies assigned to org scopes.
|
||||
|
||||
In accordance with the RSoP, Boundary considers the following principles in order:
|
||||
|
||||
1. Retention wins over deletion. The retention duration parameter guarantees that a session recording is retained for at least that duration. Before the retention duration has transpired, manual deletes will fail and Boundary will not attempt to automatically delete any session recordings.
|
||||
2. Longest retention wins. When Boundary evaluates multiple storage policies, the longer retention duration parameter applies to the session recording.
|
||||
3. The shortest deletion wins. When Boundary evaluates multiple storage policies, the shorter delete after duration parameter applies to the session recording.
|
||||
|
||||
Each storage policy attribute also indicates whether the attribute can be overridden or not.
|
||||
If the attribute cannot be overridden, Boundary stops evaluating the RSoP for that attribute at lower scopes.
|
||||
|
||||
Changing the policy assigned to a scope or changing an attribute of a storage policy can impact the RSoP.
|
||||
Such a change only affects future session recordings created in that scope or using that storage policy.
|
||||
If a session recording is not in compliance with the current RSoP, the session recording API indicates that it is out of compliance with the current policy.
|
||||
|
||||
### Examples
|
||||
|
||||
In the following examples, Boundary determines the resultant set of policies using the `retain_for_days_overridable` and `delete_after_days_overridable` attributes.
|
||||
A value of `true` indicates the number of days can be overridden, while a value of `false` indicates that it cannot be overridden.
|
||||
|
||||
#### Example 1
|
||||
In this case, the retention value is derived from the org policy and the deletion value is derived from the global policy.
|
||||
|
||||
| | Global policy | Org policy | Result policy |
|
||||
| ------------------------------ | ------------- | ---------- | ------------- |
|
||||
| Retain for days (Overridable) | 10 (True) | 20 (True) | 20 |
|
||||
| Delete after days (Overridable) | 30 (True) | 40 (True) | 30 |
|
||||
|
||||
#### Example 2
|
||||
In this case, Boundary ignores the org policy values because the global policy values are not overridable.
|
||||
|
||||
| | Global policy | Org policy | Result policy |
|
||||
| ------------------------------ | ------------- | ---------- | ------------- |
|
||||
| Retain for days (Overridable) | 10 (False) | 20 (True) | 10 |
|
||||
| Delete after days (Overridable) | 30 (False) | 40 (True) | 30 |
|
||||
|
||||
#### Example 3
|
||||
In this case, the longest retention value is 30, and the shortest deletion value is 20.
|
||||
However, the `delete_after_days` value cannot be less than the `retain_for_days` value.
|
||||
Therefore, Boundary sets the deletion value to the retention value.
|
||||
|
||||
| | Global policy | Org policy | Result policy |
|
||||
| ------------------------------ | ------------- | ---------- | ------------- |
|
||||
| Retain for days (Overridable) | 30 (True) | 20 (True) | 30 |
|
||||
| Delete after days (Overridable) | 50 (True) | 20 (True) | 30 |
|
||||
|
||||
For more information, refer to the [storage policy attributes](/boundary/docs/concepts/domain-model/storage-policy#attributes) documentation.
|
||||
|
||||
## Service API docs
|
||||
|
||||
@@ -64,4 +113,5 @@ The following services are relevant to this resource:
|
||||
[user]: /boundary/docs/concepts/domain-model/users
|
||||
[organization]: /boundary/docs/concepts/domain-model/scopes#organizations
|
||||
[session]: /boundary/docs/concepts/domain-model/sessions
|
||||
[storage bucket]: /boundary/docs/concepts/domain-model/storage-buckets
|
||||
[storage bucket]: /boundary/docs/concepts/domain-model/storage-buckets
|
||||
[storage policies]: /boundary/docs/concepts/domain-model/storage-policy
|
||||
@@ -0,0 +1,59 @@
|
||||
---
|
||||
layout: docs
|
||||
page_title: Domain model - storage policies
|
||||
description: |-
|
||||
Use storage policies to manage session recording retention in Boundary. Learn how to configure policies for global and org scopes, and specify retention periods.
|
||||
---
|
||||
|
||||
# Storage policies
|
||||
|
||||
<EnterpriseAlert product="boundary">This feature requires <a href="https://www.hashicorp.com/products/boundary">HCP Boundary or Boundary Enterprise</a></EnterpriseAlert>
|
||||
|
||||
A resource known as a storage policy is used to codify how long [session recordings][] must be kept and when they should be deleted.
|
||||
A storage policy's name is optional, but it must be unique if you define one.
|
||||
Storage policies can only be assigned to the global [scope][] or an org scope.
|
||||
|
||||
A storage policy exists in either the global scope or an org scope.
|
||||
Storage policies that are created in the global scope can be associated with any org scope.
|
||||
However, a storage policy created in an org scope can only be associated with that org scope.
|
||||
Any storage policies associated with an org scope are deleted when you delete the org itself.
|
||||
|
||||
## Attributes
|
||||
|
||||
A storage policy has the following configurable attributes:
|
||||
|
||||
- `name` - (Optional) The name of the resource in Boundary.
|
||||
The name is optional, but if you set it, it must be unique within the scope ID.
|
||||
If you do not provide a name, Boundary uses the storage policy ID as the default name.
|
||||
- `description` - (Optional) A description of the resource.
|
||||
- `retain_for_days` - (Optional) The number of days a session recording must be kept.
|
||||
A value of `-1` indicates an infinite retention.
|
||||
- `retain_for_days_overridable` - (Optional) Indicates that a lower scope can override the `retain_for_days` attribute value.
|
||||
The default value is `true`.
|
||||
- `delete_after_days` - (Optional) The number of days after which a session recording should be deleted.
|
||||
- `delete_after_days_overridable` - (Optional) Indicates that a lower scope can override the `delete_after_days` attribute value.
|
||||
The default value is `true`.
|
||||
|
||||
## Retention and deletion guidelines
|
||||
|
||||
- Setting the `retain_for_days` value to `-1` (infinity) requires the `delete_after_days` value to be set to `0`.
|
||||
- If you set the `delete_after_days` value, it must be greater than or equal to 0.
|
||||
- The `delete_after_days` value must be greater than or equal to the `retain_for_days` value, unless you set `delete_after_days` to `0`.
|
||||
- You cannot set the `retain_for_days` and `delete_after_days` values to 0.
|
||||
- Changing an attribute of a storage policy that is assigned to a scope can impact the resultant set of policy.
|
||||
However, such a change only affects future recordings created within that scope or using that storage policy.
|
||||
|
||||
## Referenced by
|
||||
|
||||
- [scopes](/boundary/docs/concepts/domain-model/scopes)
|
||||
- [session recordings](/boundary/docs/concepts/domain-model/session-recordings)
|
||||
|
||||
## Service API docs
|
||||
|
||||
The following services are relevant to this resource:
|
||||
|
||||
- [Scope Service](/boundary/api-docs/scope-service)
|
||||
- [Policy Service](/boundary/api-docs/policy-service)
|
||||
|
||||
[session recordings]: /boundary/docs/concepts/domain-model/session-recordings
|
||||
[scope]: /boundary/docs/concepts/domain-model/scopes
|
||||
Reference in new issue
Block a user