@@ -109,6 +109,69 @@ If `ide_product_code` and `ide_build_number` is missing, Toolbox will only open
109
109
page. Coder Toolbox will attempt to start the workspace if it’s not already running; however, for the most reliable
110
110
experience, it’s recommended to ensure the workspace is running prior to initiating the connection.
111
111
112
+ ## GPG Signature Verification
113
+
114
+ The Coder Toolbox plugin starting with version * 0.5.0* implements a comprehensive GPG signature verification system to
115
+ ensure the authenticity and integrity of downloaded Coder CLI binaries. This security feature helps protect users from
116
+ running potentially malicious or tampered binaries.
117
+
118
+ ### How It Works
119
+
120
+ 1 . ** Binary Download** : When connecting to a Coder deployment, the plugin downloads the appropriate Coder CLI binary for
121
+ the user's operating system and architecture from the deployment's ` /bin/ ` endpoint.
122
+
123
+ 2 . ** Signature Download** : After downloading the binary, the plugin attempts to download the corresponding ` .asc `
124
+ signature file from the same location. The signature file is named according to the binary (e.g.,
125
+ ` coder-linux-amd64.asc ` for ` coder-linux-amd64 ` ).
126
+
127
+ 3 . ** Fallback Signature Sources** : If the signature is not available from the deployment, the plugin can optionally fall
128
+ back to downloading signatures from ` releases.coder.com ` . This is controlled by the ` fallbackOnCoderForSignatures `
129
+ setting.
130
+
131
+ 4 . ** GPG Verification** : The plugin uses the BouncyCastle library to verify the detached GPG signature against the
132
+ downloaded binary using Coder's trusted public key.
133
+
134
+ 5 . ** User Interaction** : If signature verification fails or signatures are unavailable, the plugin presents security
135
+ warnings to users, allowing them to accept the risk and continue or abort the operation.
136
+
137
+ ### Verification Process
138
+
139
+ The verification process involves several components:
140
+
141
+ - ** ` GPGVerifier ` ** : Handles the core GPG signature verification logic using BouncyCastle
142
+ - ** ` VerificationResult ` ** : Represents the outcome of verification (Valid, Invalid, Failed, SignatureNotFound)
143
+ - ** ` CoderDownloadService ` ** : Manages downloading both binaries and their signatures
144
+ - ** ` CoderCLIManager ` ** : Orchestrates the download and verification workflow
145
+
146
+ ### Configuration Options
147
+
148
+ Users can control signature verification behavior through plugin settings:
149
+
150
+ - ** ` disableSignatureVerification ` ** : When enabled, skips all signature verification. This is useful for clients running
151
+ custom CLI builds, or customers with old deployment versions that don't have a signature published on
152
+ ` releases.coder.com ` .
153
+ - ** ` fallbackOnCoderForSignatures ` ** : When enabled, allows downloading signatures from ` releases.coder.com ` if not
154
+ available from the deployment.
155
+
156
+ ### Security Considerations
157
+
158
+ - The plugin embeds Coder's trusted public key in the plugin resources
159
+ - Verification uses detached signatures, which are more secure than attached signatures
160
+ - Users are warned about security risks when verification fails
161
+ - The system gracefully handles cases where signatures are unavailable
162
+ - All verification failures are logged for debugging purposes
163
+
164
+ ### Error Handling
165
+
166
+ The system handles various failure scenarios:
167
+
168
+ - ** Missing signatures** : Prompts user to accept risk or abort
169
+ - ** Invalid signatures** : Warns user about potential tampering and prompts user to accept risk or abort
170
+ - ** Verification failures** : Prompts user to accept risk or abort
171
+
172
+ This signature verification system ensures that users can trust the Coder CLI binaries they download through the plugin,
173
+ protecting against supply chain attacks and ensuring binary integrity.
174
+
112
175
## Configuring and Testing workspace polling with HTTP & SOCKS5 Proxy
113
176
114
177
This section explains how to set up a local proxy and verify that
0 commit comments