Skip to content

Commit 2618d7a

Browse files
(DOCSP-38231): Verify vsce plugin (#87)
1 parent cc4dae1 commit 2618d7a

File tree

3 files changed

+103
-0
lines changed

3 files changed

+103
-0
lines changed

snooty.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ intersphinx = ["https://www.mongodb.com/docs/manual/objects.inv",
66
]
77

88
toc_landing_pages = [
9+
"/install",
910
"/playgrounds",
1011
"/crud-ops",
1112
"/playground-databases",

source/install.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,8 @@ Once you install |vsce|, you can :ref:`view data in your deployment
2828
with your data <vsce-playgrounds>`.
2929

3030
To configure |vsce| settings, see :ref:`vsce-settings`.
31+
32+
.. toctree::
33+
:titlesonly:
34+
35+
/install/verify-plugin

source/install/verify-plugin.txt

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
.. _vsce-verify-plugin:
2+
3+
================================
4+
Verify MongoDB for VSCode Plugin
5+
================================
6+
7+
.. contents:: On this page
8+
:local:
9+
:backlinks: none
10+
:depth: 1
11+
:class: singlecol
12+
13+
.. facet::
14+
:name: genre
15+
:values: tutorial
16+
17+
The MongoDB release team digitally signs |vsce| releases to certify that
18+
the plugin is a valid and unaltered MongoDB release. You can use the
19+
digital signature to validate the plugin and ensure that it is a trusted
20+
installation.
21+
22+
Before you Begin
23+
----------------
24+
25+
If you don't have |vsce| installed, download the |vsce| plugin from the
26+
`GitHub Releases page <https://github.com/mongodb-js/vscode/releases>`__
27+
or the Visual Studio Code extension marketplace.
28+
29+
Steps
30+
-----
31+
32+
.. procedure::
33+
:style: normal
34+
35+
.. step:: Download the |vsce| signature file
36+
37+
Go to the `MongoDB VS Code Releases page
38+
<https://github.com/mongodb-js/vscode/releases>`__ and download
39+
the ``.sig`` file for your version of |vsce|.
40+
41+
.. step:: Import the |vsce| public key
42+
43+
.. code-block:: sh
44+
45+
curl https://pgp.mongodb.com/mongodb-vscode.asc | gpg --import
46+
47+
If the key imports successfully, the command returns:
48+
49+
.. code-block:: sh
50+
:copyable: false
51+
52+
gpg: key A8130EC3F9F5F923: public key "MongoDB VS Code Signing Key <[email protected]>" imported
53+
gpg: Total number processed: 1
54+
gpg: imported: 1
55+
56+
If you have previously imported the key, the command returns:
57+
58+
.. code-block:: sh
59+
:copyable: false
60+
61+
gpg: key A8130EC3F9F5F923: public key "MongoDB VS Code Signing Key <[email protected]>" not changed
62+
gpg: Total number processed: 1
63+
gpg: unchanged: 1
64+
65+
.. step:: Verify the plugin
66+
67+
.. code-block:: sh
68+
69+
gpg --verify <path_to_signature_file> <path_to_plugin_vsix_file>
70+
71+
If the plugin is signed by MongoDB, the command returns:
72+
73+
.. code-block:: sh
74+
:copyable: false
75+
76+
gpg: Signature made Mon Jan 8 19:30:04 2024 CET
77+
gpg: using RSA key A505CECC78EC9A688A4811505D55DCA8B92B7040
78+
gpg: Good signature from "MongoDB VS Code Signing Key <[email protected]>" [unknown]
79+
80+
If the package is signed but the signing key is not added to your
81+
local ``trustdb``, the command returns:
82+
83+
.. code-block:: sh
84+
:copyable: false
85+
86+
gpg: WARNING: This key is not certified with a trusted signature!
87+
gpg: There is no indication that the signature belongs to the owner.
88+
89+
If the package is not signed properly, the command returns an
90+
error message:
91+
92+
.. code-block:: sh
93+
:copyable: false
94+
95+
gpg: Signature made Mon Jan 22 10:22:53 2024 CET
96+
gpg: using RSA key AB1B92FFBE0D3740425DAD16A8130EC3F9F5F923
97+
gpg: BAD signature from "MongoDB VS Code Signing Key <[email protected]>" [unknown]

0 commit comments

Comments
 (0)