Fix field masking examples (#6193)

Updating field masking examples that were out of date and incorrect.

Signed-off-by: Terry Quigley <77437788+terryquigleysas@users.noreply.github.com>
This commit is contained in:
Terry Quigley 2024-01-22 22:00:17 +00:00 committed by GitHub
parent a258d7951a
commit d41ccb8cd4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 25 additions and 25 deletions

View File

@ -58,14 +58,14 @@ You configure field masking using OpenSearch Dashboards, `roles.yml`, or the RES
```yml
someonerole:
cluster: []
indices:
movies:
_masked_fields_:
- "title"
- "genres"
'*':
- "READ"
index_permissions:
- index_patterns:
- 'movies'
allowed_actions:
- read
masked_fields:
- "title"
- "genres"
```
@ -82,14 +82,14 @@ To specify a different algorithm, add it after the masked field:
```yml
someonerole:
cluster: []
indices:
movies:
_masked_fields_:
- "title::SHA-512"
- "genres"
'*':
- "READ"
index_permissions:
- index_patterns:
- 'movies'
allowed_actions:
- read
masked_fields:
- "title::SHA-512"
- "genres"
```
@ -103,19 +103,19 @@ hr_employee:
- index_patterns:
- 'humanresources'
allowed_actions:
- ...
- read
masked_fields:
- 'lastname::/.*/::*'
- '*ip_source::/[0-9]{1,3}$/::XXX::/^[0-9]{1,3}/::***'
someonerole:
cluster: []
indices:
movies:
_masked_fields_:
- "title::/./::*"
- "genres::/^[a-zA-Z]{1,3}/::XXX::/[a-zA-Z]{1,3}$/::YYY"
'*':
- "READ"
index_permissions:
- index_patterns:
- 'movies'
allowed_actions:
- read
masked_fields:
- "title::/./::*"
- "genres::/^[a-zA-Z]{1,3}/::XXX::/[a-zA-Z]{1,3}$/::YYY"
```