Skip to content

Adding Header Commands To The Download CLI phase #323

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 6 commits into from
Nov 2, 2023

Conversation

liorb-canva
Copy link
Contributor

Background:

The login phase of the JetBrains Coder plugin involves downloading a fresh CLI binary from the control plane. However, if the control plane is located behind a VPN or protected by Cloudflare, it requires passing relevant tokens to the download request to ensure a successful download. To handle this, JetBrains Coder introduces the concept of "header commands" as a means of adding these tokens.

Changes Made:

This pull request addresses the need to support header commands by utilizing them when downloading the CLI binary

What's Included:

  1. Added Support for Header Commands: This PR includes the necessary changes to enable the use of header commands during the CLI binary download process.

Why This Matters:

Enabling header commands support for CLI binary downloads is crucial for ensuring the seamless operation of the JetBrains Coder plugin in environments where the control plane is protected by VPN or Cloudflare. This enhancement will improve the reliability and functionality of the plugin in such scenarios.

How to Verify:

  • Deploy the plugin with these changes.
  • Attempt to log in to the JetBrains Coder plugin in an environment behind a VPN or protected by Cloudflare.
  • Verify that the CLI binary download successfully uses the header commands to pass the required tokens.

Thank you for your time and consideration! 🙌

@liorb-canva liorb-canva changed the title 🚀 GitHub PR Description: Adding Header Commands To The Download CLI phase Adding Header Commands To The Download CLI phase Nov 2, 2023
Copy link
Collaborator

@spikecurtis spikecurtis left a comment

Choose a reason for hiding this comment

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

some suggestions & comments inline

liorb-canva and others added 2 commits November 2, 2023 18:58
Co-authored-by: Spike Curtis <spike@spikecurtis.com>
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

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

LGTM!

For good measure, I'd like to see CODER_HEADER supported as well. However, that's not implemented in the settings, so feel free to disregard this comment.

Copy link
Member

@code-asher code-asher left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this! Was a big miss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants