Skip to content

Commit f475fb3

Browse files
HypnoAntwizzdom
andauthored
Open Governance Tagging info (#40)
* Open Governance Tagging info * cleanup structure * docs/procedures/Open-Governance-Tagging.md --------- Co-authored-by: wizzdom <[email protected]>
1 parent 070ddd1 commit f475fb3

File tree

1 file changed

+214
-0
lines changed

1 file changed

+214
-0
lines changed
+214
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
1+
---
2+
title: Open Governance Tagging
3+
tags:
4+
- open-gov
5+
- gpg
6+
- tagging
7+
author:
8+
- hypnoant
9+
- wizzdom
10+
---
11+
12+
# Open Governance Tagging - `hypnoant`, `wizzdom`
13+
14+
## 1. Before the Tagging Ceremony
15+
16+
### Generating the Key
17+
18+
To tag the Open Governance repo you will need to make a new PGP key on the behalf of redbrick committee. Below are the commands and the inputs for creating this key.
19+
20+
```bash
21+
gpg --full-generate-key
22+
```
23+
24+
```title="Key Generation Menu"
25+
Please select what kind of key you want:
26+
(1) RSA and RSA
27+
(2) DSA and Elgamal
28+
(3) DSA (sign only)
29+
(4) RSA (sign only)
30+
(9) ECC (sign and encrypt) *default*
31+
(10) ECC (sign only)
32+
(14) Existing key from card
33+
Your selection? 1
34+
35+
RSA keys may be between 1024 and 4096 bits long.
36+
What keysize do you want? (3072) 4096
37+
38+
Please specify how long the key should be valid.
39+
0 = key does not expire
40+
<n> = key expires in n days
41+
<n>w = key expires in n weeks
42+
<n>m = key expires in n months
43+
<n>y = key expires in n years
44+
Key is valid for? (0) {SET FOR DATE AFTER TAGGING CEREMONY}
45+
46+
Key expires at {DATE AFTER TAGGING CEREMONY} IST
47+
Is this correct? (y/N) y
48+
49+
GnuPG needs to construct a user ID to identify your key.
50+
Real name: Redbrick Committee
51+
Email Address: [email protected]
52+
Comment: Redbrick Committee (Redbrick Open Governance {YEAR-MONTH-TYPE_OF_MEETING(AGM/EGM)})
53+
54+
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
55+
```
56+
57+
### First Sign
58+
59+
The signatory who has generated the key will then sign this key.
60+
61+
```bash
62+
gpg --sign-key {REDBRICK KEY-ID}
63+
```
64+
65+
You will then publish this public key to a key-server *(e.g. `keyserver.ubuntu.com` or `keys.openpgp.org`)*.
66+
67+
```bash
68+
gpg --keyserver keyserver.ubuntu.com --send-key [email protected]
69+
```
70+
71+
### Second Sign
72+
73+
The other signatory will pull the key from the key-server and will then sign this key and re-publish the key to the key-server. (You can use the more secure method below for general membership if you wish).
74+
75+
```bash
76+
gpg --keyserver keyserver.ubuntu.com --recv-key {REDBRICK KEY-ID}
77+
78+
gpg --sign-key {REDBRICK KEY-ID}
79+
80+
gpg --keyserver keyserver.ubuntu.com --send-keys {REDBRICK KEY-ID}
81+
```
82+
83+
To verify this procedure has worked and that both signatories have signed it. We will have the first signatory pull the key back down and verify the signatures.
84+
85+
```bash
86+
gpg --keyserver-options no-self-sigs-only --keyserver keyserver.ubuntu.com --recv-key {REDBRICK KEY-ID}
87+
```
88+
89+
### General Membership Sign
90+
91+
The society now has the option to publish this key to the general membership for them to also sign this key if the current committee wishes to do so. The committee will have to release an email address or another service for the general membership to send files to.
92+
93+
Below is the process for a member of the general membership to sign the key.
94+
95+
```bash
96+
gpg --recv-keys {REDBRICK KEY-ID}
97+
gpg --sign-key {REDBRICK KEY-ID}
98+
gpg --armor --export {REDBRICK KEY-ID} | gpg --encrypt -r {REDBRICK KEY-ID} --armor --output {REDBRICK KEY-ID}-signedBy-{OWNER KEY ID}.asc
99+
```
100+
101+
They will then send this file to the signatories.
102+
103+
The signatories will then use the following commands to import and publish their key with the new signature. This must be done before the
104+
105+
```bash
106+
gpg -d {REDBRICK KEY-ID}-signedBy-{OWNER KEY ID}.asc | gpg --import
107+
gpg --send-key {REDBRICK KEY-ID}
108+
```
109+
110+
## 2. During the Tagging Ceremony
111+
112+
The first signatory shall tag the repository with the following command and styling. There shall be at least 2 witnesses separated by commas.
113+
114+
```bash
115+
git tag -as {YYYY-MM-TYPEOFMEETING} {COMMIT ID}
116+
```
117+
118+
```title="Git Tag Message"
119+
Co-authored-by: {Signatory 2}
120+
121+
Witnessed-by: ~{WITNESS}
122+
123+
See `knowledge/tagging.md` for more info.
124+
```
125+
126+
They can then push this tag to the GitHub
127+
128+
```bash
129+
git push --tags origin
130+
```
131+
132+
## 3. After the Tagging Ceremony
133+
134+
### Verifying the Tag
135+
136+
Clone the git repository
137+
138+
```bash
139+
git clone https://github.com/redbrick/open-governance.git
140+
```
141+
142+
View the tag
143+
144+
```bash
145+
git tag -v {YYYY-MM-TYPEOFMEETING}
146+
```
147+
148+
Import the key
149+
150+
There should be a key signature at the bottom of the tag view. This should be imported into your key-ring. There may be a separate key-server used for the given years key so verify with committee that it is on the correct server for importing.
151+
152+
```bash
153+
gpg --keyserver-options no-self-sigs-only --keyserver keyserver.ubuntu.com --recv-key {REDBRICK KEY-ID}
154+
```
155+
156+
Verify the tag
157+
158+
```bash
159+
git tag -v {YYYY-MM-TYPEOFMEETING}
160+
```
161+
162+
Check the signatories
163+
164+
```bash
165+
gpg --list-sigs {REDBRICK KEY-ID}
166+
```
167+
168+
Import the signatories keys
169+
170+
```bash
171+
gpg --list-sigs {REDBRICK KEY-ID} --keyid-format long | grep 'ID not found' | perl -nwe '/([0-9A-F]{16})/ && print "$1\n"' | xargs gpg --keyserver-options no-self-sigs-only --keyserver keyserver.ubuntu.com --recv-keys
172+
```
173+
174+
Export their key
175+
176+
```bash
177+
gpg --export -a {SIGNATORY KEY-ID}
178+
```
179+
180+
Their key should be available at their GitHub under `https://github.com/{USERNAME}.gpg`
181+
182+
## Externally Hosted Repos
183+
184+
### Uploading the Repo
185+
186+
- First verify that the repo is correctly tagged and signed following the previous steps.
187+
- Download the zip of the tag from GitHub webpage. (Or clone the repo, checkout the tag and zip the folder)
188+
- Sign the Zip and verify it:
189+
190+
```bash
191+
gpg --sign {NAME OF ZIP}.zip
192+
gpg --verify {NAME OF ZIP}.zip.gpg
193+
```
194+
195+
- Export public key:
196+
197+
```bash
198+
gpg --export -a {KEY-ID} > {MYKEYID}
199+
```
200+
201+
- Upload the `.zip.gpg` file and your public key
202+
203+
### Users Verifying the Hosted Zip
204+
205+
```bash
206+
gpg --import {KEYID}
207+
gpg --verify {NAME OF ZIP}.zip.gpg
208+
```
209+
210+
- Exporting the zip file:
211+
212+
```bash
213+
gpg --output {NAME OF ZIP}.zip --decrypt {NAME OF ZIP}.zip.gpg
214+
```

0 commit comments

Comments
 (0)