Skip to content

Commit 82b29a3

Browse files
DenisBYmdellweg
authored andcommitted
Updated "Protect Content" documentation regarding the --guard command-line option.
closes #6731
1 parent ed451c6 commit 82b29a3

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

CHANGES/6731.doc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Updated "Protect Content" documentation regarding the `--guard` command-line option.

docs/user/guides/protect-content.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ To set up an RBAC content guard:
2121
1. Create the content guard:
2222

2323
```bash
24-
pulp content-guard rbac create --name rbac
24+
pulp content-guard rbac create --name rbac-guard
2525
```
2626

2727
2. Assign permissions to users and/or groups:
2828

2929
```bash
30-
pulp content-guard rbac assign --name rbac --user alice --user bob --group file-buddies
30+
pulp content-guard rbac assign --name rbac-guard --user alice --user bob --group file-buddies
3131
```
3232

3333
3. Associate the content guard with a distribution:
3434

3535
```bash
36-
pulp file distribution update --name foo --content-guard rbac
36+
pulp file distribution update --name foo --content-guard core:rbac:rbac-guard
3737
```
3838

3939
By default, users/groups need the `core.download_rbaccontenguard` permission to access protected content.
@@ -55,10 +55,10 @@ The header content guard checks for specific HTTP headers in incoming requests.
5555

5656
```bash
5757
# Create a header content guard that only accepts requests with the X-Pulp-User header set to alice
58-
pulp content-guard header create --name header --header-name X-Pulp-User --header-value alice
58+
pulp content-guard header create --name header-guard --header-name X-Pulp-User --header-value alice
5959
6060
# Use a JQ filter to extract the value to check against from the header
61-
pulp content-guard header create --name header --header-name X-Auth-Service --header-value true --jq-filter '.authenticated'
61+
pulp content-guard header create --name header-guard --header-name X-Auth-Service --header-value true --jq-filter '.authenticated'
6262
```
6363

6464
### Composite Content Guard
@@ -67,7 +67,7 @@ The composite content guard combines multiple guards using OR logic - if any of
6767

6868
```bash
6969
# Use different types of content guards, e.g. RBAC and X509
70-
pulp content-guard composite create --name composite --guard rbac --guard x509
70+
pulp content-guard composite create --name composite-guard --guard core:rbac:rbac-guard --guard core:x509:x509-guard
7171
```
7272

7373
### Redirect Content Guard

0 commit comments

Comments
 (0)