Skip to content

RFD - GCP VM Auto-discovery#23946

Merged
atburke merged 1 commit intomasterfrom
atburke/rfd-gcp-join
Apr 26, 2023
Merged

RFD - GCP VM Auto-discovery#23946
atburke merged 1 commit intomasterfrom
atburke/rfd-gcp-join

Conversation

@atburke
Copy link
Copy Markdown
Contributor

@atburke atburke commented Mar 31, 2023

RFD for adding the ability to discover and automatically register GCP VMs, including a new gcp join method.

@atburke atburke added the rfd Request for Discussion label Mar 31, 2023
@atburke atburke requested a review from strideynet March 31, 2023 23:12
@github-actions github-actions Bot requested review from fspmarshall and gzdunek March 31, 2023 23:12
Comment thread rfd/xxxx-gcp-server-discovery.md
Comment thread rfd/xxxx-gcp-server-discovery.md
Comment thread rfd/xxxx-gcp-server-discovery.md
Comment thread rfd/xxxx-gcp-server-discovery.md
Comment thread rfd/xxxx-gcp-server-discovery.md
Comment thread rfd/xxxx-gcp-server-discovery.md
@r0mant r0mant self-requested a review April 5, 2023 17:02
Comment thread rfd/xxxx-gcp-server-discovery.md
system initially supporting DEB and RPM based distros that Teleport already
provides packages for.

To run commands on a VM, the Discovery Service will create a short-lived
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How long will the key be valid for and what will happen to it after we're done with installation?

Is there a way to use SSH certificate authentication with the VMs instead of key pair?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can set an expiry on the key in the metadata (although it won't get deleted automatically).

I don't believe there's a way to use SSH cert authentication; creating key pairs is what GCP recommends.

ssh key pair and add the public key to the VM via its metadata. Then it will
run the installer on the VM over SSH.

> Note: GCP VMs using [OS Login](https://cloud.google.com/compute/docs/oslogin) do not support SSH keys in instance metadata.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For OS Login enabled VMs, can Teleport generate some auth token and login as the IAM user? Not saying we should do it right away, just curious if there's such an option.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK no, OS Login is only for Google accounts.

provides packages for.

To run commands on a VM, the Discovery Service will create a short-lived
ssh key pair and add the public key to the VM via its metadata. Then it will
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does setting key in metadata take effect immediately?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

Comment thread rfd/xxxx-gcp-server-discovery.md Outdated
Comment thread rfd/xxxx-gcp-server-discovery.md Outdated
Comment thread rfd/xxxx-gcp-server-discovery.md Outdated
- [Verifying GCP VM Identity](https://cloud.google.com/compute/docs/instances/verifying-instance-identity)
- [SSH on GCP VMs](https://cloud.google.com/compute/docs/instances/ssh#third-party-tools)

## Appendix I - Example ID token payload
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also include IaC flows in the scope of the RFD (whether any Helm charts, Kube operator or Terraform provider changes will be needed).

@zmb3
Copy link
Copy Markdown
Collaborator

zmb3 commented Apr 7, 2023

In the future, please try to follow the branch naming conventions for RFDs:

1. make a branch off of `master` called `rfd/$number-your-title`
In our example, it'll be branch `rfd/0018-irc-access`.

Comment thread rfd/xxxx-gcp-server-discovery.md
@atburke
Copy link
Copy Markdown
Contributor Author

atburke commented Apr 25, 2023

@strideynet @r0mant Mind taking another look at this?

@strideynet strideynet self-requested a review April 26, 2023 07:49
Comment thread rfd/xxxx-gcp-server-discovery.md Outdated
state: draft
---

# RFD X - GCP auto-discovery
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget to assign the number.

Comment thread rfd/xxxx-gcp-server-discovery.md Outdated

## Required Approvers

Engineering: @jakule && @r0mant
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think Jakub is going to be able to review this anymore.

Suggested change
Engineering: @jakule && @r0mant
Engineering: @strideynet && @r0mant

@atburke atburke force-pushed the atburke/rfd-gcp-join branch from 4e4f706 to e47c65b Compare April 26, 2023 20:59
@atburke atburke enabled auto-merge April 26, 2023 20:59
@atburke atburke added this pull request to the merge queue Apr 26, 2023
Merged via the queue into master with commit 7a90a0f Apr 26, 2023
@atburke atburke deleted the atburke/rfd-gcp-join branch April 26, 2023 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rfd Request for Discussion size/md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants