Skip to content

Conversation

@timothyb89
Copy link
Contributor

@timothyb89 timothyb89 commented Oct 29, 2025

Backport of #60386 for branch/v18

I re-tested the backport against a live Env0 tenant without any trouble. Note that as written this functionality will not be usable without #60293, but will work as expected once merged.


  • Add Env0 method

This adds a new env0 join method to support joining from env0 workflows, and especially the embedded tbot in the Terraform provider when running on env0.

This is the first OIDC join method on the new join service, and will not support legacy joining. As such, it won't be backported beyond v18.

Closes #53798

changelog: Add new env0 join method to support joining within Env0 workflows

  • Fix imports

  • Fix failing test

  • Add env0 token source

  • Fix missing env0 join method in tbot

  • Fix env0 validation

This fixes some issues in env0 token validation:

  • azp check is disabled since it's set to a random (ish) value
  • Use correct audience URL (their docs specified the wrong value)
  • Fix incorrect date in new file copyright header

  • Fix generated tfschema

  • Fix failing test after adding the token source

  • First round of code review

  • Add example token claims in comment

  • Move common OIDC handling logic into a separate handler

Specific validation logic is now separate and the validator is passed as an argument to a generic handleOIDCJoin() handler.

  • Fix imports

  • Rename joinclient/join_env0.go to join_oidc.go

@github-actions
Copy link

github-actions bot commented Oct 29, 2025

Amplify deployment status

Branch Commit Job ID Status Preview Updated (UTC)
timothyb89/v18/env0-joining a1b4c3f 7 ✅SUCCEED timothyb89-v18-env0-joining 2025-11-13 18:23:12

@timothyb89
Copy link
Contributor Author

Note, this depends on a few PRs:

@timothyb89 timothyb89 force-pushed the timothyb89/v18/env0-joining branch from ced0cac to 03ac710 Compare October 31, 2025 01:14
* Add Env0 method

This adds a new `env0` join method to support joining from env0
workflows, and especially the embedded tbot in the Terraform provider
when running on env0.

This is the first OIDC join method on the new join service, and will
not support legacy joining. As such, it won't be backported beyond
v18.

Closes #53798

changelog: Add new `env0` join method to support joining within Env0 workflows

* Fix imports

* Fix failing test

* Add env0 token source

* Fix missing env0 join method in tbot

* Fix env0 validation

This fixes some issues in env0 token validation:
- azp check is disabled since it's set to a random (ish) value
- Use correct audience URL (their docs specified the wrong value)

* Fix incorrect date in new file copyright header

* Fix generated tfschema

* Fix failing test after adding the token source

* First round of code review

* Add example token claims in comment

* Move common OIDC handling logic into a separate handler

Specific validation logic is now separate and the validator is passed
as an argument to a generic `handleOIDCJoin()` handler.

* Fix imports

* Rename joinclient/join_env0.go to join_oidc.go
@timothyb89 timothyb89 force-pushed the timothyb89/v18/env0-joining branch from 03ac710 to 8b6a05e Compare November 3, 2025 23:39
@timothyb89 timothyb89 changed the base branch from nklaassen/v18/new-join-service-used to branch/v18 November 3, 2025 23:39
@timothyb89 timothyb89 marked this pull request as ready for review November 3, 2025 23:40
@public-teleport-github-review-bot

@timothyb89 - this PR will require admin approval to merge due to its size. Consider breaking it up into a series smaller changes.

Copy link
Contributor

@strideynet strideynet left a comment

Choose a reason for hiding this comment

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

Have we manually tested this backport? If so, can we record that on the PR with what has been tested?

@timothyb89
Copy link
Contributor Author

timothyb89 commented Nov 5, 2025

Have we manually tested this backport? If so, can we record that on the PR with what has been tested?

Fair call out - I did manually retest it against my Env0 tenant without any trouble. I've added a note to the PR description about this as well.

@timothyb89 timothyb89 enabled auto-merge November 13, 2025 18:18
@timothyb89 timothyb89 added this pull request to the merge queue Nov 13, 2025
Merged via the queue into branch/v18 with commit fbdf883 Nov 13, 2025
43 checks passed
@timothyb89 timothyb89 deleted the timothyb89/v18/env0-joining branch November 13, 2025 18:57
@aadc-dev aadc-dev mentioned this pull request Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants