Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(provisioner): pass owner git ssh key#13366

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
johnstcn merged 4 commits intomainfromcj/provisionerd-ssh-key
May 29, 2024

Conversation

johnstcn
Copy link
Member

@johnstcnjohnstcn commentedMay 24, 2024
edited
Loading

Related tocoder/terraform-provider-coder#219
Passes owner git SSH key to proto metadata that gets passed to the terraform provider.

NOTE: requires a release of coder/terraform-provider-coder before merge.

@johnstcnjohnstcn self-assigned thisMay 24, 2024
@@ -202,6 +202,8 @@ func provisionEnv(
"CODER_WORKSPACE_OWNER_NAME="+metadata.GetWorkspaceOwnerName(),
"CODER_WORKSPACE_OWNER_OIDC_ACCESS_TOKEN="+metadata.GetWorkspaceOwnerOidcAccessToken(),
"CODER_WORKSPACE_OWNER_GROUPS="+string(ownerGroups),
"CODER_WORKSPACE_OWNER_SSH_PUBLIC_KEY="+metadata.GetWorkspaceOwnerSshPublicKey(),
"CODER_WORKSPACE_OWNER_SSH_PRIVATE_KEY="+metadata.GetWorkspaceOwnerSshPrivateKey(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this safe to do?

I suppose if the provisioner is compromised all bets are off, but just curious if there is anything we should be sensitive to here in relation to passing the privkey around.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

The safety of these values is predicated on
a) trusting the provisioner that's executing the job,
b) trusting the communication channel between the provisioner and coder.

So if someone can either access the environment variables of theterraform-provider-coder process, or intercept the communication path between provisionerd and coderd, then all bets are off.

Apart from that, this is a sensitive variable just like the OIDC access token or Coder session token that get passed in the same way.

dannykopping and matifali reacted with thumbs up emoji
@johnstcnjohnstcnforce-pushed thecj/provisionerd-ssh-key branch from2254e0e to3a9a7d1CompareMay 28, 2024 12:02
@johnstcnjohnstcn changed the titlefeat(provisionerdserver): pass owner git ssh keyfeat(provisioner): pass owner git ssh keyMay 29, 2024
Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

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

I'd like to see a bit more error handling, but other than that, LGTM!

@johnstcnjohnstcn merged commitcca3cb1 intomainMay 29, 2024
30 checks passed
@johnstcnjohnstcn deleted the cj/provisionerd-ssh-key branchMay 29, 2024 10:43
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMay 29, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mafredrimafredrimafredri approved these changes

@dannykoppingdannykoppingdannykopping approved these changes

Assignees

@johnstcnjohnstcn

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@johnstcn@mafredri@dannykopping

[8]ページ先頭

©2009-2025 Movatter.jp