diff --git a/jupiterone/cassettes/TestInlineRuleInstance_Basic.yaml b/jupiterone/cassettes/TestInlineRuleInstance_Basic.yaml index 37b042a8..3b520269 100644 --- a/jupiterone/cassettes/TestInlineRuleInstance_Basic.yaml +++ b/jupiterone/cassettes/TestInlineRuleInstance_Basic.yaml @@ -6,20 +6,20 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1329 + content_length: 1311 transfer_encoding: [] trailer: {} - host: graphql.us.jupiterone.io + host: graphql.dev.jupiterone.io remote_addr: "" request_uri: "" - body: '{"query":"\nmutation CreateInlineQuestionRuleInstance ($instance: CreateInlineQuestionRuleInstanceInput!) {\n\tcreateQuestionRuleInstance: createInlineQuestionRuleInstance(instance: $instance) {\n\t\tid\n\t\tversion\n\t\tspecVersion\n\t\tquestion {\n\t\t\tqueries {\n\t\t\t\tname\n\t\t\t\tquery\n\t\t\t\tversion\n\t\t\t\tincludeDeleted\n\t\t\t}\n\t\t}\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t\tlabels {\n\t\t\tlabelName\n\t\t\tlabelValue\n\t\t}\n\t}\n}\n","variables":{"instance":{"question":{"queries":[{"query":"Find DataStore with classification=(''critical'' or ''sensitive'' or ''confidential'' or ''restricted'') and encrypted!=true","name":"query0","version":"v1","includeDeleted":false}]},"templates":null,"tags":["tf_acc:1","tf_acc:2"],"name":"tf-provider-test-rule","description":"Test","specVersion":1,"operations":[{"when":{"condition":"{{queries.query0.total != 0}}","specVersion":1,"type":"FILTER"},"actions":[{"targetProperty":"alertLevel","targetValue":"HIGH","type":"SET_PROPERTY"},{"type":"CREATE_ALERT"}]}],"outputs":["queries.query0.total","alertLevel"],"pollingInterval":"ONE_WEEK","notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":true,"ignorePreviousResults":false,"remediationSteps":"","collectionId":"","labels":null,"j1Internal":false}},"operationName":"CreateInlineQuestionRuleInstance"}' + body: '{"query":"\nmutation CreateInlineQuestionRuleInstance ($instance: CreateInlineQuestionRuleInstanceInput!) {\n\tcreateQuestionRuleInstance: createInlineQuestionRuleInstance(instance: $instance) {\n\t\tid\n\t\tversion\n\t\tspecVersion\n\t\tquestion {\n\t\t\tqueries {\n\t\t\t\tname\n\t\t\t\tquery\n\t\t\t\tversion\n\t\t\t\tincludeDeleted\n\t\t\t}\n\t\t}\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t\tlabels {\n\t\t\tlabelName\n\t\t\tlabelValue\n\t\t}\n\t}\n}\n","variables":{"instance":{"question":{"queries":[{"query":"Find DataStore with classification=(''critical'' or ''sensitive'' or ''confidential'' or ''restricted'') and encrypted!=true","name":"query0","version":"v1","includeDeleted":false}]},"templates":null,"tags":["tf_acc:1","tf_acc:2"],"name":"tf-provider-test-rule","description":"Test","specVersion":1,"operations":[{"when":{"condition":"{{queries.query0.total != 0}}","specVersion":1,"type":"FILTER"},"actions":[{"targetProperty":"alertLevel","targetValue":"HIGH","type":"SET_PROPERTY"},{"type":"CREATE_ALERT"}]}],"outputs":["queries.query0.total","alertLevel"],"pollingInterval":"ONE_WEEK","notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":true,"ignorePreviousResults":false,"remediationSteps":"","labels":null,"j1Internal":false}},"operationName":"CreateInlineQuestionRuleInstance"}' form: {} headers: Cache-Control: - no-cache Content-Type: - application/json - url: https://graphql.us.jupiterone.io/ + url: https://graphql.dev.jupiterone.io/ method: POST response: proto: HTTP/2.0 @@ -30,7 +30,7 @@ interactions: content_length: 635 uncompressed: false body: | - {"data":{"createQuestionRuleInstance":{"id":"d4ebcdb5-7bea-4e4e-9fd7-fd0b677ea2cc","version":1,"specVersion":1,"question":{"queries":[{"name":"query0","query":"Find DataStore with classification=('critical' or 'sensitive' or 'confidential' or 'restricted') and encrypted!=true","version":"v1","includeDeleted":false}]},"operations":[{"when":{"condition":"{{queries.query0.total != 0}}","specVersion":1,"type":"FILTER"},"actions":[{"targetProperty":"alertLevel","targetValue":"HIGH","type":"SET_PROPERTY","id":"c441b02c-32f3-4059-8786-2ab7de31924e"},{"type":"CREATE_ALERT","id":"468fa7af-c92f-47b5-a795-fe6d44af0d55"}]}],"labels":[]}}} + {"data":{"createQuestionRuleInstance":{"id":"d3052389-8599-439e-a9e8-f1827ef4eacc","version":1,"specVersion":1,"question":{"queries":[{"name":"query0","query":"Find DataStore with classification=('critical' or 'sensitive' or 'confidential' or 'restricted') and encrypted!=true","version":"v1","includeDeleted":false}]},"operations":[{"when":{"condition":"{{queries.query0.total != 0}}","specVersion":1,"type":"FILTER"},"actions":[{"targetProperty":"alertLevel","targetValue":"HIGH","type":"SET_PROPERTY","id":"321601b9-fa1b-406a-8739-3eafdd7c9cd2"},{"type":"CREATE_ALERT","id":"4091bf3c-af3d-409b-a599-c877227ed2ca"}]}],"labels":[]}}} headers: Access-Control-Allow-Credentials: - "true" @@ -78,26 +78,26 @@ interactions: - "0" status: 200 OK code: 200 - duration: 1.028570958s + duration: 1.083248209s - id: 1 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 632 + content_length: 650 transfer_encoding: [] trailer: {} - host: graphql.us.jupiterone.io + host: graphql.dev.jupiterone.io remote_addr: "" request_uri: "" - body: '{"query":"\nquery GetQuestionRuleInstance ($id: ID!) {\n\tquestionRuleInstance(id: $id) {\n\t\tid\n\t\tname\n\t\tdescription\n\t\tversion\n\t\tspecVersion\n\t\tlatest\n\t\tpollingInterval\n\t\tdeleted\n\t\ttype\n\t\ttemplates\n\t\tnotifyOnFailure\n\t\ttriggerActionsOnNewEntitiesOnly\n\t\tignorePreviousResults\n\t\tquestionId\n\t\tquestion {\n\t\t\tqueries {\n\t\t\t\tname\n\t\t\t\tquery\n\t\t\t\tversion\n\t\t\t\tincludeDeleted\n\t\t\t}\n\t\t}\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t\toutputs\n\t\ttags\n\t}\n}\n","variables":{"id":"d4ebcdb5-7bea-4e4e-9fd7-fd0b677ea2cc"},"operationName":"GetQuestionRuleInstance"}' + body: '{"query":"\nquery GetQuestionRuleInstance ($id: ID!) {\n\tquestionRuleInstance(id: $id) {\n\t\tid\n\t\tname\n\t\tcollectionId\n\t\tdescription\n\t\tversion\n\t\tspecVersion\n\t\tlatest\n\t\tpollingInterval\n\t\tdeleted\n\t\ttype\n\t\ttemplates\n\t\tnotifyOnFailure\n\t\ttriggerActionsOnNewEntitiesOnly\n\t\tignorePreviousResults\n\t\tquestionId\n\t\tquestion {\n\t\t\tqueries {\n\t\t\t\tname\n\t\t\t\tquery\n\t\t\t\tversion\n\t\t\t\tincludeDeleted\n\t\t\t}\n\t\t}\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t\toutputs\n\t\ttags\n\t}\n}\n","variables":{"id":"d3052389-8599-439e-a9e8-f1827ef4eacc"},"operationName":"GetQuestionRuleInstance"}' form: {} headers: Cache-Control: - no-cache Content-Type: - application/json - url: https://graphql.us.jupiterone.io/ + url: https://graphql.dev.jupiterone.io/ method: POST response: proto: HTTP/2.0 @@ -105,15 +105,15 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 953 + content_length: 973 uncompressed: false body: | - {"data":{"questionRuleInstance":{"id":"d4ebcdb5-7bea-4e4e-9fd7-fd0b677ea2cc","name":"tf-provider-test-rule","description":"Test","version":1,"specVersion":1,"latest":true,"pollingInterval":"ONE_WEEK","deleted":false,"type":"QUESTION","templates":null,"notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":true,"ignorePreviousResults":false,"questionId":null,"question":{"queries":[{"name":"query0","query":"Find DataStore with classification=('critical' or 'sensitive' or 'confidential' or 'restricted') and encrypted!=true","version":"v1","includeDeleted":false}]},"operations":[{"when":{"type":"FILTER","condition":"{{queries.query0.total != 0}}","specVersion":1},"actions":[{"targetValue":"HIGH","id":"c441b02c-32f3-4059-8786-2ab7de31924e","type":"SET_PROPERTY","targetProperty":"alertLevel"},{"type":"CREATE_ALERT","id":"468fa7af-c92f-47b5-a795-fe6d44af0d55"}]}],"outputs":["queries.query0.total","alertLevel"],"tags":["tf_acc:1","tf_acc:2"]}}} + {"data":{"questionRuleInstance":{"id":"d3052389-8599-439e-a9e8-f1827ef4eacc","name":"tf-provider-test-rule","collectionId":null,"description":"Test","version":1,"specVersion":1,"latest":true,"pollingInterval":"ONE_WEEK","deleted":false,"type":"QUESTION","templates":null,"notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":true,"ignorePreviousResults":false,"questionId":null,"question":{"queries":[{"name":"query0","query":"Find DataStore with classification=('critical' or 'sensitive' or 'confidential' or 'restricted') and encrypted!=true","version":"v1","includeDeleted":false}]},"operations":[{"when":{"type":"FILTER","condition":"{{queries.query0.total != 0}}","specVersion":1},"actions":[{"targetValue":"HIGH","id":"321601b9-fa1b-406a-8739-3eafdd7c9cd2","type":"SET_PROPERTY","targetProperty":"alertLevel"},{"type":"CREATE_ALERT","id":"4091bf3c-af3d-409b-a599-c877227ed2ca"}]}],"outputs":["queries.query0.total","alertLevel"],"tags":["tf_acc:1","tf_acc:2"]}}} headers: Access-Control-Allow-Credentials: - "true" Content-Length: - - "953" + - "973" Content-Security-Policy: - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self'' https: data:;form-action ''self'';frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests' Content-Type: @@ -156,26 +156,26 @@ interactions: - "0" status: 200 OK code: 200 - duration: 194.109083ms + duration: 156.837583ms - id: 2 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 632 + content_length: 650 transfer_encoding: [] trailer: {} - host: graphql.us.jupiterone.io + host: graphql.dev.jupiterone.io remote_addr: "" request_uri: "" - body: '{"query":"\nquery GetQuestionRuleInstance ($id: ID!) {\n\tquestionRuleInstance(id: $id) {\n\t\tid\n\t\tname\n\t\tdescription\n\t\tversion\n\t\tspecVersion\n\t\tlatest\n\t\tpollingInterval\n\t\tdeleted\n\t\ttype\n\t\ttemplates\n\t\tnotifyOnFailure\n\t\ttriggerActionsOnNewEntitiesOnly\n\t\tignorePreviousResults\n\t\tquestionId\n\t\tquestion {\n\t\t\tqueries {\n\t\t\t\tname\n\t\t\t\tquery\n\t\t\t\tversion\n\t\t\t\tincludeDeleted\n\t\t\t}\n\t\t}\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t\toutputs\n\t\ttags\n\t}\n}\n","variables":{"id":"d4ebcdb5-7bea-4e4e-9fd7-fd0b677ea2cc"},"operationName":"GetQuestionRuleInstance"}' + body: '{"query":"\nquery GetQuestionRuleInstance ($id: ID!) {\n\tquestionRuleInstance(id: $id) {\n\t\tid\n\t\tname\n\t\tcollectionId\n\t\tdescription\n\t\tversion\n\t\tspecVersion\n\t\tlatest\n\t\tpollingInterval\n\t\tdeleted\n\t\ttype\n\t\ttemplates\n\t\tnotifyOnFailure\n\t\ttriggerActionsOnNewEntitiesOnly\n\t\tignorePreviousResults\n\t\tquestionId\n\t\tquestion {\n\t\t\tqueries {\n\t\t\t\tname\n\t\t\t\tquery\n\t\t\t\tversion\n\t\t\t\tincludeDeleted\n\t\t\t}\n\t\t}\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t\toutputs\n\t\ttags\n\t}\n}\n","variables":{"id":"d3052389-8599-439e-a9e8-f1827ef4eacc"},"operationName":"GetQuestionRuleInstance"}' form: {} headers: Cache-Control: - no-cache Content-Type: - application/json - url: https://graphql.us.jupiterone.io/ + url: https://graphql.dev.jupiterone.io/ method: POST response: proto: HTTP/2.0 @@ -183,15 +183,15 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 953 + content_length: 973 uncompressed: false body: | - {"data":{"questionRuleInstance":{"id":"d4ebcdb5-7bea-4e4e-9fd7-fd0b677ea2cc","name":"tf-provider-test-rule","description":"Test","version":1,"specVersion":1,"latest":true,"pollingInterval":"ONE_WEEK","deleted":false,"type":"QUESTION","templates":null,"notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":true,"ignorePreviousResults":false,"questionId":null,"question":{"queries":[{"name":"query0","query":"Find DataStore with classification=('critical' or 'sensitive' or 'confidential' or 'restricted') and encrypted!=true","version":"v1","includeDeleted":false}]},"operations":[{"when":{"type":"FILTER","condition":"{{queries.query0.total != 0}}","specVersion":1},"actions":[{"targetValue":"HIGH","id":"c441b02c-32f3-4059-8786-2ab7de31924e","type":"SET_PROPERTY","targetProperty":"alertLevel"},{"type":"CREATE_ALERT","id":"468fa7af-c92f-47b5-a795-fe6d44af0d55"}]}],"outputs":["queries.query0.total","alertLevel"],"tags":["tf_acc:1","tf_acc:2"]}}} + {"data":{"questionRuleInstance":{"id":"d3052389-8599-439e-a9e8-f1827ef4eacc","name":"tf-provider-test-rule","collectionId":null,"description":"Test","version":1,"specVersion":1,"latest":true,"pollingInterval":"ONE_WEEK","deleted":false,"type":"QUESTION","templates":null,"notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":true,"ignorePreviousResults":false,"questionId":null,"question":{"queries":[{"name":"query0","query":"Find DataStore with classification=('critical' or 'sensitive' or 'confidential' or 'restricted') and encrypted!=true","version":"v1","includeDeleted":false}]},"operations":[{"when":{"type":"FILTER","condition":"{{queries.query0.total != 0}}","specVersion":1},"actions":[{"targetValue":"HIGH","id":"321601b9-fa1b-406a-8739-3eafdd7c9cd2","type":"SET_PROPERTY","targetProperty":"alertLevel"},{"type":"CREATE_ALERT","id":"4091bf3c-af3d-409b-a599-c877227ed2ca"}]}],"outputs":["queries.query0.total","alertLevel"],"tags":["tf_acc:1","tf_acc:2"]}}} headers: Access-Control-Allow-Credentials: - "true" Content-Length: - - "953" + - "973" Content-Security-Policy: - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self'' https: data:;form-action ''self'';frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests' Content-Type: @@ -234,26 +234,26 @@ interactions: - "0" status: 200 OK code: 200 - duration: 187.93225ms + duration: 460.636292ms - id: 3 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1073 + content_length: 1055 transfer_encoding: [] trailer: {} - host: graphql.us.jupiterone.io + host: graphql.dev.jupiterone.io remote_addr: "" request_uri: "" - body: '{"query":"\nmutation UpdateInlineQuestionRuleInstance ($instance: UpdateInlineQuestionRuleInstanceInput!) {\n\tupdateInlineQuestionRuleInstance(instance: $instance) {\n\t\tversion\n\t\tspecVersion\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t}\n}\n","variables":{"instance":{"question":{"queries":[{"query":"Find DataStore with classification=(''critical'' or ''sensitive'' or ''confidential'' or ''restricted'') and encrypted!=true","name":"query0","version":"v1","includeDeleted":false}]},"id":"d4ebcdb5-7bea-4e4e-9fd7-fd0b677ea2cc","version":1,"state":{"actions":null},"templates":null,"tags":["tf_acc:1","tf_acc:2"],"name":"tf-provider-test-rule","description":"Test","specVersion":1,"operations":[{"actions":[{"targetProperty":"alertLevel","targetValue":"HIGH","type":"SET_PROPERTY"},{"type":"CREATE_ALERT"}]}],"outputs":["queries.query0.total","alertLevel"],"pollingInterval":"ONE_WEEK","notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":true,"ignorePreviousResults":false,"collectionId":"","labels":null}},"operationName":"UpdateInlineQuestionRuleInstance"}' + body: '{"query":"\nmutation UpdateInlineQuestionRuleInstance ($instance: UpdateInlineQuestionRuleInstanceInput!) {\n\tupdateInlineQuestionRuleInstance(instance: $instance) {\n\t\tversion\n\t\tspecVersion\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t}\n}\n","variables":{"instance":{"question":{"queries":[{"query":"Find DataStore with classification=(''critical'' or ''sensitive'' or ''confidential'' or ''restricted'') and encrypted!=true","name":"query0","version":"v1","includeDeleted":false}]},"id":"d3052389-8599-439e-a9e8-f1827ef4eacc","version":1,"state":{"actions":null},"templates":null,"tags":["tf_acc:1","tf_acc:2"],"name":"tf-provider-test-rule","description":"Test","specVersion":1,"operations":[{"actions":[{"targetProperty":"alertLevel","targetValue":"HIGH","type":"SET_PROPERTY"},{"type":"CREATE_ALERT"}]}],"outputs":["queries.query0.total","alertLevel"],"pollingInterval":"ONE_WEEK","notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":true,"ignorePreviousResults":false,"labels":null}},"operationName":"UpdateInlineQuestionRuleInstance"}' form: {} headers: Cache-Control: - no-cache Content-Type: - application/json - url: https://graphql.us.jupiterone.io/ + url: https://graphql.dev.jupiterone.io/ method: POST response: proto: HTTP/2.0 @@ -264,7 +264,7 @@ interactions: content_length: 304 uncompressed: false body: | - {"data":{"updateInlineQuestionRuleInstance":{"version":2,"specVersion":1,"operations":[{"when":null,"actions":[{"targetProperty":"alertLevel","targetValue":"HIGH","type":"SET_PROPERTY","id":"595397fc-f7f5-4fbd-936b-1a7ad5ae88ae"},{"type":"CREATE_ALERT","id":"69e7809d-8003-44d8-9a9b-d277868e079a"}]}]}}} + {"data":{"updateInlineQuestionRuleInstance":{"version":2,"specVersion":1,"operations":[{"when":null,"actions":[{"targetProperty":"alertLevel","targetValue":"HIGH","type":"SET_PROPERTY","id":"156ae2d8-a80f-4087-9602-00b66389631a"},{"type":"CREATE_ALERT","id":"fc2aff5f-9c5e-4234-b490-2bbfef32383b"}]}]}}} headers: Access-Control-Allow-Credentials: - "true" @@ -312,26 +312,26 @@ interactions: - "0" status: 200 OK code: 200 - duration: 629.056375ms + duration: 529.386458ms - id: 4 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 632 + content_length: 650 transfer_encoding: [] trailer: {} - host: graphql.us.jupiterone.io + host: graphql.dev.jupiterone.io remote_addr: "" request_uri: "" - body: '{"query":"\nquery GetQuestionRuleInstance ($id: ID!) {\n\tquestionRuleInstance(id: $id) {\n\t\tid\n\t\tname\n\t\tdescription\n\t\tversion\n\t\tspecVersion\n\t\tlatest\n\t\tpollingInterval\n\t\tdeleted\n\t\ttype\n\t\ttemplates\n\t\tnotifyOnFailure\n\t\ttriggerActionsOnNewEntitiesOnly\n\t\tignorePreviousResults\n\t\tquestionId\n\t\tquestion {\n\t\t\tqueries {\n\t\t\t\tname\n\t\t\t\tquery\n\t\t\t\tversion\n\t\t\t\tincludeDeleted\n\t\t\t}\n\t\t}\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t\toutputs\n\t\ttags\n\t}\n}\n","variables":{"id":"d4ebcdb5-7bea-4e4e-9fd7-fd0b677ea2cc"},"operationName":"GetQuestionRuleInstance"}' + body: '{"query":"\nquery GetQuestionRuleInstance ($id: ID!) {\n\tquestionRuleInstance(id: $id) {\n\t\tid\n\t\tname\n\t\tcollectionId\n\t\tdescription\n\t\tversion\n\t\tspecVersion\n\t\tlatest\n\t\tpollingInterval\n\t\tdeleted\n\t\ttype\n\t\ttemplates\n\t\tnotifyOnFailure\n\t\ttriggerActionsOnNewEntitiesOnly\n\t\tignorePreviousResults\n\t\tquestionId\n\t\tquestion {\n\t\t\tqueries {\n\t\t\t\tname\n\t\t\t\tquery\n\t\t\t\tversion\n\t\t\t\tincludeDeleted\n\t\t\t}\n\t\t}\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t\toutputs\n\t\ttags\n\t}\n}\n","variables":{"id":"d3052389-8599-439e-a9e8-f1827ef4eacc"},"operationName":"GetQuestionRuleInstance"}' form: {} headers: Cache-Control: - no-cache Content-Type: - application/json - url: https://graphql.us.jupiterone.io/ + url: https://graphql.dev.jupiterone.io/ method: POST response: proto: HTTP/2.0 @@ -339,15 +339,15 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 880 + content_length: 900 uncompressed: false body: | - {"data":{"questionRuleInstance":{"id":"d4ebcdb5-7bea-4e4e-9fd7-fd0b677ea2cc","name":"tf-provider-test-rule","description":"Test","version":2,"specVersion":1,"latest":true,"pollingInterval":"ONE_WEEK","deleted":false,"type":"QUESTION","templates":null,"notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":true,"ignorePreviousResults":false,"questionId":null,"question":{"queries":[{"name":"query0","query":"Find DataStore with classification=('critical' or 'sensitive' or 'confidential' or 'restricted') and encrypted!=true","version":"v1","includeDeleted":false}]},"operations":[{"when":null,"actions":[{"targetValue":"HIGH","id":"595397fc-f7f5-4fbd-936b-1a7ad5ae88ae","type":"SET_PROPERTY","targetProperty":"alertLevel"},{"type":"CREATE_ALERT","id":"69e7809d-8003-44d8-9a9b-d277868e079a"}]}],"outputs":["queries.query0.total","alertLevel"],"tags":["tf_acc:1","tf_acc:2"]}}} + {"data":{"questionRuleInstance":{"id":"d3052389-8599-439e-a9e8-f1827ef4eacc","name":"tf-provider-test-rule","collectionId":null,"description":"Test","version":2,"specVersion":1,"latest":true,"pollingInterval":"ONE_WEEK","deleted":false,"type":"QUESTION","templates":null,"notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":true,"ignorePreviousResults":false,"questionId":null,"question":{"queries":[{"name":"query0","query":"Find DataStore with classification=('critical' or 'sensitive' or 'confidential' or 'restricted') and encrypted!=true","version":"v1","includeDeleted":false}]},"operations":[{"when":null,"actions":[{"targetValue":"HIGH","id":"156ae2d8-a80f-4087-9602-00b66389631a","type":"SET_PROPERTY","targetProperty":"alertLevel"},{"type":"CREATE_ALERT","id":"fc2aff5f-9c5e-4234-b490-2bbfef32383b"}]}],"outputs":["queries.query0.total","alertLevel"],"tags":["tf_acc:1","tf_acc:2"]}}} headers: Access-Control-Allow-Credentials: - "true" Content-Length: - - "880" + - "900" Content-Security-Policy: - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self'' https: data:;form-action ''self'';frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests' Content-Type: @@ -390,7 +390,7 @@ interactions: - "0" status: 200 OK code: 200 - duration: 201.418416ms + duration: 442.071125ms - id: 5 request: proto: HTTP/1.1 @@ -399,17 +399,17 @@ interactions: content_length: 200 transfer_encoding: [] trailer: {} - host: graphql.us.jupiterone.io + host: graphql.dev.jupiterone.io remote_addr: "" request_uri: "" - body: '{"query":"\nmutation DeleteRuleInstance ($id: ID!) {\n\tdeleteRuleInstance(id: $id) {\n\t\tid\n\t}\n}\n","variables":{"id":"d4ebcdb5-7bea-4e4e-9fd7-fd0b677ea2cc"},"operationName":"DeleteRuleInstance"}' + body: '{"query":"\nmutation DeleteRuleInstance ($id: ID!) {\n\tdeleteRuleInstance(id: $id) {\n\t\tid\n\t}\n}\n","variables":{"id":"d3052389-8599-439e-a9e8-f1827ef4eacc"},"operationName":"DeleteRuleInstance"}' form: {} headers: Cache-Control: - no-cache Content-Type: - application/json - url: https://graphql.us.jupiterone.io/ + url: https://graphql.dev.jupiterone.io/ method: POST response: proto: HTTP/2.0 @@ -420,7 +420,7 @@ interactions: content_length: 78 uncompressed: false body: | - {"data":{"deleteRuleInstance":{"id":"d4ebcdb5-7bea-4e4e-9fd7-fd0b677ea2cc"}}} + {"data":{"deleteRuleInstance":{"id":"d3052389-8599-439e-a9e8-f1827ef4eacc"}}} headers: Access-Control-Allow-Credentials: - "true" @@ -468,4 +468,4 @@ interactions: - "0" status: 200 OK code: 200 - duration: 234.444ms + duration: 200.050292ms diff --git a/jupiterone/cassettes/TestInlineRuleInstance_BasicImport.yaml b/jupiterone/cassettes/TestInlineRuleInstance_BasicImport.yaml index e4bbe97d..0fd0941f 100644 --- a/jupiterone/cassettes/TestInlineRuleInstance_BasicImport.yaml +++ b/jupiterone/cassettes/TestInlineRuleInstance_BasicImport.yaml @@ -6,20 +6,20 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1132 + content_length: 1114 transfer_encoding: [] trailer: {} - host: graphql.us.jupiterone.io + host: graphql.dev.jupiterone.io remote_addr: "" request_uri: "" - body: '{"query":"\nmutation CreateInlineQuestionRuleInstance ($instance: CreateInlineQuestionRuleInstanceInput!) {\n\tcreateQuestionRuleInstance: createInlineQuestionRuleInstance(instance: $instance) {\n\t\tid\n\t\tversion\n\t\tspecVersion\n\t\tquestion {\n\t\t\tqueries {\n\t\t\t\tname\n\t\t\t\tquery\n\t\t\t\tversion\n\t\t\t\tincludeDeleted\n\t\t\t}\n\t\t}\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t\tlabels {\n\t\t\tlabelName\n\t\t\tlabelValue\n\t\t}\n\t}\n}\n","variables":{"instance":{"question":{"queries":[{"query":"Find DataStore with classification=(''critical'' or ''sensitive'' or ''confidential'' or ''restricted'') and encrypted!=true","name":"query0","version":"v1","includeDeleted":false}]},"templates":null,"tags":["tf_acc:1","tf_acc:2"],"name":"tf-provider-test-rule","description":"test","specVersion":1,"operations":[],"outputs":["queries.query0.total","alertLevel"],"pollingInterval":"ONE_DAY","notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":false,"ignorePreviousResults":false,"remediationSteps":"","collectionId":"","labels":null,"j1Internal":false}},"operationName":"CreateInlineQuestionRuleInstance"}' + body: '{"query":"\nmutation CreateInlineQuestionRuleInstance ($instance: CreateInlineQuestionRuleInstanceInput!) {\n\tcreateQuestionRuleInstance: createInlineQuestionRuleInstance(instance: $instance) {\n\t\tid\n\t\tversion\n\t\tspecVersion\n\t\tquestion {\n\t\t\tqueries {\n\t\t\t\tname\n\t\t\t\tquery\n\t\t\t\tversion\n\t\t\t\tincludeDeleted\n\t\t\t}\n\t\t}\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t\tlabels {\n\t\t\tlabelName\n\t\t\tlabelValue\n\t\t}\n\t}\n}\n","variables":{"instance":{"question":{"queries":[{"query":"Find DataStore with classification=(''critical'' or ''sensitive'' or ''confidential'' or ''restricted'') and encrypted!=true","name":"query0","version":"v1","includeDeleted":false}]},"templates":null,"tags":["tf_acc:1","tf_acc:2"],"name":"tf-provider-test-rule","description":"test","specVersion":1,"operations":[],"outputs":["queries.query0.total","alertLevel"],"pollingInterval":"ONE_DAY","notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":false,"ignorePreviousResults":false,"remediationSteps":"","labels":null,"j1Internal":false}},"operationName":"CreateInlineQuestionRuleInstance"}' form: {} headers: Cache-Control: - no-cache Content-Type: - application/json - url: https://graphql.us.jupiterone.io/ + url: https://graphql.dev.jupiterone.io/ method: POST response: proto: HTTP/2.0 @@ -30,7 +30,7 @@ interactions: content_length: 350 uncompressed: false body: | - {"data":{"createQuestionRuleInstance":{"id":"81a8c676-7155-4f4f-b755-9eab08be21ea","version":1,"specVersion":1,"question":{"queries":[{"name":"query0","query":"Find DataStore with classification=('critical' or 'sensitive' or 'confidential' or 'restricted') and encrypted!=true","version":"v1","includeDeleted":false}]},"operations":[],"labels":[]}}} + {"data":{"createQuestionRuleInstance":{"id":"2cb574d2-0cf1-4f41-8b57-bfca2a6eb5cc","version":1,"specVersion":1,"question":{"queries":[{"name":"query0","query":"Find DataStore with classification=('critical' or 'sensitive' or 'confidential' or 'restricted') and encrypted!=true","version":"v1","includeDeleted":false}]},"operations":[],"labels":[]}}} headers: Access-Control-Allow-Credentials: - "true" @@ -78,26 +78,26 @@ interactions: - "0" status: 200 OK code: 200 - duration: 609.287625ms + duration: 746.634084ms - id: 1 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 632 + content_length: 650 transfer_encoding: [] trailer: {} - host: graphql.us.jupiterone.io + host: graphql.dev.jupiterone.io remote_addr: "" request_uri: "" - body: '{"query":"\nquery GetQuestionRuleInstance ($id: ID!) {\n\tquestionRuleInstance(id: $id) {\n\t\tid\n\t\tname\n\t\tdescription\n\t\tversion\n\t\tspecVersion\n\t\tlatest\n\t\tpollingInterval\n\t\tdeleted\n\t\ttype\n\t\ttemplates\n\t\tnotifyOnFailure\n\t\ttriggerActionsOnNewEntitiesOnly\n\t\tignorePreviousResults\n\t\tquestionId\n\t\tquestion {\n\t\t\tqueries {\n\t\t\t\tname\n\t\t\t\tquery\n\t\t\t\tversion\n\t\t\t\tincludeDeleted\n\t\t\t}\n\t\t}\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t\toutputs\n\t\ttags\n\t}\n}\n","variables":{"id":"81a8c676-7155-4f4f-b755-9eab08be21ea"},"operationName":"GetQuestionRuleInstance"}' + body: '{"query":"\nquery GetQuestionRuleInstance ($id: ID!) {\n\tquestionRuleInstance(id: $id) {\n\t\tid\n\t\tname\n\t\tcollectionId\n\t\tdescription\n\t\tversion\n\t\tspecVersion\n\t\tlatest\n\t\tpollingInterval\n\t\tdeleted\n\t\ttype\n\t\ttemplates\n\t\tnotifyOnFailure\n\t\ttriggerActionsOnNewEntitiesOnly\n\t\tignorePreviousResults\n\t\tquestionId\n\t\tquestion {\n\t\t\tqueries {\n\t\t\t\tname\n\t\t\t\tquery\n\t\t\t\tversion\n\t\t\t\tincludeDeleted\n\t\t\t}\n\t\t}\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t\toutputs\n\t\ttags\n\t}\n}\n","variables":{"id":"2cb574d2-0cf1-4f41-8b57-bfca2a6eb5cc"},"operationName":"GetQuestionRuleInstance"}' form: {} headers: Cache-Control: - no-cache Content-Type: - application/json - url: https://graphql.us.jupiterone.io/ + url: https://graphql.dev.jupiterone.io/ method: POST response: proto: HTTP/2.0 @@ -105,15 +105,15 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 668 + content_length: 688 uncompressed: false body: | - {"data":{"questionRuleInstance":{"id":"81a8c676-7155-4f4f-b755-9eab08be21ea","name":"tf-provider-test-rule","description":"test","version":1,"specVersion":1,"latest":true,"pollingInterval":"ONE_DAY","deleted":false,"type":"QUESTION","templates":null,"notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":false,"ignorePreviousResults":false,"questionId":null,"question":{"queries":[{"name":"query0","query":"Find DataStore with classification=('critical' or 'sensitive' or 'confidential' or 'restricted') and encrypted!=true","version":"v1","includeDeleted":false}]},"operations":[],"outputs":["queries.query0.total","alertLevel"],"tags":["tf_acc:1","tf_acc:2"]}}} + {"data":{"questionRuleInstance":{"id":"2cb574d2-0cf1-4f41-8b57-bfca2a6eb5cc","name":"tf-provider-test-rule","collectionId":null,"description":"test","version":1,"specVersion":1,"latest":true,"pollingInterval":"ONE_DAY","deleted":false,"type":"QUESTION","templates":null,"notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":false,"ignorePreviousResults":false,"questionId":null,"question":{"queries":[{"name":"query0","query":"Find DataStore with classification=('critical' or 'sensitive' or 'confidential' or 'restricted') and encrypted!=true","version":"v1","includeDeleted":false}]},"operations":[],"outputs":["queries.query0.total","alertLevel"],"tags":["tf_acc:1","tf_acc:2"]}}} headers: Access-Control-Allow-Credentials: - "true" Content-Length: - - "668" + - "688" Content-Security-Policy: - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self'' https: data:;form-action ''self'';frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests' Content-Type: @@ -156,7 +156,7 @@ interactions: - "0" status: 200 OK code: 200 - duration: 188.905125ms + duration: 219.746958ms - id: 2 request: proto: HTTP/1.1 @@ -165,17 +165,17 @@ interactions: content_length: 200 transfer_encoding: [] trailer: {} - host: graphql.us.jupiterone.io + host: graphql.dev.jupiterone.io remote_addr: "" request_uri: "" - body: '{"query":"\nmutation DeleteRuleInstance ($id: ID!) {\n\tdeleteRuleInstance(id: $id) {\n\t\tid\n\t}\n}\n","variables":{"id":"81a8c676-7155-4f4f-b755-9eab08be21ea"},"operationName":"DeleteRuleInstance"}' + body: '{"query":"\nmutation DeleteRuleInstance ($id: ID!) {\n\tdeleteRuleInstance(id: $id) {\n\t\tid\n\t}\n}\n","variables":{"id":"2cb574d2-0cf1-4f41-8b57-bfca2a6eb5cc"},"operationName":"DeleteRuleInstance"}' form: {} headers: Cache-Control: - no-cache Content-Type: - application/json - url: https://graphql.us.jupiterone.io/ + url: https://graphql.dev.jupiterone.io/ method: POST response: proto: HTTP/2.0 @@ -186,7 +186,7 @@ interactions: content_length: 78 uncompressed: false body: | - {"data":{"deleteRuleInstance":{"id":"81a8c676-7155-4f4f-b755-9eab08be21ea"}}} + {"data":{"deleteRuleInstance":{"id":"2cb574d2-0cf1-4f41-8b57-bfca2a6eb5cc"}}} headers: Access-Control-Allow-Credentials: - "true" @@ -234,4 +234,4 @@ interactions: - "0" status: 200 OK code: 200 - duration: 200.725ms + duration: 228.711917ms diff --git a/jupiterone/cassettes/TestReferencedQuestionRule_Basic.yaml b/jupiterone/cassettes/TestReferencedQuestionRule_Basic.yaml index 1f772abb..f3914ef9 100644 --- a/jupiterone/cassettes/TestReferencedQuestionRule_Basic.yaml +++ b/jupiterone/cassettes/TestReferencedQuestionRule_Basic.yaml @@ -9,7 +9,7 @@ interactions: content_length: 601 transfer_encoding: [] trailer: {} - host: graphql.us.jupiterone.io + host: graphql.dev.jupiterone.io remote_addr: "" request_uri: "" body: '{"query":"\nmutation CreateQuestion ($question: CreateQuestionInput!) {\n\tcreateQuestion(question: $question) {\n\t\tid\n\t}\n}\n","variables":{"question":{"title":"tf-provider-test-rule","name":"","tags":["tf_acc:1","tf_acc:2"],"description":"Test","showTrend":false,"pollingInterval":"ONE_DAY","widgetId":"","queries":[{"query":"Find DataStore with classification=(''critical'' or ''sensitive'' or ''confidential'' or ''restricted'') and encrypted!=true","version":"v1","name":"query0","resultsAre":"INFORMATIVE","includeDeleted":false}],"compliance":[],"variables":null}},"operationName":"CreateQuestion"}' @@ -19,7 +19,7 @@ interactions: - no-cache Content-Type: - application/json - url: https://graphql.us.jupiterone.io/ + url: https://graphql.dev.jupiterone.io/ method: POST response: proto: HTTP/2.0 @@ -30,7 +30,7 @@ interactions: content_length: 74 uncompressed: false body: | - {"data":{"createQuestion":{"id":"a4a81b66-72f6-4373-8999-9b26c5aa7d02"}}} + {"data":{"createQuestion":{"id":"7d2f7921-9c07-4b92-836b-8a4ee4a44a81"}}} headers: Access-Control-Allow-Credentials: - "true" @@ -78,26 +78,26 @@ interactions: - "0" status: 200 OK code: 200 - duration: 722.541958ms + duration: 2.225157833s - id: 1 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 996 + content_length: 978 transfer_encoding: [] trailer: {} - host: graphql.us.jupiterone.io + host: graphql.dev.jupiterone.io remote_addr: "" request_uri: "" - body: '{"query":"\nmutation CreateReferencedQuestionRuleInstance ($instance: CreateReferencedQuestionRuleInstanceInput!) {\n\tcreateQuestionRuleInstance: createReferencedQuestionRuleInstance(instance: $instance) {\n\t\tid\n\t\tversion\n\t\tspecVersion\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t}\n}\n","variables":{"instance":{"questionId":"a4a81b66-72f6-4373-8999-9b26c5aa7d02","templates":null,"tags":["tf_acc:1","tf_acc:2"],"name":"tf-provider-test-rule","description":"Test","specVersion":1,"operations":[{"when":{"condition":"{{queries.query0.total != 0}}","specVersion":1,"type":"FILTER"},"actions":[{"targetProperty":"alertLevel","targetValue":"HIGH","type":"SET_PROPERTY"},{"type":"CREATE_ALERT"}]}],"outputs":["queries.query0.total","alertLevel"],"pollingInterval":"ONE_WEEK","notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":false,"ignorePreviousResults":false,"remediationSteps":"","collectionId":"","labels":null}},"operationName":"CreateReferencedQuestionRuleInstance"}' + body: '{"query":"\nmutation CreateReferencedQuestionRuleInstance ($instance: CreateReferencedQuestionRuleInstanceInput!) {\n\tcreateQuestionRuleInstance: createReferencedQuestionRuleInstance(instance: $instance) {\n\t\tid\n\t\tversion\n\t\tspecVersion\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t}\n}\n","variables":{"instance":{"questionId":"7d2f7921-9c07-4b92-836b-8a4ee4a44a81","templates":null,"tags":["tf_acc:1","tf_acc:2"],"name":"tf-provider-test-rule","description":"Test","specVersion":1,"operations":[{"when":{"condition":"{{queries.query0.total != 0}}","specVersion":1,"type":"FILTER"},"actions":[{"targetProperty":"alertLevel","targetValue":"HIGH","type":"SET_PROPERTY"},{"type":"CREATE_ALERT"}]}],"outputs":["queries.query0.total","alertLevel"],"pollingInterval":"ONE_WEEK","notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":false,"ignorePreviousResults":false,"remediationSteps":"","labels":null}},"operationName":"CreateReferencedQuestionRuleInstance"}' form: {} headers: Cache-Control: - no-cache Content-Type: - application/json - url: https://graphql.us.jupiterone.io/ + url: https://graphql.dev.jupiterone.io/ method: POST response: proto: HTTP/2.0 @@ -108,7 +108,7 @@ interactions: content_length: 415 uncompressed: false body: | - {"data":{"createQuestionRuleInstance":{"id":"5101a668-a7d9-463d-9d74-64c91b3f2d10","version":1,"specVersion":1,"operations":[{"when":{"condition":"{{queries.query0.total != 0}}","specVersion":1,"type":"FILTER"},"actions":[{"targetProperty":"alertLevel","targetValue":"HIGH","type":"SET_PROPERTY","id":"6de9cc35-e43d-45eb-899c-a53b134ec596"},{"type":"CREATE_ALERT","id":"1bc23598-5a44-4698-baf0-062d8b7779b5"}]}]}}} + {"data":{"createQuestionRuleInstance":{"id":"d525e04f-3aa2-4835-845f-15c6823e801d","version":1,"specVersion":1,"operations":[{"when":{"condition":"{{queries.query0.total != 0}}","specVersion":1,"type":"FILTER"},"actions":[{"targetProperty":"alertLevel","targetValue":"HIGH","type":"SET_PROPERTY","id":"ae70faf9-ce53-4925-acc7-4c1876353157"},{"type":"CREATE_ALERT","id":"b6ef40e1-abb0-4f21-8013-5843d1367a10"}]}]}}} headers: Access-Control-Allow-Credentials: - "true" @@ -156,7 +156,7 @@ interactions: - "0" status: 200 OK code: 200 - duration: 966.789792ms + duration: 1.284597417s - id: 2 request: proto: HTTP/1.1 @@ -165,17 +165,17 @@ interactions: content_length: 434 transfer_encoding: [] trailer: {} - host: graphql.us.jupiterone.io + host: graphql.dev.jupiterone.io remote_addr: "" request_uri: "" - body: '{"query":"\nquery GetQuestionById ($id: ID!) {\n\tquestion(id: $id) {\n\t\tid\n\t\ttitle\n\t\tdescription\n\t\tshowTrend\n\t\tpollingInterval\n\t\tqueries {\n\t\t\tname\n\t\t\tquery\n\t\t\tversion\n\t\t\tincludeDeleted\n\t\t\tresultsAre\n\t\t}\n\t\ttags\n\t\tcompliance {\n\t\t\tstandard\n\t\t\trequirements\n\t\t\tcontrols\n\t\t}\n\t}\n}\n","variables":{"id":"a4a81b66-72f6-4373-8999-9b26c5aa7d02"},"operationName":"GetQuestionById"}' + body: '{"query":"\nquery GetQuestionById ($id: ID!) {\n\tquestion(id: $id) {\n\t\tid\n\t\ttitle\n\t\tdescription\n\t\tshowTrend\n\t\tpollingInterval\n\t\tqueries {\n\t\t\tname\n\t\t\tquery\n\t\t\tversion\n\t\t\tincludeDeleted\n\t\t\tresultsAre\n\t\t}\n\t\ttags\n\t\tcompliance {\n\t\t\tstandard\n\t\t\trequirements\n\t\t\tcontrols\n\t\t}\n\t}\n}\n","variables":{"id":"7d2f7921-9c07-4b92-836b-8a4ee4a44a81"},"operationName":"GetQuestionById"}' form: {} headers: Cache-Control: - no-cache Content-Type: - application/json - url: https://graphql.us.jupiterone.io/ + url: https://graphql.dev.jupiterone.io/ method: POST response: proto: HTTP/2.0 @@ -186,7 +186,7 @@ interactions: content_length: 436 uncompressed: false body: | - {"data":{"question":{"id":"a4a81b66-72f6-4373-8999-9b26c5aa7d02","title":"tf-provider-test-rule","description":"Test","showTrend":false,"pollingInterval":"ONE_DAY","queries":[{"name":"query0","query":"Find DataStore with classification=('critical' or 'sensitive' or 'confidential' or 'restricted') and encrypted!=true","version":"v1","includeDeleted":false,"resultsAre":"INFORMATIVE"}],"tags":["tf_acc:1","tf_acc:2"],"compliance":[]}}} + {"data":{"question":{"id":"7d2f7921-9c07-4b92-836b-8a4ee4a44a81","title":"tf-provider-test-rule","description":"Test","showTrend":false,"pollingInterval":"ONE_DAY","queries":[{"name":"query0","query":"Find DataStore with classification=('critical' or 'sensitive' or 'confidential' or 'restricted') and encrypted!=true","version":"v1","includeDeleted":false,"resultsAre":"INFORMATIVE"}],"tags":["tf_acc:1","tf_acc:2"],"compliance":[]}}} headers: Access-Control-Allow-Credentials: - "true" @@ -234,26 +234,26 @@ interactions: - "0" status: 200 OK code: 200 - duration: 248.231791ms + duration: 349.569167ms - id: 3 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 632 + content_length: 650 transfer_encoding: [] trailer: {} - host: graphql.us.jupiterone.io + host: graphql.dev.jupiterone.io remote_addr: "" request_uri: "" - body: '{"query":"\nquery GetQuestionRuleInstance ($id: ID!) {\n\tquestionRuleInstance(id: $id) {\n\t\tid\n\t\tname\n\t\tdescription\n\t\tversion\n\t\tspecVersion\n\t\tlatest\n\t\tpollingInterval\n\t\tdeleted\n\t\ttype\n\t\ttemplates\n\t\tnotifyOnFailure\n\t\ttriggerActionsOnNewEntitiesOnly\n\t\tignorePreviousResults\n\t\tquestionId\n\t\tquestion {\n\t\t\tqueries {\n\t\t\t\tname\n\t\t\t\tquery\n\t\t\t\tversion\n\t\t\t\tincludeDeleted\n\t\t\t}\n\t\t}\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t\toutputs\n\t\ttags\n\t}\n}\n","variables":{"id":"5101a668-a7d9-463d-9d74-64c91b3f2d10"},"operationName":"GetQuestionRuleInstance"}' + body: '{"query":"\nquery GetQuestionRuleInstance ($id: ID!) {\n\tquestionRuleInstance(id: $id) {\n\t\tid\n\t\tname\n\t\tcollectionId\n\t\tdescription\n\t\tversion\n\t\tspecVersion\n\t\tlatest\n\t\tpollingInterval\n\t\tdeleted\n\t\ttype\n\t\ttemplates\n\t\tnotifyOnFailure\n\t\ttriggerActionsOnNewEntitiesOnly\n\t\tignorePreviousResults\n\t\tquestionId\n\t\tquestion {\n\t\t\tqueries {\n\t\t\t\tname\n\t\t\t\tquery\n\t\t\t\tversion\n\t\t\t\tincludeDeleted\n\t\t\t}\n\t\t}\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t\toutputs\n\t\ttags\n\t}\n}\n","variables":{"id":"d525e04f-3aa2-4835-845f-15c6823e801d"},"operationName":"GetQuestionRuleInstance"}' form: {} headers: Cache-Control: - no-cache Content-Type: - application/json - url: https://graphql.us.jupiterone.io/ + url: https://graphql.dev.jupiterone.io/ method: POST response: proto: HTTP/2.0 @@ -261,15 +261,15 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 796 + content_length: 816 uncompressed: false body: | - {"data":{"questionRuleInstance":{"id":"5101a668-a7d9-463d-9d74-64c91b3f2d10","name":"tf-provider-test-rule","description":"Test","version":1,"specVersion":1,"latest":true,"pollingInterval":"ONE_WEEK","deleted":false,"type":"QUESTION","templates":null,"notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":false,"ignorePreviousResults":false,"questionId":"a4a81b66-72f6-4373-8999-9b26c5aa7d02","question":null,"operations":[{"when":{"type":"FILTER","condition":"{{queries.query0.total != 0}}","specVersion":1},"actions":[{"targetValue":"HIGH","id":"6de9cc35-e43d-45eb-899c-a53b134ec596","type":"SET_PROPERTY","targetProperty":"alertLevel"},{"type":"CREATE_ALERT","id":"1bc23598-5a44-4698-baf0-062d8b7779b5"}]}],"outputs":["queries.query0.total","alertLevel"],"tags":["tf_acc:1","tf_acc:2"]}}} + {"data":{"questionRuleInstance":{"id":"d525e04f-3aa2-4835-845f-15c6823e801d","name":"tf-provider-test-rule","collectionId":null,"description":"Test","version":1,"specVersion":1,"latest":true,"pollingInterval":"ONE_WEEK","deleted":false,"type":"QUESTION","templates":null,"notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":false,"ignorePreviousResults":false,"questionId":"7d2f7921-9c07-4b92-836b-8a4ee4a44a81","question":null,"operations":[{"when":{"type":"FILTER","condition":"{{queries.query0.total != 0}}","specVersion":1},"actions":[{"targetValue":"HIGH","id":"ae70faf9-ce53-4925-acc7-4c1876353157","type":"SET_PROPERTY","targetProperty":"alertLevel"},{"type":"CREATE_ALERT","id":"b6ef40e1-abb0-4f21-8013-5843d1367a10"}]}],"outputs":["queries.query0.total","alertLevel"],"tags":["tf_acc:1","tf_acc:2"]}}} headers: Access-Control-Allow-Credentials: - "true" Content-Length: - - "796" + - "816" Content-Security-Policy: - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self'' https: data:;form-action ''self'';frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests' Content-Type: @@ -312,7 +312,7 @@ interactions: - "0" status: 200 OK code: 200 - duration: 185.999917ms + duration: 149.247333ms - id: 4 request: proto: HTTP/1.1 @@ -321,17 +321,17 @@ interactions: content_length: 434 transfer_encoding: [] trailer: {} - host: graphql.us.jupiterone.io + host: graphql.dev.jupiterone.io remote_addr: "" request_uri: "" - body: '{"query":"\nquery GetQuestionById ($id: ID!) {\n\tquestion(id: $id) {\n\t\tid\n\t\ttitle\n\t\tdescription\n\t\tshowTrend\n\t\tpollingInterval\n\t\tqueries {\n\t\t\tname\n\t\t\tquery\n\t\t\tversion\n\t\t\tincludeDeleted\n\t\t\tresultsAre\n\t\t}\n\t\ttags\n\t\tcompliance {\n\t\t\tstandard\n\t\t\trequirements\n\t\t\tcontrols\n\t\t}\n\t}\n}\n","variables":{"id":"a4a81b66-72f6-4373-8999-9b26c5aa7d02"},"operationName":"GetQuestionById"}' + body: '{"query":"\nquery GetQuestionById ($id: ID!) {\n\tquestion(id: $id) {\n\t\tid\n\t\ttitle\n\t\tdescription\n\t\tshowTrend\n\t\tpollingInterval\n\t\tqueries {\n\t\t\tname\n\t\t\tquery\n\t\t\tversion\n\t\t\tincludeDeleted\n\t\t\tresultsAre\n\t\t}\n\t\ttags\n\t\tcompliance {\n\t\t\tstandard\n\t\t\trequirements\n\t\t\tcontrols\n\t\t}\n\t}\n}\n","variables":{"id":"7d2f7921-9c07-4b92-836b-8a4ee4a44a81"},"operationName":"GetQuestionById"}' form: {} headers: Cache-Control: - no-cache Content-Type: - application/json - url: https://graphql.us.jupiterone.io/ + url: https://graphql.dev.jupiterone.io/ method: POST response: proto: HTTP/2.0 @@ -342,7 +342,7 @@ interactions: content_length: 436 uncompressed: false body: | - {"data":{"question":{"id":"a4a81b66-72f6-4373-8999-9b26c5aa7d02","title":"tf-provider-test-rule","description":"Test","showTrend":false,"pollingInterval":"ONE_DAY","queries":[{"name":"query0","query":"Find DataStore with classification=('critical' or 'sensitive' or 'confidential' or 'restricted') and encrypted!=true","version":"v1","includeDeleted":false,"resultsAre":"INFORMATIVE"}],"tags":["tf_acc:1","tf_acc:2"],"compliance":[]}}} + {"data":{"question":{"id":"7d2f7921-9c07-4b92-836b-8a4ee4a44a81","title":"tf-provider-test-rule","description":"Test","showTrend":false,"pollingInterval":"ONE_DAY","queries":[{"name":"query0","query":"Find DataStore with classification=('critical' or 'sensitive' or 'confidential' or 'restricted') and encrypted!=true","version":"v1","includeDeleted":false,"resultsAre":"INFORMATIVE"}],"tags":["tf_acc:1","tf_acc:2"],"compliance":[]}}} headers: Access-Control-Allow-Credentials: - "true" @@ -390,26 +390,26 @@ interactions: - "0" status: 200 OK code: 200 - duration: 241.0375ms + duration: 233.255583ms - id: 5 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 632 + content_length: 650 transfer_encoding: [] trailer: {} - host: graphql.us.jupiterone.io + host: graphql.dev.jupiterone.io remote_addr: "" request_uri: "" - body: '{"query":"\nquery GetQuestionRuleInstance ($id: ID!) {\n\tquestionRuleInstance(id: $id) {\n\t\tid\n\t\tname\n\t\tdescription\n\t\tversion\n\t\tspecVersion\n\t\tlatest\n\t\tpollingInterval\n\t\tdeleted\n\t\ttype\n\t\ttemplates\n\t\tnotifyOnFailure\n\t\ttriggerActionsOnNewEntitiesOnly\n\t\tignorePreviousResults\n\t\tquestionId\n\t\tquestion {\n\t\t\tqueries {\n\t\t\t\tname\n\t\t\t\tquery\n\t\t\t\tversion\n\t\t\t\tincludeDeleted\n\t\t\t}\n\t\t}\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t\toutputs\n\t\ttags\n\t}\n}\n","variables":{"id":"5101a668-a7d9-463d-9d74-64c91b3f2d10"},"operationName":"GetQuestionRuleInstance"}' + body: '{"query":"\nquery GetQuestionRuleInstance ($id: ID!) {\n\tquestionRuleInstance(id: $id) {\n\t\tid\n\t\tname\n\t\tcollectionId\n\t\tdescription\n\t\tversion\n\t\tspecVersion\n\t\tlatest\n\t\tpollingInterval\n\t\tdeleted\n\t\ttype\n\t\ttemplates\n\t\tnotifyOnFailure\n\t\ttriggerActionsOnNewEntitiesOnly\n\t\tignorePreviousResults\n\t\tquestionId\n\t\tquestion {\n\t\t\tqueries {\n\t\t\t\tname\n\t\t\t\tquery\n\t\t\t\tversion\n\t\t\t\tincludeDeleted\n\t\t\t}\n\t\t}\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t\toutputs\n\t\ttags\n\t}\n}\n","variables":{"id":"d525e04f-3aa2-4835-845f-15c6823e801d"},"operationName":"GetQuestionRuleInstance"}' form: {} headers: Cache-Control: - no-cache Content-Type: - application/json - url: https://graphql.us.jupiterone.io/ + url: https://graphql.dev.jupiterone.io/ method: POST response: proto: HTTP/2.0 @@ -417,15 +417,15 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 796 + content_length: 816 uncompressed: false body: | - {"data":{"questionRuleInstance":{"id":"5101a668-a7d9-463d-9d74-64c91b3f2d10","name":"tf-provider-test-rule","description":"Test","version":1,"specVersion":1,"latest":true,"pollingInterval":"ONE_WEEK","deleted":false,"type":"QUESTION","templates":null,"notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":false,"ignorePreviousResults":false,"questionId":"a4a81b66-72f6-4373-8999-9b26c5aa7d02","question":null,"operations":[{"when":{"type":"FILTER","condition":"{{queries.query0.total != 0}}","specVersion":1},"actions":[{"targetValue":"HIGH","id":"6de9cc35-e43d-45eb-899c-a53b134ec596","type":"SET_PROPERTY","targetProperty":"alertLevel"},{"type":"CREATE_ALERT","id":"1bc23598-5a44-4698-baf0-062d8b7779b5"}]}],"outputs":["queries.query0.total","alertLevel"],"tags":["tf_acc:1","tf_acc:2"]}}} + {"data":{"questionRuleInstance":{"id":"d525e04f-3aa2-4835-845f-15c6823e801d","name":"tf-provider-test-rule","collectionId":null,"description":"Test","version":1,"specVersion":1,"latest":true,"pollingInterval":"ONE_WEEK","deleted":false,"type":"QUESTION","templates":null,"notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":false,"ignorePreviousResults":false,"questionId":"7d2f7921-9c07-4b92-836b-8a4ee4a44a81","question":null,"operations":[{"when":{"type":"FILTER","condition":"{{queries.query0.total != 0}}","specVersion":1},"actions":[{"targetValue":"HIGH","id":"ae70faf9-ce53-4925-acc7-4c1876353157","type":"SET_PROPERTY","targetProperty":"alertLevel"},{"type":"CREATE_ALERT","id":"b6ef40e1-abb0-4f21-8013-5843d1367a10"}]}],"outputs":["queries.query0.total","alertLevel"],"tags":["tf_acc:1","tf_acc:2"]}}} headers: Access-Control-Allow-Credentials: - "true" Content-Length: - - "796" + - "816" Content-Security-Policy: - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self'' https: data:;form-action ''self'';frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests' Content-Type: @@ -468,26 +468,26 @@ interactions: - "0" status: 200 OK code: 200 - duration: 194.606708ms + duration: 150.993167ms - id: 6 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 956 + content_length: 938 transfer_encoding: [] trailer: {} - host: graphql.us.jupiterone.io + host: graphql.dev.jupiterone.io remote_addr: "" request_uri: "" - body: '{"query":"\nmutation UpdateReferencedQuestionRuleInstance ($instance: UpdateReferencedQuestionRuleInstanceInput!) {\n\tupdateReferencedQuestionRuleInstance(instance: $instance) {\n\t\tversion\n\t\tspecVersion\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t}\n}\n","variables":{"instance":{"questionId":"a4a81b66-72f6-4373-8999-9b26c5aa7d02","id":"5101a668-a7d9-463d-9d74-64c91b3f2d10","version":1,"state":{"actions":null},"templates":null,"tags":["tf_acc:1","tf_acc:2"],"name":"tf-provider-test-rule","description":"Test","specVersion":1,"operations":[{"actions":[{"targetProperty":"alertLevel","targetValue":"HIGH","type":"SET_PROPERTY"},{"type":"CREATE_ALERT"}]}],"outputs":["queries.query0.total","alertLevel"],"pollingInterval":"ONE_WEEK","notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":false,"ignorePreviousResults":false,"remediationSteps":"","collectionId":"","labels":null}},"operationName":"UpdateReferencedQuestionRuleInstance"}' + body: '{"query":"\nmutation UpdateReferencedQuestionRuleInstance ($instance: UpdateReferencedQuestionRuleInstanceInput!) {\n\tupdateReferencedQuestionRuleInstance(instance: $instance) {\n\t\tversion\n\t\tspecVersion\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t}\n}\n","variables":{"instance":{"questionId":"7d2f7921-9c07-4b92-836b-8a4ee4a44a81","id":"d525e04f-3aa2-4835-845f-15c6823e801d","version":1,"state":{"actions":null},"templates":null,"tags":["tf_acc:1","tf_acc:2"],"name":"tf-provider-test-rule","description":"Test","specVersion":1,"operations":[{"actions":[{"targetProperty":"alertLevel","targetValue":"HIGH","type":"SET_PROPERTY"},{"type":"CREATE_ALERT"}]}],"outputs":["queries.query0.total","alertLevel"],"pollingInterval":"ONE_WEEK","notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":false,"ignorePreviousResults":false,"remediationSteps":"","labels":null}},"operationName":"UpdateReferencedQuestionRuleInstance"}' form: {} headers: Cache-Control: - no-cache Content-Type: - application/json - url: https://graphql.us.jupiterone.io/ + url: https://graphql.dev.jupiterone.io/ method: POST response: proto: HTTP/2.0 @@ -498,7 +498,7 @@ interactions: content_length: 308 uncompressed: false body: | - {"data":{"updateReferencedQuestionRuleInstance":{"version":2,"specVersion":1,"operations":[{"when":null,"actions":[{"targetProperty":"alertLevel","targetValue":"HIGH","type":"SET_PROPERTY","id":"641f86cf-93f1-498f-ae9c-0c7ed6dd6038"},{"type":"CREATE_ALERT","id":"22afacc5-f05e-4de2-98e7-ebf6c98f50e2"}]}]}}} + {"data":{"updateReferencedQuestionRuleInstance":{"version":2,"specVersion":1,"operations":[{"when":null,"actions":[{"targetProperty":"alertLevel","targetValue":"HIGH","type":"SET_PROPERTY","id":"489e0b52-e4f6-45b7-99cd-01764a737d99"},{"type":"CREATE_ALERT","id":"59e08d05-832c-4921-9829-62064db4bb32"}]}]}}} headers: Access-Control-Allow-Credentials: - "true" @@ -546,7 +546,7 @@ interactions: - "0" status: 200 OK code: 200 - duration: 702.913166ms + duration: 672.419666ms - id: 7 request: proto: HTTP/1.1 @@ -555,17 +555,17 @@ interactions: content_length: 434 transfer_encoding: [] trailer: {} - host: graphql.us.jupiterone.io + host: graphql.dev.jupiterone.io remote_addr: "" request_uri: "" - body: '{"query":"\nquery GetQuestionById ($id: ID!) {\n\tquestion(id: $id) {\n\t\tid\n\t\ttitle\n\t\tdescription\n\t\tshowTrend\n\t\tpollingInterval\n\t\tqueries {\n\t\t\tname\n\t\t\tquery\n\t\t\tversion\n\t\t\tincludeDeleted\n\t\t\tresultsAre\n\t\t}\n\t\ttags\n\t\tcompliance {\n\t\t\tstandard\n\t\t\trequirements\n\t\t\tcontrols\n\t\t}\n\t}\n}\n","variables":{"id":"a4a81b66-72f6-4373-8999-9b26c5aa7d02"},"operationName":"GetQuestionById"}' + body: '{"query":"\nquery GetQuestionById ($id: ID!) {\n\tquestion(id: $id) {\n\t\tid\n\t\ttitle\n\t\tdescription\n\t\tshowTrend\n\t\tpollingInterval\n\t\tqueries {\n\t\t\tname\n\t\t\tquery\n\t\t\tversion\n\t\t\tincludeDeleted\n\t\t\tresultsAre\n\t\t}\n\t\ttags\n\t\tcompliance {\n\t\t\tstandard\n\t\t\trequirements\n\t\t\tcontrols\n\t\t}\n\t}\n}\n","variables":{"id":"7d2f7921-9c07-4b92-836b-8a4ee4a44a81"},"operationName":"GetQuestionById"}' form: {} headers: Cache-Control: - no-cache Content-Type: - application/json - url: https://graphql.us.jupiterone.io/ + url: https://graphql.dev.jupiterone.io/ method: POST response: proto: HTTP/2.0 @@ -576,7 +576,7 @@ interactions: content_length: 436 uncompressed: false body: | - {"data":{"question":{"id":"a4a81b66-72f6-4373-8999-9b26c5aa7d02","title":"tf-provider-test-rule","description":"Test","showTrend":false,"pollingInterval":"ONE_DAY","queries":[{"name":"query0","query":"Find DataStore with classification=('critical' or 'sensitive' or 'confidential' or 'restricted') and encrypted!=true","version":"v1","includeDeleted":false,"resultsAre":"INFORMATIVE"}],"tags":["tf_acc:1","tf_acc:2"],"compliance":[]}}} + {"data":{"question":{"id":"7d2f7921-9c07-4b92-836b-8a4ee4a44a81","title":"tf-provider-test-rule","description":"Test","showTrend":false,"pollingInterval":"ONE_DAY","queries":[{"name":"query0","query":"Find DataStore with classification=('critical' or 'sensitive' or 'confidential' or 'restricted') and encrypted!=true","version":"v1","includeDeleted":false,"resultsAre":"INFORMATIVE"}],"tags":["tf_acc:1","tf_acc:2"],"compliance":[]}}} headers: Access-Control-Allow-Credentials: - "true" @@ -624,26 +624,26 @@ interactions: - "0" status: 200 OK code: 200 - duration: 263.366083ms + duration: 214.978708ms - id: 8 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 632 + content_length: 650 transfer_encoding: [] trailer: {} - host: graphql.us.jupiterone.io + host: graphql.dev.jupiterone.io remote_addr: "" request_uri: "" - body: '{"query":"\nquery GetQuestionRuleInstance ($id: ID!) {\n\tquestionRuleInstance(id: $id) {\n\t\tid\n\t\tname\n\t\tdescription\n\t\tversion\n\t\tspecVersion\n\t\tlatest\n\t\tpollingInterval\n\t\tdeleted\n\t\ttype\n\t\ttemplates\n\t\tnotifyOnFailure\n\t\ttriggerActionsOnNewEntitiesOnly\n\t\tignorePreviousResults\n\t\tquestionId\n\t\tquestion {\n\t\t\tqueries {\n\t\t\t\tname\n\t\t\t\tquery\n\t\t\t\tversion\n\t\t\t\tincludeDeleted\n\t\t\t}\n\t\t}\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t\toutputs\n\t\ttags\n\t}\n}\n","variables":{"id":"5101a668-a7d9-463d-9d74-64c91b3f2d10"},"operationName":"GetQuestionRuleInstance"}' + body: '{"query":"\nquery GetQuestionRuleInstance ($id: ID!) {\n\tquestionRuleInstance(id: $id) {\n\t\tid\n\t\tname\n\t\tcollectionId\n\t\tdescription\n\t\tversion\n\t\tspecVersion\n\t\tlatest\n\t\tpollingInterval\n\t\tdeleted\n\t\ttype\n\t\ttemplates\n\t\tnotifyOnFailure\n\t\ttriggerActionsOnNewEntitiesOnly\n\t\tignorePreviousResults\n\t\tquestionId\n\t\tquestion {\n\t\t\tqueries {\n\t\t\t\tname\n\t\t\t\tquery\n\t\t\t\tversion\n\t\t\t\tincludeDeleted\n\t\t\t}\n\t\t}\n\t\toperations {\n\t\t\twhen\n\t\t\tactions\n\t\t}\n\t\toutputs\n\t\ttags\n\t}\n}\n","variables":{"id":"d525e04f-3aa2-4835-845f-15c6823e801d"},"operationName":"GetQuestionRuleInstance"}' form: {} headers: Cache-Control: - no-cache Content-Type: - application/json - url: https://graphql.us.jupiterone.io/ + url: https://graphql.dev.jupiterone.io/ method: POST response: proto: HTTP/2.0 @@ -651,15 +651,15 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 723 + content_length: 743 uncompressed: false body: | - {"data":{"questionRuleInstance":{"id":"5101a668-a7d9-463d-9d74-64c91b3f2d10","name":"tf-provider-test-rule","description":"Test","version":2,"specVersion":1,"latest":true,"pollingInterval":"ONE_WEEK","deleted":false,"type":"QUESTION","templates":null,"notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":false,"ignorePreviousResults":false,"questionId":"a4a81b66-72f6-4373-8999-9b26c5aa7d02","question":null,"operations":[{"when":null,"actions":[{"targetValue":"HIGH","id":"641f86cf-93f1-498f-ae9c-0c7ed6dd6038","type":"SET_PROPERTY","targetProperty":"alertLevel"},{"type":"CREATE_ALERT","id":"22afacc5-f05e-4de2-98e7-ebf6c98f50e2"}]}],"outputs":["queries.query0.total","alertLevel"],"tags":["tf_acc:1","tf_acc:2"]}}} + {"data":{"questionRuleInstance":{"id":"d525e04f-3aa2-4835-845f-15c6823e801d","name":"tf-provider-test-rule","collectionId":null,"description":"Test","version":2,"specVersion":1,"latest":true,"pollingInterval":"ONE_WEEK","deleted":false,"type":"QUESTION","templates":null,"notifyOnFailure":false,"triggerActionsOnNewEntitiesOnly":false,"ignorePreviousResults":false,"questionId":"7d2f7921-9c07-4b92-836b-8a4ee4a44a81","question":null,"operations":[{"when":null,"actions":[{"targetValue":"HIGH","id":"489e0b52-e4f6-45b7-99cd-01764a737d99","type":"SET_PROPERTY","targetProperty":"alertLevel"},{"type":"CREATE_ALERT","id":"59e08d05-832c-4921-9829-62064db4bb32"}]}],"outputs":["queries.query0.total","alertLevel"],"tags":["tf_acc:1","tf_acc:2"]}}} headers: Access-Control-Allow-Credentials: - "true" Content-Length: - - "723" + - "743" Content-Security-Policy: - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self'' https: data:;form-action ''self'';frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests' Content-Type: @@ -702,7 +702,7 @@ interactions: - "0" status: 200 OK code: 200 - duration: 197.696ms + duration: 156.036917ms - id: 9 request: proto: HTTP/1.1 @@ -711,17 +711,17 @@ interactions: content_length: 200 transfer_encoding: [] trailer: {} - host: graphql.us.jupiterone.io + host: graphql.dev.jupiterone.io remote_addr: "" request_uri: "" - body: '{"query":"\nmutation DeleteRuleInstance ($id: ID!) {\n\tdeleteRuleInstance(id: $id) {\n\t\tid\n\t}\n}\n","variables":{"id":"5101a668-a7d9-463d-9d74-64c91b3f2d10"},"operationName":"DeleteRuleInstance"}' + body: '{"query":"\nmutation DeleteRuleInstance ($id: ID!) {\n\tdeleteRuleInstance(id: $id) {\n\t\tid\n\t}\n}\n","variables":{"id":"d525e04f-3aa2-4835-845f-15c6823e801d"},"operationName":"DeleteRuleInstance"}' form: {} headers: Cache-Control: - no-cache Content-Type: - application/json - url: https://graphql.us.jupiterone.io/ + url: https://graphql.dev.jupiterone.io/ method: POST response: proto: HTTP/2.0 @@ -732,7 +732,7 @@ interactions: content_length: 78 uncompressed: false body: | - {"data":{"deleteRuleInstance":{"id":"5101a668-a7d9-463d-9d74-64c91b3f2d10"}}} + {"data":{"deleteRuleInstance":{"id":"d525e04f-3aa2-4835-845f-15c6823e801d"}}} headers: Access-Control-Allow-Credentials: - "true" @@ -780,7 +780,7 @@ interactions: - "0" status: 200 OK code: 200 - duration: 314.756333ms + duration: 401.343208ms - id: 10 request: proto: HTTP/1.1 @@ -789,17 +789,17 @@ interactions: content_length: 188 transfer_encoding: [] trailer: {} - host: graphql.us.jupiterone.io + host: graphql.dev.jupiterone.io remote_addr: "" request_uri: "" - body: '{"query":"\nmutation DeleteQuestion ($id: ID!) {\n\tdeleteQuestion(id: $id) {\n\t\tid\n\t}\n}\n","variables":{"id":"a4a81b66-72f6-4373-8999-9b26c5aa7d02"},"operationName":"DeleteQuestion"}' + body: '{"query":"\nmutation DeleteQuestion ($id: ID!) {\n\tdeleteQuestion(id: $id) {\n\t\tid\n\t}\n}\n","variables":{"id":"7d2f7921-9c07-4b92-836b-8a4ee4a44a81"},"operationName":"DeleteQuestion"}' form: {} headers: Cache-Control: - no-cache Content-Type: - application/json - url: https://graphql.us.jupiterone.io/ + url: https://graphql.dev.jupiterone.io/ method: POST response: proto: HTTP/2.0 @@ -810,7 +810,7 @@ interactions: content_length: 74 uncompressed: false body: | - {"data":{"deleteQuestion":{"id":"a4a81b66-72f6-4373-8999-9b26c5aa7d02"}}} + {"data":{"deleteQuestion":{"id":"7d2f7921-9c07-4b92-836b-8a4ee4a44a81"}}} headers: Access-Control-Allow-Credentials: - "true" @@ -858,4 +858,4 @@ interactions: - "0" status: 200 OK code: 200 - duration: 507.340583ms + duration: 392.906125ms diff --git a/jupiterone/cassettes/TestResourcePermission_Basic.yaml b/jupiterone/cassettes/TestResourcePermission_Basic.yaml new file mode 100644 index 00000000..558c5397 --- /dev/null +++ b/jupiterone/cassettes/TestResourcePermission_Basic.yaml @@ -0,0 +1,159 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 519 + transfer_encoding: [] + trailer: {} + host: graphql.dev.jupiterone.io + remote_addr: "" + request_uri: "" + body: '{"query":"\nmutation SetResourcePermission ($input: SetResourcePermissionInput!) {\n\tsetResourcePermission(input: $input) {\n\t\tcanCreate\n\t\tcanDelete\n\t\tcanRead\n\t\tcanUpdate\n\t\tresourceArea\n\t\tresourceId\n\t\tresourceType\n\t\tsubjectId\n\t\tsubjectType\n\t}\n}\n","variables":{"input":{"subjectType":"group","subjectId":"example-group-id","resourceArea":"rule","resourceType":"*","resourceId":"*","canCreate":true,"canRead":true,"canUpdate":true,"canDelete":true}},"operationName":"SetResourcePermission"}' + form: {} + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json + url: https://graphql.dev.jupiterone.io/ + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 214 + uncompressed: false + body: | + {"data":{"setResourcePermission":{"canCreate":true,"canDelete":true,"canRead":true,"canUpdate":true,"resourceArea":"rule","resourceId":"*","resourceType":"*","subjectId":"example-group-id","subjectType":"group"}}} + headers: + Access-Control-Allow-Credentials: + - "true" + Content-Length: + - "214" + Content-Security-Policy: + - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self'' https: data:;form-action ''self'';frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests' + Content-Type: + - application/json + Cross-Origin-Embedder-Policy: + - require-corp + Cross-Origin-Opener-Policy: + - same-origin + Cross-Origin-Resource-Policy: + - same-origin + Expect-Ct: + - max-age=0 + Origin-Agent-Cluster: + - ?1 + Ratelimit-Limit: + - "1000" + Ratelimit-Remaining: + - "999" + Ratelimit-Requested: + - "1" + Ratelimit-Reset: + - "1" + Referrer-Policy: + - no-referrer + Strict-Transport-Security: + - max-age=15552000; includeSubDomains + Vary: + - Origin + X-Content-Type-Options: + - nosniff + X-Dns-Prefetch-Control: + - "off" + X-Download-Options: + - noopen + X-Frame-Options: + - SAMEORIGIN + X-Permitted-Cross-Domain-Policies: + - none + X-Xss-Protection: + - "0" + status: 200 OK + code: 200 + duration: 664.85025ms + - id: 1 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 336 + transfer_encoding: [] + trailer: {} + host: graphql.dev.jupiterone.io + remote_addr: "" + request_uri: "" + body: '{"query":"\nmutation DeleteResourcePermission ($input: DeleteResourcePermissionInput!) {\n\tdeleteResourcePermission(input: $input) {\n\t\tsuccess\n\t}\n}\n","variables":{"input":{"subjectType":"group","subjectId":"example-group-id","resourceArea":"rule","resourceType":"*","resourceId":"*"}},"operationName":"DeleteResourcePermission"}' + form: {} + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json + url: https://graphql.dev.jupiterone.io/ + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 55 + uncompressed: false + body: | + {"data":{"deleteResourcePermission":{"success":true}}} + headers: + Access-Control-Allow-Credentials: + - "true" + Content-Length: + - "55" + Content-Security-Policy: + - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self'' https: data:;form-action ''self'';frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests' + Content-Type: + - application/json + Cross-Origin-Embedder-Policy: + - require-corp + Cross-Origin-Opener-Policy: + - same-origin + Cross-Origin-Resource-Policy: + - same-origin + Expect-Ct: + - max-age=0 + Origin-Agent-Cluster: + - ?1 + Ratelimit-Limit: + - "1000" + Ratelimit-Remaining: + - "999" + Ratelimit-Requested: + - "1" + Ratelimit-Reset: + - "1" + Referrer-Policy: + - no-referrer + Strict-Transport-Security: + - max-age=15552000; includeSubDomains + Vary: + - Origin + X-Content-Type-Options: + - nosniff + X-Dns-Prefetch-Control: + - "off" + X-Download-Options: + - noopen + X-Frame-Options: + - SAMEORIGIN + X-Permitted-Cross-Domain-Policies: + - none + X-Xss-Protection: + - "0" + status: 200 OK + code: 200 + duration: 234.689667ms diff --git a/jupiterone/internal/client/generated.go b/jupiterone/internal/client/generated.go index 194bb84d..e4e895ba 100644 --- a/jupiterone/internal/client/generated.go +++ b/jupiterone/internal/client/generated.go @@ -491,7 +491,7 @@ type CreateInlineQuestionRuleInstanceInput struct { TriggerActionsOnNewEntitiesOnly bool `json:"triggerActionsOnNewEntitiesOnly"` IgnorePreviousResults bool `json:"ignorePreviousResults"` RemediationSteps string `json:"remediationSteps"` - CollectionId string `json:"collectionId"` + CollectionId string `json:"collectionId,omitempty"` Labels []RuleInstanceLabelInput `json:"labels"` J1Internal bool `json:"j1Internal"` } @@ -1012,7 +1012,7 @@ type CreateReferencedQuestionRuleInstanceInput struct { TriggerActionsOnNewEntitiesOnly bool `json:"triggerActionsOnNewEntitiesOnly"` IgnorePreviousResults bool `json:"ignorePreviousResults"` RemediationSteps string `json:"remediationSteps"` - CollectionId string `json:"collectionId"` + CollectionId string `json:"collectionId,omitempty"` Labels []RuleInstanceLabelInput `json:"labels"` } @@ -3232,7 +3232,7 @@ type UpdateInlineQuestionRuleInstanceInput struct { TriggerActionsOnNewEntitiesOnly bool `json:"triggerActionsOnNewEntitiesOnly"` IgnorePreviousResults bool `json:"ignorePreviousResults"` RemediationSteps string `json:"remediationSteps,omitempty"` - CollectionId string `json:"collectionId"` + CollectionId string `json:"collectionId,omitempty"` Labels []RuleInstanceLabelInput `json:"labels"` } @@ -3530,7 +3530,7 @@ type UpdateReferencedQuestionRuleInstanceInput struct { TriggerActionsOnNewEntitiesOnly bool `json:"triggerActionsOnNewEntitiesOnly"` IgnorePreviousResults bool `json:"ignorePreviousResults"` RemediationSteps string `json:"remediationSteps"` - CollectionId string `json:"collectionId"` + CollectionId string `json:"collectionId,omitempty"` Labels []RuleInstanceLabelInput `json:"labels"` } diff --git a/jupiterone/internal/client/rule.graphql b/jupiterone/internal/client/rule.graphql index 56b90904..4af598d5 100644 --- a/jupiterone/internal/client/rule.graphql +++ b/jupiterone/internal/client/rule.graphql @@ -34,6 +34,7 @@ query GetQuestionRuleInstance($id: ID!) { } # @genqlient(for: "RuleOperationInput.when", omitempty: true) +# @genqlient(for: "CreateInlineQuestionRuleInstanceInput.collectionId", omitempty: true) mutation CreateInlineQuestionRuleInstance( $instance: CreateInlineQuestionRuleInstanceInput! ) { @@ -64,6 +65,7 @@ mutation CreateInlineQuestionRuleInstance( } # @genqlient(for: "RuleOperationInput.when", omitempty: true) +# @genqlient(for: "CreateReferencedQuestionRuleInstanceInput.collectionId", omitempty: true) mutation CreateReferencedQuestionRuleInstance( $instance: CreateReferencedQuestionRuleInstanceInput! ) { @@ -89,6 +91,7 @@ mutation CreateReferencedQuestionRuleInstance( # @genqlient(for: "UpdateInlineQuestionRuleInstanceInput.outputs", omitempty: true) # @genqlient(for: "UpdateInlineQuestionRuleInstanceInput.state", omitempty: true) # @genqlient(for: "UpdateInlineQuestionRuleInstanceInput.remediationSteps", omitempty: true) +# @genqlient(for: "UpdateInlineQuestionRuleInstanceInput.collectionId", omitempty: true) mutation UpdateInlineQuestionRuleInstance( $instance: UpdateInlineQuestionRuleInstanceInput! ) { @@ -109,6 +112,7 @@ mutation UpdateInlineQuestionRuleInstance( # @genqlient(for: "UpdateReferencedQuestionRuleInstanceInput.outputs", omitempty: true) # @genqlient(for: "UpdateReferencedQuestionRuleInstanceInput.latestAlertId", omitempty: true) # @genqlient(for: "UpdateReferencedQuestionRuleInstanceInput.state", omitempty: true) +# @genqlient(for: "UpdateReferencedQuestionRuleInstanceInput.collectionId", omitempty: true) mutation UpdateReferencedQuestionRuleInstance( $instance: UpdateReferencedQuestionRuleInstanceInput! ) { diff --git a/jupiterone/resource_rule.go b/jupiterone/resource_rule.go index 07c7a80b..8c4c670c 100644 --- a/jupiterone/resource_rule.go +++ b/jupiterone/resource_rule.go @@ -503,7 +503,6 @@ func (r *QuestionRuleResource) Read(ctx context.Context, req resource.ReadReques NotifyOnFailure: types.BoolValue(rule.NotifyOnFailure), TriggerOnNewOnly: types.BoolValue(rule.TriggerActionsOnNewEntitiesOnly), IgnorePreviousResults: types.BoolValue(rule.IgnorePreviousResults), - CollectionId: types.StringValue(rule.CollectionId), } // FIXME: handling of these JSON fields (map[string]interface{}) is not DRY @@ -516,6 +515,12 @@ func (r *QuestionRuleResource) Read(ctx context.Context, req resource.ReadReques resp.Diagnostics.AddError("error unmarshaling templates from response", err.Error()) } + if rule.CollectionId != "" { + data.CollectionId = types.StringValue(rule.CollectionId) + } else { + data.CollectionId = types.StringNull() + } + if rule.QuestionId != "" { data.QuestionId = types.StringValue(rule.QuestionId) } else { diff --git a/jupiterone/resource_rule_test.go b/jupiterone/resource_rule_test.go index cbee9572..79549b46 100644 --- a/jupiterone/resource_rule_test.go +++ b/jupiterone/resource_rule_test.go @@ -135,6 +135,7 @@ func TestInlineRuleInstance_BasicImport(t *testing.T) { resource.TestCheckResourceAttr(testRuleResourceName, "question.0.queries.0.query", "Find DataStore with classification=('critical' or 'sensitive' or 'confidential' or 'restricted') and encrypted!=true"), resource.TestCheckResourceAttr(testRuleResourceName, "labels.0.label_name", "label1"), resource.TestCheckResourceAttr(testRuleResourceName, "labels.#", "0"), + resource.TestCheckResourceAttr(testRuleResourceName, "collection_id", "null"), ), }, },