GCP - Security Best Practices

GCP - Security Best Practices

Summary of Topics

A.???Using IAM Securely

B.???Rotate Cloud IAM service Account Access Keys periodically

C.???Enable VPC Flow Logs

D.???Ensure Cloud Storage Buckets have Logging and Versioning enabled

E.????Ensure Cloud Storage Buckets enforce appropriate Access Controls

F.????Access Logs & Storage Logs

G.???Object Versioning

H.???Ensure firewall rules are not overly permissive

I.??????Managing SSH Keys on Compute

J.????Encryption At-Rest & In-Motion

K.???Key Management Service

L.????Securing Google Cloud Databases

M.???3 ways to configure Robust Firewall on GCP

N.???User Account, Authorization & Password Management

O.???Compute Engine Security

P.????Org Images

Q.???Cloud Identity-aware-proxy

About GCP Security Basics

[A]

No alt text provided for this image

[B]

No alt text provided for this image

[C]

No alt text provided for this image

[D]

No alt text provided for this image

More information about understanding service accounts can be found at:

https://cloud.google.com/iam/docs/understanding-service-accounts

[E]

No alt text provided for this image

[F]

No alt text provided for this image

More information about Resource Hierarchy for Access Control can be found at:

https://cloud.google.com/iam/docs/resource-hierarchy-access-control

[F]

No alt text provided for this image

1.????Best Practice: Using IAM Securely

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

Grant Service Account Actor role on service account, not project.

More information about using IAM Securely can be found at:

https://cloud.google.com/iam/docs/using-iam-securely

2.????Best Practice: Rotate Cloud IAM service account access keys periodically

A service account is a special type of account that belongs to an application or instance, rather than to an individual user. Service accounts use account keys to authenticate to GCP, of which there are two types: GCP-managed keys, which are created and managed automatically, and User-managed keys.

User-managed keys are created, downloadable, and managed by users. Consequently, these keys should be rotated on a regular basis In order to ensure that the chance that a compromised key could be used without the knowledge of its owner is reduced. It goes without saying that these keys are highly sensitive, as their compromise would provide a potential attacker with a means to interact with your GCP resources.

3.????Best Practice: Enable VPC Flow Logs

VPC Flow Logs is a feature that enables capturing IP traffic information going to and from network interfaces in a VPC. It is recommended to enable flow logs for subnets hosting active instances, as they can help with a number of tasks: for example, it can help troubleshooting why specific traffic when this is not reaching an instance, which in turn can help diagnose overly restrictive firewall rules. In a secure environment, Flow Logs can also be used as a security tool to monitor the traffic that is reaching instances

No alt text provided for this image

More information about VPC flow logs can be found at:

https://cloud.google.com/vpc/docs/using-flow-logs#enabling_vpc_flow_logging

4.????Best Practice: Ensure Cloud Storage buckets have logging and versioning enabled

The logging and versioning features of Cloud Storage should be enabled for buckets that contain important data.

The logging feature helps during the investigation of security incidents, as it enables maintaining access and modification logs for storage buckets. Versioning is a means of keeping multiple variants of an object in the same bucket. This preserve and allows retrieving and restoring every version of every object stored in the buckets for which versioning has been enabled. With versioning enabled, buckets can recover from both unintended user actions and application failures.

5.????Best Practice: Ensure Cloud Storage buckets enforce appropriate access controls

Cloud Storage buckets are often used to store sensitive data, as well as to host static resources for web applications. It is important to ensure bucket access controls enforce the principle of least privilege, so that resources cannot be accessed or modified by unauthorized parties.

In particular, the usage of the following identifiers should be restricted:

  • “allAuthenticatedUsers” represents anyone who is authenticated with a Google account or a service account. It is important to understand that these users may not be part of your Organization or Project
  • “allUsers” represents anyone who is on the internet, including authenticated and unauthenticated users.

6.????Best Practice: Access Logs & Storage Logs

This topic discusses how to download and review access logs and storage information for your Cloud Storage buckets,

Cloud Storage offers access logs and storage logs in the form of CSV files that you can download and view. Access logs provide information for all of the requests made on a specified bucket and are created hourly, while the daily storage logs provide information about the storage consumption of that bucket for the last day. The access logs and storage logs are automatically created as new objects in a bucket that you specify. Analyse the logs using?Google BigQuery. Data access log should be provided to very limited people.

No alt text provided for this image
No alt text provided for this image

More information about Access & Storage Logs can be found at:

https://cloud.google.com/storage/docs/access-logs#delivery

7.????Best practice: Object Versioning

To support the retrieval of objects that are deleted or overwritten, Cloud Storage offers the Object Versioning feature. This page describes the feature and the options available when using it. To learn how to enable and use Object Versioning see?Using Object Versioning.

Enable Object Versioning to protect your Cloud Storage data from being overwritten or accidentally deleted. Enabling Object Versioning increases?storage costs, which can be partially mitigated by configuring?Object Lifecycle Management?to delete older object versions.

No alt text provided for this image

More information about Object Versioning can be found at:

https://cloud.google.com/storage/docs/object-versioning

8.????Best Practice: Ensure firewall rules are not overly permissive

Where possible, VPC firewall rules should be configured so that access to specific network services is restricted to just those hosts that have a legitimate business requirement for access

9.?????Best Practice: Managing SSH Keys on compute

If you just want to access your resources through web console or gcloud, automatic key management is enough. If you want to use existing on-prem keys, you can manage manually by setting them on SSH keys metadata field and that would be public key for your instances. If you want to allow all of your developers to all VM’s in project, you can set once public key in project metadata that gets inherited by all instances. Instance metadata for a contractor or specific individual.

No alt text provided for this image

More information about SSH Keys can be found at:

https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys

https://cloudplatform.googleblog.com/2015/10/managing-SSH-access-with-Compute-User-Accounts.html

10.??Best Practice: Encryption @ Rest & In-Motion

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

More information about Encryption At-Rest & In-Motion can be found at:

https://cloud.google.com/security/encryption-at-rest/

https://cloud.google.com/blog/products/gcp/how-google-protects-your-data-in-transit

11.??Best Practice: Key management Service

How to keep secret as secret- One person or one team can manage the keys, another person or another team can manage the secrets. First thing to do is take the API secret key, send it to cloud KMS, pick the particular key and key ring wanted, and it gives us the encrypted blob to store. Place it in a Google Cloud Storage in a bucket as the encrypted blob. When application starts it does two things. First it connects to Google Cloud Storage and reads that blob from the bucket. Setup all permissions and role to pull that down. As next step it goes to cloud KMS, it sends the encrypted blob, and then it returns a decrypted version of it, and says here is your API key. So it makes sense of delinking and separation of duties.

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

More information about GCP KMS can be found at:

https://cloud.google.com/kms/docs/

More information about GCP Secret Management can be found at:

https://cloud.google.com/kms/docs/secret-management

12.??Best Practice: Securing google cloud databases

project metadata Implement security control on Data Security, Access Controls, Configuration (Password Management, Service Account, Logging & Alerting), Application Considerations, Self-hosted database concerns etc.

More information about GCP database security can be found at:

https://cloud.google.com/blog/products/gcp/best-practices-for-securing-your-google-cloud-databases

13.??Best Practice: Configure robust firewall on GCP

ü?Configure firewall rules with Service Accounts - firewall rules using service accounts, instead of using tags,?

ü?Creating custom IAM role for the InstanceAdmin - custom role?with more restricted permissions that disable the ability to set tags on VMs

ü?Using subnetworks to partition workloads - using source or destination IP CIDR ranges if the workloads can be partitioned into subnetworks of distinct ranges

More information about GCP database security can be found at:

https://cloud.google.com/blog/products/gcp/three-ways-to-configure-robust-firewall-rules

14.??Best Practice: User Account, Authorization & Password Management

More information about GCP database security can be found at:

https://cloud.google.com/blog/products/gcp/12-best-practices-for-user-account

15.??Best Practice: Compute Engine Security

More information about Securely Connecting to VM Instances can be found at:

https://cloud.google.com/solutions/connecting-securely

More information about Verifying VM Identity can be found at:

https://cloud.google.com/compute/docs/instances/verifying-instance-identity

16.??Best Practice: Org Images

No alt text provided for this image
No alt text provided for this image

More information about Image Management can be found at:

https://cloud.google.com/solutions/image-management-best-practices

17.??Best Practice: Cloud identity-aware-proxy

Other Security Best Practices

[A]

No alt text provided for this image

[B]

No alt text provided for this image

[C]

No alt text provided for this image

GCP Security Bookmarks-

About GCP Platform Security –

GCP Security & Identity –

https://cloud.google.com/docs/#security-and-identity

GCP Security new features –

https://techgenix.com/gcp-security-features/

GCP Best practices for Enterprise Organizations –

https://cloud.google.com/docs/enterprise/best-practices-for-enterprise-organizations

GCP Security – How-To-Guides

https://cloud.google.com/kms/docs/how-tos

要查看或添加评论,请登录

Rajeev kumar的更多文章

  • Network Security Attack Types

    Network Security Attack Types

    Glossary Description ARP spoofing is the process of linking an attacker’s MAC address with the IP address of a…

  • Apache Tomcat Security Best Practices:

    Apache Tomcat Security Best Practices:

    . Don't run Tomcat as the root user This line of er accounts with a high level of administrative access.

  • Indicators of Compromise

    Indicators of Compromise

    Indicators of Compromise Indicators of compromise (IOCs) serve as forensic evidence of potential intrusions, unusual…

  • Data Privacy

    Data Privacy

    Data Privacy Day, January 28 In 2006, the Council of Europe decided to launch a Data Protection Day, to be celebrated…

  • Spam vs Phishing

    Spam vs Phishing

    It is not surprising that most of us have encountered numerous spam and phishing emails in our inbox and believe it or…

  • Slack (Messenger) Security Best Practices

    Slack (Messenger) Security Best Practices

    While Slack gives us immense flexibility and convenience while connecting with people, it gives a gateway to bad actors…

  • Remote Workers - Cyber Security Advice

    Remote Workers - Cyber Security Advice

    Unfortunately, remote working and cybersecurity concerns go hand in hand. Individuals and corporations continue to face…

  • How To Handle Phishing Emails

    How To Handle Phishing Emails

    1. If you receive a phishing e-mail message, do not respond to it.

  • Firewall Rules – Best Practices

    Firewall Rules – Best Practices

    1. Document your firewall rules - Use Comments to Explain the Purpose of Special Rules Anyone who works on your IT…

  • Bypassing MFA

    Bypassing MFA

    Bypassing MFA Independent of which authentication technology you use, implementation flaws and misconfigurations can…

社区洞察

其他会员也浏览了