Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Not showing any violation report in Storage Bucket #3768

Open
4 tasks
pradhanaditya27 opened this issue Jul 1, 2020 · 4 comments
Open
4 tasks

Not showing any violation report in Storage Bucket #3768

pradhanaditya27 opened this issue Jul 1, 2020 · 4 comments
Assignees
Labels
Interrupts: Follow-up Needed Issues to triage or need followup by engineering assigned to interrupts. module: notifier triaged: yes

Comments

@pradhanaditya27
Copy link

First, help us help you by providing the following information when opening an issue.

  • Which version of Forseti Security you're using (look in /home/ubuntu/forseti-security/google/cloud/forseti/init.py
    on the client).
    version_ = '2.23.2'
    package_name = 'forseti-security'

  • Which module(s) (inventory, scanner, enforcer, explain) you're having trouble with.
    Scanner violation report generation.
    are having an issue with scanner/violation which is not able to sent the Violoation Report to Storage Bucket (not showing any violation report in Storage Bucket)
    We sccusfully verified the "forseti notifier run", forseti config show, even Inventory is also getting collected as you can see from the below logs .

ubuntu@forseti-server-vm-357bccf7:~/forseti-security$ forseti notifier run
{
"serverMessage": "Notification completed!"
}

ubuntu@forseti-server-vm-357bccf7:~/forseti-security$ forseti config show
{'endpoint': 'localhost:50051', 'model': '', 'format': 'json'}

Inventry logs ->
{
"id": "1593576024412707",
"startTimestamp": "2020-07-01T04:00:24Z",
"completeTimestamp": "2020-07-01T04:08:50Z",
"schemaVersion": 1,
"countObjects": 10180,
"status": "SUCCESS",
"warnings": "Your inventory contains warning message(s), please run command forseti inventory get 1593576024412707 for more information.",
"errors": ""
}
{
"id": "1593583212496402",
"startTimestamp": "2020-07-01T06:00:12Z",
"completeTimestamp": "2020-07-01T06:07:58Z",
"schemaVersion": 1,
"countObjects": 10180,
"status": "SUCCESS",
"warnings": "Your inventory contains warning message(s), please run command forseti inventory get 1593583212496402 for more information.",
"errors": ""
}
{
"id": "1593590424198605",
"startTimestamp": "2020-07-01T08:00:24Z",
"completeTimestamp": "2020-07-01T08:09:40Z",
"schemaVersion": 1,
"countObjects": 10180,
"status": "SUCCESS",
"warnings": "Your inventory contains warning message(s), please run command forseti inventory get 1593590424198605 for more information.",
"errors": ""
}
{
"id": "1593597612691551",
"startTimestamp": "2020-07-01T10:00:13Z",
"completeTimestamp": "2020-07-01T10:08:56Z",
"schemaVersion": 1,
"countObjects": 10150,
"status": "SUCCESS",
"warnings": "Your inventory contains warning message(s), please run command forseti inventory get 1593597612691551 for more information.",
"errors": ""
}
{
"id": "1593604814259608",
"startTimestamp": "2020-07-01T12:00:14Z",
"completeTimestamp": "2020-07-01T12:10:08Z",
"schemaVersion": 1,
"countObjects": 10156,
"status": "SUCCESS",
"warnings": "Your inventory contains warning message(s), please run command forseti inventory get 1593604814259608 for more information.",
"errors": ""
}

  • Include errors, log output, and host operating system, including installed packages.
  • Note how you deployed (via Deployment Manager, Terraform, local system, etc.).
    Via Terraform.

Secondly, if the issue is a feature request, be descriptive regarding what needs to be
changed and why, e.g. what to scan for, what would be a 'good' state and what would be
a 'violation' etc.

Finally, be sure to see the FAQ and Get Help
for assistance.

Thanks!

@auto-comment
Copy link

auto-comment bot commented Jul 1, 2020

Thank you for opening an issue. Our team's interrupts engineer will review your issue shortly.

Issue Resolution:

  • [Interrupts Engineer] Triage / apply categorization labels
  • [Interrupts Engineer] Verify / Reproduce the reported issue
  • [Forseti Engineer] Perform root cause analysis
  • Forseti Engineer] Add tasks and next steps to resolve this issue.

@gkowalski-google gkowalski-google added Interrupts: Follow-up Needed Issues to triage or need followup by engineering assigned to interrupts. module: notifier triaged: yes labels Jul 24, 2020
@gkowalski-google gkowalski-google self-assigned this Jul 24, 2020
@gkowalski-google gkowalski-google added this to the Forseti Operations milestone Jul 24, 2020
@gkowalski-google
Copy link
Collaborator

Hi @pradhanaditya27, there is an issue with Forseti that is being addressed with a new release. Can you view the Stackdriver logs for the server VM and filter for errors? Can you see if the error listed on this bug shows up? This issue has been fixed on the main branch.

@gkowalski-google
Copy link
Collaborator

@pradhanaditya27 The latest Forseti release is out to fix the model creation issue. Please upgrade at your convenience and let me know if violations report is available. You can upgrade with Terraform by setting the Forseti module version to 5.2.2 or ~> 5.2.0.

@pradhanaditya27
Copy link
Author

Thanks Gregg for the recommendation. Forseti Notifier always stuck in below line and its stopped work last month only.

2020-08-08 14:04:57,238 INFO [forseti-security][2.23.2] google.cloud.forseti.notifier.notifier(run): Running 'gcs_violations' notifier for resource 'location_violations'
2020-08-08 14:04:57,238 INFO [forseti-security][2.23.2] google.cloud.forseti.notifier.notifier(run): Running 'email_violations' notifier for resource 'log_sink_violations'
2020-08-08 14:04:57,239 INFO [forseti-security][2.23.2] google.cloud.forseti.notifier.notifier(run): Running 'gcs_violations' notifier for resource 'log_sink_violations'
2020-08-08 14:04:57,239 INFO [forseti-security][2.23.2] google.cloud.forseti.notifier.notifier(run): Resource 'resource_violations' has no violations
2020-08-08 14:04:57,239 INFO [forseti-security][2.23.2] google.cloud.forseti.notifier.notifier(run): Running 'email_violations' notifier for resource 'service_account_key_violations'
2020-08-08 14:04:57,239 INFO [forseti-security][2.23.2] google.cloud.forseti.notifier.notifier(run): Running 'gcs_violations' notifier for resource 'service_account_key_violations'
2020-08-08 14:04:57,240 INFO [forseti-security][2.23.2] google.cloud.forseti.notifier.notifier(run): Resource 'external_project_access_violations' has no violations
2020-08-08 14:04:57,244 INFO [forseti-security][2.23.2] google.cloud.forseti.notifier.notifiers.email_violations(_make_attachment_csv): CSV filename: /tmp/tmp8_fitj9x
2020-08-08 15:37:03,973 ERROR [forseti-security][2.23.2] google.cloud.forseti.services.notifier.service(_run_notifier): <urlopen error [Errno 110] Connection timed out>
Traceback (most recent call last):
File "/usr/lib/python3.6/urllib/request.py", line 1325, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/usr/lib/python3.6/http/client.py", line 1264, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1310, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1259, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1038, in _send_output
self.send(msg)
File "/usr/lib/python3.6/http/client.py", line 976, in send
self.connect()
File "/usr/lib/python3.6/http/client.py", line 1417, in connect
super().connect()
File "/usr/lib/python3.6/http/client.py", line 948, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/lib/python3.6/socket.py", line 724, in create_connection
raise err
File "/usr/lib/python3.6/socket.py", line 713, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/forseti_security-2.23.2-py3.6.egg/google/cloud/forseti/services/notifier/service.py", line 129, in _run_notifier
self.service_config)
File "/usr/local/lib/python3.6/dist-packages/forseti_security-2.23.2-py3.6.egg/google/cloud/forseti/notifier/notifier.py", line 174, in run
notifier.run()
File "/usr/local/lib/python3.6/dist-packages/forseti_security-2.23.2-py3.6.egg/google/cloud/forseti/notifier/notifiers/email_violations.py", line 209, in run
self._send(notification=email_notification)
File "/usr/local/lib/python3.6/dist-packages/forseti_security-2.23.2-py3.6.egg/google/cloud/forseti/notifier/notifiers/email_violations.py", line 201, in _send
attachment=attachment)
File "/usr/local/lib/python3.6/dist-packages/forseti_security-2.23.2-py3.6.egg/google/cloud/forseti/common/util/email/sendgrid_connector.py", line 139, in send

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Interrupts: Follow-up Needed Issues to triage or need followup by engineering assigned to interrupts. module: notifier triaged: yes
Projects
None yet
Development

No branches or pull requests

2 participants