-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding ITs to check for Default Role Permissions (#299)
* Adding ITs to check for Default Role Permissions Signed-off-by: Aditya Jindal <[email protected]>
- Loading branch information
1 parent
4801c33
commit ccbc3a1
Showing
4 changed files
with
196 additions
and
10 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
alerting/src/test/kotlin/org/opensearch/alerting/AccessRoles.kt
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,43 @@ | ||
package org.opensearch.alerting | ||
|
||
val ALERTING_ACK_ALERTS = "alerting_ack_alerts" | ||
val ALL_ACCESS_ROLE = "all_access" | ||
val ALERTING_FULL_ACCESS_ROLE = "alerting_full_access" | ||
val ALERTING_READ_ONLY_ACCESS = "alerting_read_access" | ||
val ALERTING_SEARCH_MONITOR_ONLY_ACCESS = "alerting_search_monitor_access" | ||
val ALERTING_SEARCH_EMAIL_ACCOUNT_ACCESS = "alerting_search_email_account_access" | ||
val ALERTING_INDEX_MONITOR_ACCESS = "alerting_index_monitor_access" | ||
val ALERTING_INDEX_EMAIL_GROUP_ACCESS = "alerting_index_email_group_access" | ||
val ALERTING_INDEX_EMAIL_ACCOUNT_ACCESS = "alerting_index_email_account_access" | ||
val ALERTING_INDEX_DESTINATION_ACCESS = "alerting_index_destination_access" | ||
val ALERTING_GET_MONITOR_ACCESS = "alerting_get_monitor_access" | ||
val ALERTING_GET_EMAIL_GROUP_ACCESS = "alerting_get_email_group_access" | ||
val ALERTING_GET_EMAIL_ACCOUNT_ACCESS = "alerting_get_email_account_access" | ||
val ALERTING_GET_DESTINATION_ACCESS = "alerting_get_destination_access" | ||
val ALERTING_GET_ALERTS_ACCESS = "alerting_get_alerts_access" | ||
val ALERTING_EXECUTE_MONITOR_ACCESS = "alerting_execute_monitor_access" | ||
val ALERTING_DELETE_MONITOR_ACCESS = "alerting_delete_monitor_access" | ||
val ALERTING_DELETE_EMAIL_GROUP_ACCESS = "alerting_delete_email_group_access" | ||
val ALERTING_DELETE_EMAIL_ACCOUNT_ACCESS = "alerting_delete_email_account_access" | ||
val ALERTING_DELETE_DESTINATION_ACCESS = "alerting_delete_destination_access" | ||
val ALERTING_ACKNOWLEDGE_ALERT_ACCESS = "alerting_acknowledge_alert_access" | ||
|
||
val ROLE_TO_PERMISSION_MAPPING = mapOf( | ||
ALERTING_SEARCH_MONITOR_ONLY_ACCESS to "cluster:admin/opendistro/alerting/monitor/search", | ||
ALERTING_SEARCH_EMAIL_ACCOUNT_ACCESS to "cluster:admin/opendistro/alerting/destination/email_account/search", | ||
ALERTING_INDEX_MONITOR_ACCESS to "cluster:admin/opendistro/alerting/monitor/write", | ||
ALERTING_INDEX_EMAIL_GROUP_ACCESS to "cluster:admin/opendistro/alerting/destination/email_group/write", | ||
ALERTING_INDEX_EMAIL_ACCOUNT_ACCESS to "cluster:admin/opendistro/alerting/destination/email_account/write", | ||
ALERTING_INDEX_DESTINATION_ACCESS to "cluster:admin/opendistro/alerting/destination/write", | ||
ALERTING_GET_MONITOR_ACCESS to "cluster:admin/opendistro/alerting/monitor/get", | ||
ALERTING_GET_EMAIL_GROUP_ACCESS to "cluster:admin/opendistro/alerting/destination/email_group/get", | ||
ALERTING_GET_EMAIL_ACCOUNT_ACCESS to "cluster:admin/opendistro/alerting/destination/email_account/get", | ||
ALERTING_GET_DESTINATION_ACCESS to "cluster:admin/opendistro/alerting/destination/get", | ||
ALERTING_GET_ALERTS_ACCESS to "cluster:admin/opendistro/alerting/alerts/get", | ||
ALERTING_EXECUTE_MONITOR_ACCESS to "cluster:admin/opendistro/alerting/monitor/execute", | ||
ALERTING_DELETE_MONITOR_ACCESS to "cluster:admin/opendistro/alerting/monitor/delete", | ||
ALERTING_DELETE_EMAIL_GROUP_ACCESS to "cluster:admin/opendistro/alerting/destination/email_group/delete", | ||
ALERTING_DELETE_EMAIL_ACCOUNT_ACCESS to "cluster:admin/opendistro/alerting/destination/email_account/delete", | ||
ALERTING_DELETE_DESTINATION_ACCESS to "cluster:admin/opendistro/alerting/destination/delete", | ||
ALERTING_ACKNOWLEDGE_ALERT_ACCESS to "cluster:admin/opendistro/alerting/alerts/ack" | ||
) |
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
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