Closed abarz722 closed 2 years ago
Feb 8 17:33:13 debian10 fworch-ui[11975]: 08/02/2022 17:33:13 Audit - AuthenticateUser (Login.razor in line 146): user admin successfully authenticated
Feb 8 17:35:25 debian10 fworch-ui[11975]: 08/02/2022 17:35:25 Warning - Generate report (MainLayout.razor in line 91): No rules found for given criteria
Feb 8 17:39:08 debian10 fworch-ui[11975]: 08/02/2022 17:39:08 Error - API Connection (APIConnection.cs in line 90): Error while sending query to GraphQL API. Caught by GraphQL client library.
Feb 8 17:39:08 debian10 fworch-ui[11975]: Message: field "rule_metadata" not found in type: 'rule_bool_exp'
Feb 8 17:39:08 debian10 fworch-ui[11975]: 08/02/2022 17:39:08 Error - API Connection (APIConnection.cs in line 125): Error while sending query to GraphQL API. Query: fragment networkObjectOverview on object { obj_ip obj_ip_end obj_name obj_id type: stm_obj_typ { id: obj_typ_id name: obj_typ_name } obj_color_id}fragment networkServiceOverview on service { svc_id svc_name svc_uid svc_port svc_port_end service_type: stm_svc_typ { id: svc_typ_id name: svc_typ_name } svc_color_id protocol_name: stm_ip_proto { id: ip_proto_id name: ip_proto_name }}fragment userOverview on usr { user_id user_uid user_name stm_usr_typ { usr_typ_name }}fragment ruleOverview on rule { rule_id rule_uid rule_action section_header: rule_head_text rule_comment rule_track rule_disabled src_zone: zone { zone_name zone_id } rule_metadatum { rule_metadata_id rule_created rule_first_hit rule_last_hit rule_last_modified rule_last_certified rule_last_certifier_dn rule_to_be_removed rule_decert_date rule_recertification_comment } rule_src_neg rule_dst_neg rule_svc_neg rule_num_numeric rule_name access_rule nat_rule xlate_rule rule_froms(where: {object:{obj_create:{_lte:$relevantImportId}, obj_last_seen:{_gte:$relevantImportId}}}) { usr { ...userOverview } object { ...networkObjectOverview } } dst_zone: zoneByRuleToZone { zone_name zone_id } rule_tos(where: {object:{obj_create:{_lte:$relevantImportId}, obj_last_seen:{_gte:$relevantImportId}}}) { object { ...networkObjectOverview } } rule_services(where: {service:{svc_create:{_lte:$relevantImportId}, svc_last_seen:{_gte:$relevantImportId}}}) { service { ...networkServiceOverview } }} query rulesReport ( $limit: Int $offset: Int $mgmId: [Int!] $relevantImportId: bigint $remove0: Boolean! $refdate1: timestamp! ) { management( where: { mgm_id: {_in: $mgmId }, hide_in_gui: {_eq: false } stm_dev_typ:{dev_typ_is_multi_mgmt:{_eq:false} } } order_by: { mgm_name: asc } ) { id: mgm_id name: mgm_name devices ( where: { hide_in_gui: {_eq: false } } order_by: { dev_name: asc } ) { id: dev_id name: dev_name rules( limit: $limit offset: $offset where: { access_rule: {_eq: true} _and: [{_or: [{ device: {dev_id: {_eq:2} }}, { device: {dev_id: {_eq:9} }}]}, {import_control: { control_id: {_lte: $relevantImportId } }, importControlByRuleLastSeen: { control_id: {_gte: $relevantImportId } }}, {_and: [{rule_metadata: {rule_to_be_removed: { _eq: $remove0 }}}, { _or: [ { rule_metadatum: { rule_last_certified: { _lte: $refdate1 } } } { _and:[ { rule_metadatum: { rule_last_certified: { _is_null: true } } } { rule_metadatum: { rule_created: { _lte: $refdate1 } } } ] } ]}] }] } order_by: { rule_num_numeric: asc } ) { mgm_id: mgm_id ...ruleOverview } } } }, variables: {"remove0":"false","refdate1":"2021-12-05 17:39:08","limit":100,"offset":0,"mgmId":2,"relevantImportId":1}
Feb 8 17:39:08 debian10 fworch-ui[11975]: ---
Feb 8 17:39:08 debian10 fworch-ui[11975]: Exception thrown:
Feb 8 17:39:08 debian10 fworch-ui[11975]: Exception
Feb 8 17:39:08 debian10 fworch-ui[11975]: Message:
Feb 8 17:39:08 debian10 fworch-ui[11975]: field "rule_metadata" not found in type: 'rule_bool_exp'
Feb 8 17:39:08 debian10 fworch-ui[11975]:
Feb 8 17:39:08 debian10 fworch-ui[11975]: Stack Trace:
Feb 8 17:39:08 debian10 fworch-ui[11975]: at FWO.ApiClient.APIConnection.SendQueryAsync[QueryResponseType](String query, Object variables, String operationName) in /usr/local/fworch/lib/files/FWO.Api.Client/APIConnection.cs:line 94
Feb 8 17:39:08 debian10 fworch-ui[11975]: 08/02/2022 17:39:08 Error - Generate report (MainLayout.razor in line 116): Unspecified error occured:
Feb 8 17:39:08 debian10 fworch-ui[11975]: ---
Feb 8 17:39:08 debian10 fworch-ui[11975]: Exception thrown:
Feb 8 17:39:08 debian10 fworch-ui[11975]: Exception
Feb 8 17:39:08 debian10 fworch-ui[11975]: Message:
Feb 8 17:39:08 debian10 fworch-ui[11975]: field "rule_metadata" not found in type: 'rule_bool_exp'
Feb 8 17:39:08 debian10 fworch-ui[11975]:
Feb 8 17:39:08 debian10 fworch-ui[11975]: Stack Trace:
Feb 8 17:39:08 debian10 fworch-ui[11975]: at FWO.ApiClient.APIConnection.SendQueryAsync[QueryResponseType](String query, Object variables, String operationName) in /usr/local/fworch/lib/files/FWO.Api.Client/APIConnection.cs:line 94
Feb 8 17:39:08 debian10 fworch-ui[11975]: at FWO.Report.ReportRules.Generate(Int32 rulesPerFetch, APIConnection apiConnection, Func`2 callback, CancellationToken ct) in /usr/local/fworch/lib/files/FWO.Report/ReportRules.cs:line 142
Feb 8 17:39:08 debian10 fworch-ui[11975]: at FWO.Ui.Pages.Certification.GenerateRecertificationReport() in /usr/local/fworch/ui/files/FWO.UI/Pages/Certification.razor:line 226
seems to be an issue in roles/lib/files/FWO.Report.Filter/Ast/AstNodeFilterBool.cs
query.ruleWhereStatement += $"rule_metadata: {{rule_to_be_removed: {{ {ExtractOperator()}: ${queryVarName} }}}}";
will become
query.ruleWhereStatement += $"rule_metadatum: {{rule_to_be_removed: {{ {ExtractOperator()}: ${queryVarName} }}}}";
fixed
when getting rules in recertification mode the following exception is thrown: field "rule_metadata" not found in type: 'rule_bool_exp' -> maybe related to last changes in replace_metadata.json ?