Arrajj
Arrajj

Reputation: 187

How to expose IP of a VM to only authenticated users in GCP Project

The use case is the following:

What are the best practices to keep it private and to access it eg. with OAuth authentication? What are the steps to make and to follow?

Appreciate your help with this.

Upvotes: 0

Views: 250

Answers (1)

John Hanley
John Hanley

Reputation: 81386

There are several methods in Google Cloud. The second method is the recommended method based upon the requirements in your question.

  1. If the users have defined public IP addresses, use Google Cloud VPC firewall rules to only allow access from approved IP addresses.
  2. Do not assign a static public IP address to the instance. Add an HTTP(S) Load Balancer and enable IAP. Add each user's identity to IAP for identity-based access control.

Additional methods suitable for developers:

  1. My favorite is to use WireGuard (VPN) and use peer-based access control.

Upvotes: 1

Related Questions