1. Google Cloud Documentation - About OS Login: "OS Login lets you use Compute Engine IAM roles to grant and revoke SSH access to your Linux instances... OS Login is the recommended way to manage many users across multiple instances or projects." This document also specifies that you enable OS Login by setting the enable-oslogin metadata value to TRUE.
Source: Google Cloud Documentation
"About OS Login".
2. Google Cloud Documentation - Set up OS Login: "After you enable OS Login on one or more instances in your project
you need to grant the necessary IAM roles to users." It lists roles/compute.osLogin as the role required to connect to instances.
Source: Google Cloud Documentation
"Set up OS Login"
Step 2: Grant necessary IAM roles.
3. Google Cloud Documentation - Compute Engine predefined IAM roles: The compute.osLogin role is described as providing "permissions to log in to Compute Engine instances using OS Login. This role does not grant administrator access." This confirms it as the appropriate least-privilege role.
Source: Google Cloud Documentation
"Compute Engine IAM roles"
Predefined roles table.
4. Google Cloud Documentation - Managing SSH keys in metadata: This document describes the manual method of managing keys and contrasts it with OS Login. It explains that blocking project-wide keys is a way to restrict access
but it still relies on manually adding instance-level keys
which is less manageable than OS Login.
Source: Google Cloud Documentation
"Managing SSH keys in metadata"
section "Instance-level public SSH keys".