-
Notifications
You must be signed in to change notification settings - Fork 96
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
Creating Index patterns via role #68
Closed
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6e74ddd
Update dashboards.yml. Fix owner and permissions for home folder
ssi444 9925a0c
The validity period of certificates is set to a variable
ssi444 0a5885e
change HOME directory for {{ os_user }} and {{ os_dashboards_user }} …
ssi444 abf770d
auth_type (internal, openid). Custom configs, IaC
ssi444 4b4bf51
readme. description for OpenID, IaC, custom configuration files
ssi444 1ab0815
Added the ability to automatically create ISM policies. The "ISM Poli…
ssi444 db246f4
Added the ability to automatically create index patterns. The "Index …
ssi444 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
# This is the internal user database | ||
# The hash value is a bcrypt hash and can be generated with plugin/tools/hash.sh | ||
|
||
_meta: | ||
type: "internalusers" | ||
config_version: 2 | ||
|
||
# Define your internal users here | ||
|
||
admin: | ||
hash: "{{ admin_password }}" | ||
reserved: true | ||
backend_roles: | ||
- "admin" | ||
description: "admin user" | ||
|
||
kibanaserver: | ||
hash: "{{ kibanaserver_password }}" | ||
reserved: true | ||
description: "kibanaserver user" | ||
|
||
logstash: | ||
hash: "{{ logstash_password }}" | ||
reserved: true | ||
description: "logstash user" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"policy": { | ||
"description": "delete after 30d workflow", | ||
"default_state": "hot", | ||
"schema_version": 1, | ||
"ism_template": { | ||
"index_patterns": [ | ||
"ingress-nginx-*", | ||
"mywebapp-*" | ||
], | ||
"priority": 100 | ||
}, | ||
"states": [ | ||
{ | ||
"name": "hot", | ||
"actions": [ | ||
{ | ||
"replica_count": { | ||
"number_of_replicas": 1 | ||
} | ||
} | ||
], | ||
"transitions": [ | ||
{ | ||
"state_name": "delete", | ||
"conditions": { | ||
"min_index_age": "30d" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "delete", | ||
"actions": [ | ||
{ | ||
"delete": {} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ | ||
"policy": { | ||
"description": "hot (7d) warm (30d) delete (after 30d) workflow", | ||
"default_state": "hot", | ||
"schema_version": 1, | ||
"ism_template": { | ||
"index_patterns": [ | ||
"kube-apiserver-audit-", | ||
"syslog-*" | ||
], | ||
"priority": 100 | ||
}, | ||
"states": [ | ||
{ | ||
"name": "hot", | ||
"actions": [ | ||
{ | ||
"replica_count": { | ||
"number_of_replicas": 1 | ||
} | ||
} | ||
], | ||
"transitions": [ | ||
{ | ||
"state_name": "warm", | ||
"conditions": { | ||
"min_index_age": "7d" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "warm", | ||
"actions": [ | ||
{ | ||
"replica_count": { | ||
"number_of_replicas": 0 | ||
} | ||
} | ||
], | ||
"transitions": [ | ||
{ | ||
"state_name": "delete", | ||
"conditions": { | ||
"min_index_age": "30d" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "delete", | ||
"actions": [ | ||
{ | ||
"delete": {} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
_meta: | ||
type: "roles" | ||
config_version: 2 | ||
|
||
|
||
indexes_full_access: | ||
reserved: false | ||
index_permissions: | ||
- index_patterns: | ||
- "*" | ||
allowed_actions: | ||
- "*" | ||
tenant_permissions: | ||
- tenant_patterns: | ||
- "*" | ||
allowed_actions: | ||
- "kibana_all_write" | ||
# ---------------------------------------------------- | ||
indexes_security_search_full_access: | ||
reserved: true | ||
index_permissions: | ||
- index_patterns: | ||
- "kube-apiserver-audit-*" | ||
- "syslog-*" | ||
allowed_actions: | ||
- "indices:data/read/search*" | ||
- "read" | ||
- "view_index_metadata" | ||
tenant_permissions: | ||
- tenant_patterns: | ||
- "SECURITY" | ||
allowed_actions: | ||
- "kibana_all_write" | ||
# ---------------------------------------------------- | ||
indexes_web_search_full_access: | ||
reserved: true | ||
index_permissions: | ||
- index_patterns: | ||
- "ingress-nginx-*" | ||
- "mywebapp-*" | ||
allowed_actions: | ||
- "indices:data/read/search*" | ||
- "read" | ||
- "view_index_metadata" | ||
tenant_permissions: | ||
- tenant_patterns: | ||
- "WEB" | ||
allowed_actions: | ||
- "kibana_all_write" | ||
# ---------------------------------------------------- | ||
# Restrict users so they can only view visualization and dashboard on OpenSearchDashboards | ||
kibana_read_only: | ||
reserved: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
# In this file users, backendroles and hosts can be mapped to Security roles. | ||
# Permissions for OpenSearch roles are configured in roles.yml | ||
|
||
_meta: | ||
type: "rolesmapping" | ||
config_version: 2 | ||
|
||
kibana_server: | ||
reserved: true | ||
users: | ||
- "kibanaserver" | ||
|
||
logstash: | ||
reserved: true | ||
users: | ||
- "logstash" | ||
|
||
# Define your roles mapping here | ||
all_access: | ||
reserved: false | ||
backend_roles: | ||
- "admin" | ||
- "opensearch_admin" | ||
description: "Maps admin to all_access" | ||
# ---------------------------------------------------- | ||
indexes_full_access: | ||
reserved: false | ||
backend_roles: | ||
- "opensearch_admin" | ||
description: "Maps admin to indexes_full_access" | ||
# ---------------------------------------------------- | ||
own_index: | ||
reserved: false | ||
users: | ||
- "*" | ||
description: "Allow full access to an index named like the username" | ||
# ---------------------------------------------------- | ||
readall: | ||
reserved: false | ||
backend_roles: | ||
- "opensearch_index_read_all" | ||
# ---------------------------------------------------- | ||
indexes_security_search_full_access: | ||
reserved: true | ||
backend_roles: | ||
- "opensearch_index_read_all" | ||
- "opensearch_index_read_security" | ||
description: "Maps users to indexes_security_search_full_access" | ||
# ---------------------------------------------------- | ||
indexes_web_search_full_access: | ||
reserved: true | ||
backend_roles: | ||
- "opensearch_index_read_all" | ||
- "opensearch_index_read_web" | ||
description: "Maps users to indexes_web_search_full_access" | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
_meta: | ||
type: "tenants" | ||
config_version: 2 | ||
|
||
# Define your tenants here | ||
SECURITY: | ||
reserved: false | ||
description: "Tenant for security logs (e.g. kubernetes audit or opensearch audit)" | ||
WEB: | ||
reserved: false | ||
description: "Tenant for web-app logs" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this same as this PR @ssi444 ?
https://github.com/opensearch-project/ansible-playbook/pull/63/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5?