Frequently Asked Questions

This page includes answers to some frequently asked questions about Forseti Security.

General

Great! Please see the help page on how to submit your idea or get help.

Forseti documentation can be updated in the forsetisecurity.org-dev branch.

You can test your documentation changes locally, by following the instructions here.

After your updated documentation is merged, the Forseti team will merge it into the forsetisecurity.org branch upon every major/minor release, which will trigger a new build of the forsetisecurity.org website.

It depends on your setup:

  • If you want to be hands on, Forseti is a great solution to integrate into new or existing tooling.
  • If you want to be more hands free, Security Health Analytics is a great solution for a managed service.
Forseti Security Health Analytics
Customer deployed and managed Fully managed by GCP with SLA
Community support GCP support
Customizable auditing Comprehensive set of benchmarks (e.g. CIS certified)
Policy-as-code ecosystem (write the rules once,
and re-use them everywhere in your workflow)
Managed rules added by GCP
Real-time enforcement Scanning only
Basic integration with CSCC Deeper integrations with CSCC (reporting, dashboards, etc.)

Both services can be integrated with Cloud Security Command Center (CSCC) to receive notifications. Refer here for setting up Forseti to use CSCC.

Installation and deployment

For information about how to update Forseti to the latest release, see the Upgrade guide.

To correct mistakes in setup, edit your Forseti deployment script by Updating Forseti, or edit your Forseti configuration file by Configuring Forseti.

Following are the reasons you should run Forseti in a separate project:

  • Google Cloud Platform (GCP) API quota
    • Setting Forseti up in a separate project ensures that Forseti has the quota it needs for API calls and managing service accounts and roles.
  • Project permissions
    • Setting Forseti up in a separate project restricts who has access to your Forseti-related permissions and resources.
  • Forseti clean up
    • Setting Forseti up in a separate project allows you to easily clean up your Forseti-related data by deleting the project. Clean up includes the Compute Engine instance, Cloud SQL instance, Cloud Storage bucket, service accounts, and Cloud IAM policies.

If Forseti is reading data from only one project, your Forseti service account might have access only to that particular project. To get read access to all of the projects under your organization, add the service account to the organization’s Cloud IAM policy with the required roles. Your Organization Admin should be able to help you with that.

GCE VM instances have the unattended-upgrades tool to automatically update the operating system, software, or security patches from the Debian security repository.

However, kernel patches do not take effect until your VM instance is restarted. By default, GCE does not automatically restart running instances.So you must either restart your instances manually to update the kernel, or apply the mechanism provided by the unattended-upgrades tool to automatically do the restart.

Automatic updates from Debian security do not upgrade instances between major versions of the operating system. Debian also has a relevant guide: https://www.debian.org/doc/manuals/securing-debian-howto/index.en.html

Forseti is installed with the ubuntu account on the server VM. To update the cron job you need to SSH into the server VM and switch to the ubuntu user to update the cron job.

$ sudo crontab -u ubuntu -l # to see existing schedule
$ sudo crontab -u ubuntu -e # to edit cron schedule

Please follow the guidelines below, and the detailed steps in the referenced documentations, to install Forseti with internal IP only.

  • Prerequisites
  • Install Forseti
  • Configure Cloud SQL
    • enable internal IP
    • remove the external IP
  • Remove external IPs from the Forseti VMs
  • Firewall Rules: Depending on how your environment is setup, you’ll need to modify the firewall rules accordingly to allow SSH communication between the bastion host and Forseti VMs. A few suggestions:
    • Make sure the bastion host can access Forseti VMs
      • For example, create a tag-based rule allowing SSH connection between tag “bastion” and tag “forseti”, then tag the Forseti VMs and the bastion host as “forseti” and “bastion”, respectively
    • Modify firewall rules created by Forseti installer limiting them to the subnet instead of 0.0.0.0/0

You are all set! To verify it works, access the forseti VMs by connecting through a bastion host.

A few common causes if you cannot access Forseti VMs from the bastion host:

  • Your account does not have the appropriate permission
    • You might need to run to make sure gcloud could access your user credentials:
        gcloud auth login
      
  • Other firewall rules with higher priorities are blocking the SSH
  • Your metadata is not configured properly

Using Forseti

We have some starter documentation for defining rules. If you have more questions, you can ask for help at discuss@forsetisecurity.org.

By default, Forseti runs Inventory and Scanner every 2 hours at random minutes, using a simple cronjob. To change the cron value, edit the server’s deployment template.

The installation log is stored in /tmp/deployment.log on the Forseti Compute Engine instance. You can view it with any editor. For example:

vim /tmp/deployment.log

To find the Forseti Inventory, Scanner, and Enforcer logs:

  1. Go to the Google Cloud Platform Console Logs page.
  2. On the resources drop-down list, select GCE VM Instance.
  3. On the All logs drop-down list, select forseti.

You can implement bucket lifecycle rules to delete the output or migrate them to a lower cost class. You can also export the output to BigQuery.

  1. Follow the instruction here to add/change password of MySQL user root.

  2. ssh to the Forseti server VM.

  3. run command sudo vi /lib/systemd/system/forseti.service and you should see the following:

     [Unit]
     Description=Forseti API Server
     [Service]
     User=ubuntu
     Restart=always
     RestartSec=3
     ExecStart=/usr/local/bin/forseti_server --endpoint '[::]:50051' --forseti_db mysql://root@127.0.0.1:3306/forseti_security --config_file_path /home/ubuntu/forseti-security/configs/forseti_conf_server.yaml --services explain inventory model scanner notifier
     [Install]
     WantedBy=multi-user.target
     Wants=cloudsqlproxy.service
    
  4. Update the forseti_db flag to the following:

    
     [Unit]
     Description=Forseti API Server
     [Service]
     User=ubuntu
     Restart=always
     RestartSec=3
     ExecStart=/usr/local/bin/forseti_server --endpoint '[::]:50051' --forseti_db mysql://root:YOUR_PASSWORD@127.0.0.1:3306/forseti_security --config_file_path /home/ubuntu/forseti-security/configs/forseti_conf_server.yaml --services explain inventory model scanner notifier
     [Install]
     WantedBy=multi-user.target
     Wants=cloudsqlproxy.service
     
  5. Save and exit, run command sudo systemctl restart forseti to restart the forseti service and you should now be able to connect to the database with the password.

Security implications

Forseti uses a service account that is granted roles on the organization’s Cloud IAM policy. Because GCP roles are hierarchical, when someone has a Cloud IAM role at the organization level, child resources like folders and projects inherit the role. For example, if you grant the “Browser” role to someone at the organization level, they will also be able to see folders and projects within the organization.

For more information, see Service account for Forseti Security.

Because the Forseti service account needs many types of permissions to read certain data, you must grant grant Forseti the specific roles that it needs to do its job.

Google Cloud Platform Resource Coverage

This page lists the Google Cloud Platform (GCP) resources that currently have coverage in Forseti or are planned to have coverage. If a resource you’re interested in isn’t listed, please open an issue or contribute!

Resource coverage by CAI Resource coverage by API
App Engine Apps App Engine Instances
App Engine Services Cloud Dataproc Jobs
App Engine Version Compute Engine Routes
BigQuery Groups Settings
BigQuery Datasets G Suite Groups
BigQuery Tables G Suite Group Members
Billing Accounts G Suite Users
Buckets Kubernetes Engine NodePools
Bucket Access Controls Kubernetes Engine Services
Cloud Access Levels Project Billing
Cloud Access Policies Project Liens
Cloud APIs Configuration Stackdriver Billing Account Sinks
Cloud Audit Logging Configuration Stackdriver Folder Sinks
Cloud Dataproc Clusters Stackdriver Organization Sinks
Cloud IAM Grantable Roles Service Management
Cloud IAM Organization Roles Storage Object IAM
Cloud IAM Project Roles  
Cloud IAM Roles  
Cloud KMS CryptoKeys  
Cloud KMS CryptoKey Versions  
Cloud KMS KeyRings  
Cloud Organizations Policies  
Cloud Pub/Sub  
Cloud SQL  
Cloud Storage IAM Policies  
Compute Engine Addresses  
Compute Engine AutoScalers  
Compute Engine Backend Services  
Compute Engine Backend Buckets  
Compute Engine Backend Services  
Compute Engine Disks  
Compute Engine Forwarding Rules  
Compute Engine Global Addresses  
Compute Engine Global Forwarding Rules  
Compute Engine Health Checks  
Compute Engine Http Health Checks  
Compute Engine Https Health Checks  
Compute Engine Images  
Compute Engine Instances  
Compute Engine Instance Groups  
Compute Engine Instance Group Managers  
Compute Engine Instance Templates  
Compute Engine Interconnects  
Compute Engine Interconnect Attachments  
Compute Engine Licenses  
Compute Engine Projects  
Compute Engine Region Backend Service  
Compute Engine Routers  
Compute Engine Security Policies  
Compute Engine Snapshots  
Compute Engine SSL Certificates  
Compute Engine Target Http Proxies  
Compute Engine Target Https Proxies  
Compute Engine Target Instances  
Compute Engine Target Pools  
Compute Engine Target SSL Proxies  
Compute Engine Target TCP Proxies  
Compute Engine Target VPN Gateways  
Compute Engine URLMap  
Compute Engine VPN Tunnels  
Compute Service Perimeters  
DNS Managed Zones  
DNS Policies  
Firewalls  
Folders  
Folders Cloud IAM Policies  
G Suite Groups  
G Suite Group Members  
G Suite Users  
Kubernetes Engine Clusters  
Kubernetes Engine ClusterRoles  
Kubernetes Engine ClusterRoleBindings  
Kubernetes Engine Namespaces  
Kubernetes Engine Nodes  
Kubernetes Engine Pods  
Kubernetes Engine Roles  
Kubernetes Engine RoleBindings  
Kubernetes Engine Configurations  
Liens  
Load Balancer Forwarding Rules  
Logging Folder Sinks  
Logging Organization Sinks  
Logging Project Sinks  
Networks  
Objects  
Organizations  
Organizations Cloud IAM Policies  
Projects  
Projects Cloud IAM Policies  
Service Accounts  
Service Account Keys  
Spanner Databases  
Spanner Instances  
Subnetworks  

This page lists the Google Cloud Platform (GCP) scanners that currently have coverage in Forseti or are planned to have coverage. If a scanner you’re interested in isn’t listed, please open an issue or contribute!

For more information, see the scanner descriptions.

Scanner
Audit Logging Configuration Scanner
BigQuery Scanner
Blacklist Scanner
Bucket ACL Scanner
Cloud SQL ACL Scanner
Config Validator Scanner
Enabled APIs Scanner
External Project Access Scanner
Firewall Rules Scanner
Forwarding Rules Scanner
Google Groups Scanner
Groups Settings Scanner
Cloud IAM Rules Scanner
Cloud IAP Scanner
Instance Network Interface Scanner
Kubernetes Engine Scanner
Kubernetes Engine Version Scanner
KMS Scanner
Lien Scanner
Location Scanner
Log Sink Scanner
Resource Scanner
Retention Scanner
Role Scanner
Service Account Key Scanner

This section lists the Google Cloud Platform (GCP) enforcers that currently have coverage in Forseti or are planned to have coverage. If an enforcer you’re interested in isn’t listed, please open an issue or contribute!

For details about each of the enforcers, see the Enforcer guide.

Enforcer
Firewalls

This section lists the Google Cloud Platform (GCP) resources that currently have coverage using the Real-Time Enforcer. If a resource you’re interested in isn’t listed, please open an issue or contribute!

For details about each of the resources, see the Real-Time Enforcer guide.

Real-time Enforcer
Cloud Storage
Cloud SQL
BigQuery

Cloud Security Command Center only includes projects in an active state. The Forseti Inventory includes projects all possible states.

Learn more about project states in Google Cloud