Skip to content

Port gcp join method to new join service#61205

Merged
timothyb89 merged 3 commits intomasterfrom
timothyb89/new-join-service-gcp
Nov 18, 2025
Merged

Port gcp join method to new join service#61205
timothyb89 merged 3 commits intomasterfrom
timothyb89/new-join-service-gcp

Conversation

@timothyb89
Copy link
Copy Markdown
Contributor

@timothyb89 timothyb89 commented Nov 11, 2025

This ports the gcp join method to the new join service. It moves join-related code from lib/gcp to lib/join/gcp, extracts common joining logic to lib/join/gcp for reuse between the legacy and new entrypoints, and adds a compatibility layer for use by the legacy client.

Successfully tested using a GCP instance and a cloud tenant:

  • From an old client to a cloud tenant running this branch
  • From a new client to a cloud tenant running this branch
  • From a new client to a cloud tenant running an old branch

See also: RFD 27e

@timothyb89 timothyb89 force-pushed the timothyb89/new-join-service-gcp branch 2 times, most recently from a076117 to cd230b0 Compare November 12, 2025 00:04
@timothyb89 timothyb89 added the no-changelog Indicates that a PR does not require a changelog entry label Nov 12, 2025
Comment thread lib/join/gcp/gcp.go

// isGCPZoneInLocation checks if a zone belongs to a location, which can be
// either a zone or region.
func isGCPZoneInLocation(rawLocation, rawZone string) bool {
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.

Review note, I pulled this into this package since it was only actually used here. The test lived in a different package which required it to be exported despite only being used in this same file. I removed the export and moved the unit tests here.

Comment thread lib/auth/join_gcp.go

// Where possible, try to return any extracted claims along with the error
// to improve audit logs for failed join attempts.
return claims, trace.Wrap(err)
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.

Minor behavior change: we didn't return claims on rule verification failure before, which has now been fixed. (This is just for auditing purposes, as the comment indicates.)

Base automatically changed from timothyb89/new-join-service-gitlab to master November 13, 2025 02:34
This ports the `gcp` join method to the new join service. It moves
join-related code from `lib/gcp` to `lib/join/gcp`, extracts common
joining logic to `lib/join/gcp` for reuse between the legacy and new
entrypoints, and adds a compatibility layer for use by the legacy
client.

See also: [RFD 27e](https://github.com/gravitational/teleport.e/blob/master/rfd/0027e-auth-assigned-uuids.md)
@timothyb89 timothyb89 force-pushed the timothyb89/new-join-service-gcp branch from 9e625a3 to 3a62144 Compare November 13, 2025 03:20
@timothyb89 timothyb89 marked this pull request as ready for review November 13, 2025 03:20
@timothyb89 timothyb89 requested review from nklaassen and removed request for codingllama and flyinghermit November 13, 2025 03:21
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from boxofrad November 17, 2025 19:40
@timothyb89 timothyb89 added this pull request to the merge queue Nov 18, 2025
Merged via the queue into master with commit b71bb38 Nov 18, 2025
47 checks passed
@timothyb89 timothyb89 deleted the timothyb89/new-join-service-gcp branch November 18, 2025 01:05
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@timothyb89 See the table below for backport results.

Branch Result
branch/v18 Failed

timothyb89 added a commit that referenced this pull request Nov 26, 2025
* Port `gcp` join method to new join service

This ports the `gcp` join method to the new join service. It moves
join-related code from `lib/gcp` to `lib/join/gcp`, extracts common
joining logic to `lib/join/gcp` for reuse between the legacy and new
entrypoints, and adds a compatibility layer for use by the legacy
client.

See also: [RFD 27e](https://github.com/gravitational/teleport.e/blob/master/rfd/0027e-auth-assigned-uuids.md)

* Add GCP to new join service whitelist

* Rename checkAndSetDefaults() to validate()
github-merge-queue bot pushed a commit that referenced this pull request Dec 1, 2025
* Port `gcp` join method to new join service

This ports the `gcp` join method to the new join service. It moves
join-related code from `lib/gcp` to `lib/join/gcp`, extracts common
joining logic to `lib/join/gcp` for reuse between the legacy and new
entrypoints, and adds a compatibility layer for use by the legacy
client.

See also: [RFD 27e](https://github.com/gravitational/teleport.e/blob/master/rfd/0027e-auth-assigned-uuids.md)

* Add GCP to new join service whitelist

* Rename checkAndSetDefaults() to validate()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/branch/v18 no-changelog Indicates that a PR does not require a changelog entry size/md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants