From e8737b422312c57d76f5a130833c239b5f2c53e1 Mon Sep 17 00:00:00 2001 From: its-a-feature Date: Mon, 28 Oct 2024 13:32:15 -0500 Subject: [PATCH] updating missing hasura permissions --- .../metadata/metadata/actions.graphql | 53 +++++ hasura-docker/metadata/metadata/actions.yaml | 33 +++ hasura-docker/metadata/metadata/tables.yaml | 200 +++++++++++------- 3 files changed, 211 insertions(+), 75 deletions(-) diff --git a/hasura-docker/metadata/metadata/actions.graphql b/hasura-docker/metadata/metadata/actions.graphql index 67575e453..4045f13f7 100644 --- a/hasura-docker/metadata/metadata/actions.graphql +++ b/hasura-docker/metadata/metadata/actions.graphql @@ -16,6 +16,8 @@ type Mutation { c2_id: Int! file_uuid: String! host_url: String! + alert_on_download: Boolean + remove: Boolean ): c2HostFileOutput } @@ -149,6 +151,7 @@ type Mutation { type Mutation { createTask( command: String! + payload_type: String params: String! files: [String] callback_id: Int @@ -230,6 +233,12 @@ type Mutation { ): dynamicQueryOutput } +type Query { + eventingTestFile( + file_contents: String! + ): eventingTestFileOutput +} + type Mutation { eventingTriggerCancel( eventgroupinstance_id: Int! @@ -255,6 +264,13 @@ type Mutation { ): eventingTriggerRetryOutput } +type Mutation { + eventingTriggerRetryFromStep( + eventstepinstance_id: Int! + retry_all_groups: Boolean + ): eventingTriggerRetryFromStepOutput +} + type Mutation { eventingTriggerRunAgain( eventgroupinstance_id: Int! @@ -387,6 +403,12 @@ type Mutation { ): startStopOutput } +type Mutation { + testProxy( + callbackport_id: Int! + ): testProxyOutput +} + type Mutation { toggleProxy( callbackport_id: Int! @@ -439,6 +461,8 @@ type Mutation { webhook: String admin_id: Int deleted: Boolean + banner_text: String + banner_color: String ): updateOperationOutput } @@ -481,6 +505,7 @@ type Mutation { input OperatorInput { username: String! password: String + email: String bot: Boolean } @@ -556,6 +581,7 @@ type createAPITokenResponse { operator_id: Int name: String created_by: Int + token_type: String } type OperatorOutput { @@ -575,6 +601,7 @@ type OperatorOutput { failed_login_count: Int last_failed_login_timestamp: String account_type: String + email: String } type createPayloadOutput { @@ -715,6 +742,10 @@ type updateCurrentOperationOutput { status: String! error: String operation_id: Int + name: String + complete: Boolean + banner_text: String + banner_color: String } type deleteBlockListOutput { @@ -745,6 +776,10 @@ type generateReportOutput { type previewFileOutput { status: String! error: String + size: Int + host: String + full_remote_path: String + filename: String contents: String } @@ -845,6 +880,8 @@ type updateOperationOutput { webhook: String admin_id: Int deleted: Boolean + banner_text: String + banner_color: String id: Int } @@ -924,6 +961,7 @@ type globalSettingsOutput { type exportCallbackConfigOutput { status: String! error: String + agent_callback_id: String config: String } @@ -1036,3 +1074,18 @@ type containerWriteFileOutput { version: String } +type eventingTriggerRetryFromStepOutput { + status: String! + error: String +} + +type testProxyOutput { + status: String! + error: String +} + +type eventingTestFileOutput { + status: String! + error: String +} + diff --git a/hasura-docker/metadata/metadata/actions.yaml b/hasura-docker/metadata/metadata/actions.yaml index e3c6ee155..625fa8d4c 100644 --- a/hasura-docker/metadata/metadata/actions.yaml +++ b/hasura-docker/metadata/metadata/actions.yaml @@ -331,6 +331,16 @@ actions: - role: operation_admin - role: mythic_admin - role: developer + - name: eventingTestFile + definition: + kind: "" + handler: '{{MYTHIC_ACTIONS_URL_BASE}}/eventing_test_file_webhook' + forward_client_headers: true + permissions: + - role: operator + - role: operation_admin + - role: mythic_admin + - role: developer - name: eventingTriggerCancel definition: kind: synchronous @@ -371,6 +381,16 @@ actions: - role: operation_admin - role: mythic_admin - role: developer + - name: eventingTriggerRetryFromStep + definition: + kind: synchronous + handler: '{{MYTHIC_ACTIONS_URL_BASE}}/eventing_trigger_retry_from_step_webhook' + forward_client_headers: true + permissions: + - role: operator + - role: operation_admin + - role: mythic_admin + - role: developer - name: eventingTriggerRunAgain definition: kind: synchronous @@ -585,6 +605,16 @@ actions: - role: mythic_admin - role: operation_admin - role: operator + - name: testProxy + definition: + kind: synchronous + handler: '{{MYTHIC_ACTIONS_URL_BASE}}/test_proxy_webhook' + forward_client_headers: true + permissions: + - role: operator + - role: operation_admin + - role: mythic_admin + - role: developer - name: toggleProxy definition: kind: synchronous @@ -809,4 +839,7 @@ custom_types: - name: containerListFilesOutput - name: containerUploadFileOutput - name: containerWriteFileOutput + - name: eventingTriggerRetryFromStepOutput + - name: testProxyOutput + - name: eventingTestFileOutput scalars: [] diff --git a/hasura-docker/metadata/metadata/tables.yaml b/hasura-docker/metadata/metadata/tables.yaml index 3c240c686..7eebeb6f8 100644 --- a/hasura-docker/metadata/metadata/tables.yaml +++ b/hasura-docker/metadata/metadata/tables.yaml @@ -144,6 +144,7 @@ - eventstepinstance_id - id - operator_id + - payload_id - task_id - name - token_type @@ -165,6 +166,7 @@ - eventstepinstance_id - id - operator_id + - payload_id - task_id - name - token_type @@ -189,6 +191,7 @@ - eventstepinstance_id - id - operator_id + - payload_id - task_id - name - token_type @@ -210,6 +213,7 @@ - eventstepinstance_id - id - operator_id + - payload_id - task_id - name - token_type @@ -231,6 +235,7 @@ - eventstepinstance_id - id - operator_id + - payload_id - task_id - name - token_type @@ -1677,6 +1682,7 @@ - ip - os - process_name + - process_short_name - sleep_info - user - init_callback @@ -1720,6 +1726,7 @@ - ip - os - process_name + - process_short_name - sleep_info - user - init_callback @@ -1763,6 +1770,7 @@ - ip - os - process_name + - process_short_name - sleep_info - user - init_callback @@ -1806,6 +1814,7 @@ - ip - os - process_name + - process_short_name - sleep_info - user - init_callback @@ -1849,6 +1858,7 @@ - ip - os - process_name + - process_short_name - sleep_info - user - init_callback @@ -2049,6 +2059,7 @@ - metadata - end_timestamp - start_timestamp + - updated_at filter: operation_id: _eq: X-Hasura-current-operation-id @@ -2065,6 +2076,7 @@ - metadata - end_timestamp - start_timestamp + - updated_at filter: operation_id: _eq: X-Hasura-current-operation-id @@ -2081,6 +2093,7 @@ - metadata - end_timestamp - start_timestamp + - updated_at filter: operation_id: _eq: X-Hasura-current-operation-id @@ -2097,6 +2110,7 @@ - metadata - end_timestamp - start_timestamp + - updated_at filter: operation_id: _eq: X-Hasura-current-operation-id @@ -2113,6 +2127,7 @@ - metadata - end_timestamp - start_timestamp + - updated_at filter: operation_id: _eq: X-Hasura-current-operation-id @@ -2136,15 +2151,18 @@ columns: - bytes_received - bytes_sent - - callback_id - deleted + - callback_id - id - local_port - operation_id - - port_type - - remote_ip - remote_port - task_id + - password + - port_type + - remote_ip + - username + - updated_at filter: operation_id: _eq: X-Hasura-current-operation-id @@ -2154,15 +2172,18 @@ columns: - bytes_received - bytes_sent - - callback_id - deleted + - callback_id - id - local_port - operation_id - - port_type - - remote_ip - remote_port - task_id + - password + - port_type + - remote_ip + - username + - updated_at filter: operation_id: _eq: X-Hasura-current-operation-id @@ -2172,15 +2193,18 @@ columns: - bytes_received - bytes_sent - - callback_id - deleted + - callback_id - id - local_port - operation_id - - port_type - - remote_ip - remote_port - task_id + - password + - port_type + - remote_ip + - username + - updated_at filter: operation_id: _eq: X-Hasura-current-operation-id @@ -2190,15 +2214,18 @@ columns: - bytes_received - bytes_sent - - callback_id - deleted + - callback_id - id - local_port - operation_id - - port_type - - remote_ip - remote_port - task_id + - password + - port_type + - remote_ip + - username + - updated_at filter: operation_id: _eq: X-Hasura-current-operation-id @@ -2208,15 +2235,18 @@ columns: - bytes_received - bytes_sent - - callback_id - deleted + - callback_id - id - local_port - operation_id - - port_type - - remote_ip - remote_port - task_id + - password + - port_type + - remote_ip + - username + - updated_at filter: operation_id: _eq: X-Hasura-current-operation-id @@ -2518,112 +2548,117 @@ - role: developer permission: columns: - - id + - choices_are_all_commands + - choices_are_loaded_commands + - required - command_id - - name - - display_name + - id + - ui_position + - choice_filter_by_command_attributes + - choices + - limit_credentials_by_type + - supported_agent_build_parameters + - supported_agents - cli_name - - type - default_value - - choices - description - - supported_agents - - supported_agent_build_parameters - - choice_filter_by_command_attributes - - choices_are_all_commands - - choices_are_loaded_commands + - display_name - dynamic_query_function + - name - parameter_group_name - - required - - ui_position + - type filter: {} - role: mythic_admin permission: columns: - - id + - choices_are_all_commands + - choices_are_loaded_commands + - required - command_id - - name - - display_name + - id + - ui_position + - choice_filter_by_command_attributes + - choices + - limit_credentials_by_type + - supported_agent_build_parameters + - supported_agents - cli_name - - type - default_value - - choices - description - - supported_agents - - supported_agent_build_parameters - - choice_filter_by_command_attributes - - choices_are_all_commands - - choices_are_loaded_commands + - display_name - dynamic_query_function + - name - parameter_group_name - - required - - ui_position + - type filter: {} - role: operation_admin permission: columns: - - id + - choices_are_all_commands + - choices_are_loaded_commands + - required - command_id - - name - - display_name + - id + - ui_position + - choice_filter_by_command_attributes + - choices + - limit_credentials_by_type + - supported_agent_build_parameters + - supported_agents - cli_name - - type - default_value - - choices - description - - supported_agents - - supported_agent_build_parameters - - choice_filter_by_command_attributes - - choices_are_all_commands - - choices_are_loaded_commands + - display_name - dynamic_query_function + - name - parameter_group_name - - required - - ui_position + - type filter: {} - role: operator permission: columns: - - id + - choices_are_all_commands + - choices_are_loaded_commands + - required - command_id - - name - - display_name + - id + - ui_position + - choice_filter_by_command_attributes + - choices + - limit_credentials_by_type + - supported_agent_build_parameters + - supported_agents - cli_name - - type - default_value - - choices - description - - supported_agents - - supported_agent_build_parameters - - choice_filter_by_command_attributes - - choices_are_all_commands - - choices_are_loaded_commands + - display_name - dynamic_query_function + - name - parameter_group_name - - required - - ui_position + - type filter: {} - role: spectator permission: columns: - - id + - choices_are_all_commands + - choices_are_loaded_commands + - required - command_id - - name - - display_name + - id + - ui_position + - choice_filter_by_command_attributes + - choices + - limit_credentials_by_type + - supported_agent_build_parameters + - supported_agents - cli_name - - type - default_value - - choices - description - - supported_agents - - supported_agent_build_parameters - - choice_filter_by_command_attributes - - choices_are_all_commands - - choices_are_loaded_commands + - display_name - dynamic_query_function + - name - parameter_group_name - - required - - ui_position + - type filter: {} - table: name: consuming_container @@ -5003,6 +5038,8 @@ - alert_count - apitokens_id - id + - banner_color + - banner_text - channel - name - webhook @@ -5019,6 +5056,8 @@ - alert_count - apitokens_id - id + - banner_color + - banner_text - channel - name - webhook @@ -5035,6 +5074,8 @@ - alert_count - apitokens_id - id + - banner_color + - banner_text - channel - name - webhook @@ -5051,6 +5092,8 @@ - alert_count - apitokens_id - id + - banner_color + - banner_text - channel - name - webhook @@ -5067,6 +5110,8 @@ - alert_count - apitokens_id - id + - banner_color + - banner_text - channel - name - webhook @@ -6519,6 +6564,7 @@ - deleted - mythic_encrypts - supports_dynamic_loading + - use_display_params_for_cli_history - wrapper - id - message_uuid_length @@ -6540,6 +6586,7 @@ - deleted - mythic_encrypts - supports_dynamic_loading + - use_display_params_for_cli_history - wrapper - id - message_uuid_length @@ -6561,6 +6608,7 @@ - deleted - mythic_encrypts - supports_dynamic_loading + - use_display_params_for_cli_history - wrapper - id - message_uuid_length @@ -6582,6 +6630,7 @@ - deleted - mythic_encrypts - supports_dynamic_loading + - use_display_params_for_cli_history - wrapper - id - message_uuid_length @@ -6603,6 +6652,7 @@ - deleted - mythic_encrypts - supports_dynamic_loading + - use_display_params_for_cli_history - wrapper - id - message_uuid_length