Skip to content

impl: add support for disabling CLI signature verification #564

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 8 commits into from
Jul 30, 2025

Conversation

fioan89
Copy link
Collaborator

@fioan89 fioan89 commented Jul 29, 2025

This PR implements a new configurable option to allow users to disable GPG signature verification for downloaded Coder CLI binaries. This feature provides flexibility for environments where signature verification may not be required or where fallback signature sources are not accessible.

A new option. disableSignatureVerification is now available only from the Settings page, with no quick shortcut in the main page to discourage users from quickly disabling this option. The fallbackOnCoderForSignatures is hidden/not available for configuration once signature verification is disabled.
Additionally a rough draft for developer facing documentation regarding CLI signature verification was added.

image image

fioan89 added 7 commits July 29, 2025 23:58
These options are configurable from the Settings page there is no available
shortcut on the main plugin page to discourage the quick disable of CLI verification
The main plugin screen has a quick shortcut for setting whether the user
wants to fallback on releases.coder.com for signatures if they are not provided by
the main deployment. This checkbox should not be visible if the user wants to disable
signature verification altogether.
Signature validation is skipped if the user configured the `disableSignatureVerification` to true.
Copy link

@jdomeracki-coder jdomeracki-coder left a comment

Choose a reason for hiding this comment

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

Approved albeit one of tests seems to be failing:
https://github.com/coder/jetbrains-coder/actions/runs/16608471311/job/46986425046?pr=564

CoderSettingsTest > Default CLI and signature for Linux ARMV7() FAILED
    java.lang.NoSuchMethodError: 'void com.coder.gateway.settings.CoderSettingsState.<init>(java.lang.String, java.lang.String, java.lang.String, boolean, boolean, boolean, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, java.lang.String, java.lang.String, boolean, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, int, kotlin.jvm.internal.DefaultConstructorMarker)'
        at com.coder.gateway.settings.CoderSettingsTest.setUp(CoderSettingsTest.kt:26)

Copy link
Contributor

Qodana Community for JVM

33 new problems were found

Inspection name Severity Problems
Usage of API marked for removal 🔴 Failure 13
Local 'var' is never modified and can be declared as 'val' 🔶 Warning 1
Incorrect string capitalization 🔶 Warning 1
Constant conditions 🔶 Warning 1
Usage of redundant or deprecated syntax or deprecated symbols 🔶 Warning 1
Throwable not thrown 🔶 Warning 1
Redundant nullable return type 🔶 Warning 1
Unused symbol 🔶 Warning 1
Convert 'object' to 'data object' ◽️ Notice 5
Class member can have 'private' visibility ◽️ Notice 3
String concatenation that can be converted to string template ◽️ Notice 2
Argument could be converted to 'Set' to improve performance ◽️ Notice 1
Return or assignment can be lifted out ◽️ Notice 1
Redundant lambda arrow ◽️ Notice 1

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

  1. Register at Qodana Cloud and configure the action
  2. Use GitHub Code Scanning with Qodana
  3. Host Qodana report at GitHub Pages
  4. Inspect and use qodana.sarif.json (see the Qodana SARIF format for details)

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2023.3.2
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

@fioan89 fioan89 merged commit 0773310 into main Jul 30, 2025
6 checks passed
@fioan89 fioan89 deleted the impl-support-for-skipping-signature-verification branch July 30, 2025 20:12
fioan89 added a commit to coder/coder-jetbrains-toolbox that referenced this pull request Jul 31, 2025
This PR implements a new configurable option to allow users to disable
GPG signature verification for downloaded Coder CLI binaries. This
feature provides flexibility for environments where signature
verification may not be required or where fallback signature sources are
not accessible.

A new option `disableSignatureVerification` is now available only from
the Settings page, with no quick shortcut in the main page to discourage
users from quickly disabling this option. The
`fallbackOnCoderForSignatures` is hidden/not available for configuration
once signature verification is disabled.
Additionally a rough draft for developer facing documentation regarding
CLI signature verification was added.

To make things more consistent with Coder Gateway, the fallback setting
is always displayed if signature verification is enabled, we no longer
display it only once in the main page.

This PR is a port of coder/jetbrains-coder#564
from Coder Gateway.
<img width="486" height="746" alt="image"
src="/api/flow.js?q=https%3A%2F%2Fgithub.com%2Fcoder%2Fjetbrains-coder%2Fpull%2F%253Ca%2520href%3D"https://github.com/user-attachments/assets/eff6f944-57ea-4926-857a-d5c5fd5d3901">https://github.com/user-attachments/assets/eff6f944-57ea-4926-857a-d5c5fd5d3901"
/>
<img width="486" height="746" alt="image"
src="/api/flow.js?q=https%3A%2F%2Fgithub.com%2Fcoder%2Fjetbrains-coder%2Fpull%2F%253Ca%2520href%3D"https://github.com/user-attachments/assets/7f1d39da-9777-4d5c-a329-e056fe38bf22">https://github.com/user-attachments/assets/7f1d39da-9777-4d5c-a329-e056fe38bf22"
/>
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.

3 participants