Skip to content

feat: add session token injection to provisioner #7461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
May 18, 2023
Merged

Conversation

sreya
Copy link
Collaborator

@sreya sreya commented May 9, 2023

This PR adds the plumbing necessary for referencing the coder_session_token data source in the TF provider.

fixes #6354

@sreya sreya changed the title feat: add session token to provisioner feat: add session token injection to provisioner May 9, 2023
@sreya sreya marked this pull request as ready for review May 10, 2023 01:34
@sreya sreya requested a review from kylecarbs May 10, 2023 02:27
@sreya sreya force-pushed the jon/tfsessiontoken branch from 6bfc274 to 6ad169d Compare May 16, 2023 04:10
@sreya sreya requested a review from mtojek May 16, 2023 04:10
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

Nice piece of code, Jon!

@@ -220,6 +220,7 @@ func provisionEnv(config *proto.Provision_Config, params []*proto.ParameterValue
"CODER_WORKSPACE_OWNER_OIDC_ACCESS_TOKEN="+config.Metadata.WorkspaceOwnerOidcAccessToken,
"CODER_WORKSPACE_ID="+config.Metadata.WorkspaceId,
"CODER_WORKSPACE_OWNER_ID="+config.Metadata.WorkspaceOwnerId,
"CODER_SESSION_TOKEN="+config.Metadata.CoderSessionToken,
Copy link
Member

Choose a reason for hiding this comment

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

I doubt it, but maybe you want to confirm that we don't leak it somewhere in the provisioner logs presented in the debug mode (Try with debug mode).

@sreya sreya requested a review from mtojek May 17, 2023 00:51
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

LGTM, all comments addressed.

@sreya sreya merged commit ec5ef51 into main May 18, 2023
@sreya sreya deleted the jon/tfsessiontoken branch May 18, 2023 04:29
@github-actions github-actions bot locked and limited conversation to collaborators May 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pre-authenticate coder CLI on the Workspace
2 participants