Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit 8c974f5

Browse files
authored
Merge pull request #58 from keybase/david/gpg-v2
GPG Verify Keybase Installer v2
2 parents 44f7145 + 672947f commit 8c974f5

File tree

3 files changed

+29
-5
lines changed

3 files changed

+29
-5
lines changed

docker/Dockerfile-ca

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,28 @@
22
# between this file and Dockerfile-kssh.
33
FROM ubuntu:18.04
44

5+
# Dependencies
56
RUN apt-get -qq update
6-
RUN apt-get -qq install curl software-properties-common -y
7+
RUN apt-get -qq install curl software-properties-common ca-certificates gnupg -y
78
RUN useradd -ms /bin/bash keybase
89
USER keybase
910
WORKDIR /home/keybase
11+
12+
# Download and verify the deb
13+
# Key fingerprint from https://keybase.io/docs/server_security/our_code_signing_key
1014
RUN curl --remote-name https://prerelease.keybase.io/keybase_amd64.deb
11-
USER root
15+
RUN curl --remote-name https://prerelease.keybase.io/keybase_amd64.deb.sig
16+
# Import our gpg key from our website. Pulling from key servers caused a flakey build so
17+
# we get the key from the Keybase website instead.
18+
RUN curl -sSL https://keybase.io/docs/server_security/code_signing_key.asc | gpg --import
19+
# This line will error if the fingerprint of the key in the file does not match the
20+
# known fingerprint of the our PGP key
21+
RUN gpg --fingerprint 222B85B0F90BE2D24CFEB93F47484E50656D16C7
22+
# And then verify the signature now that we have the key
23+
RUN gpg --verify keybase_amd64.deb.sig keybase_amd64.deb
1224

1325
# Silence the error from dpkg about failing to configure keybase since `apt-get install -f` fixes it
26+
USER root
1427
RUN dpkg -i keybase_amd64.deb || true
1528
RUN apt-get install -fy
1629
USER keybase

integrationTest.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ if [ -z "$CIRCLECI" ]; then
1717
cd ../
1818
fi
1919

20-
2120
# Ensure we have the correct environment variables
2221
if [[ -f "tests/env.sh" ]]; then
2322
echo "env.sh already exists, skipping configuring new accounts..."

tests/Dockerfile-kssh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,27 @@
22
# between this file and Dockerfile-ca.
33
FROM ubuntu:18.04
44

5+
# Dependencies
56
RUN apt-get -qq update
6-
RUN apt-get -qq install curl software-properties-common -y
7+
RUN apt-get -qq install curl software-properties-common ca-certificates gnupg -y
78
RUN useradd -ms /bin/bash keybase
89
USER keybase
910
WORKDIR /home/keybase
11+
12+
# Download and verify the deb
1013
RUN curl --remote-name https://prerelease.keybase.io/keybase_amd64.deb
11-
USER root
14+
RUN curl --remote-name https://prerelease.keybase.io/keybase_amd64.deb.sig
15+
# Import our gpg key from our website. Pulling from key servers caused a flakey build so
16+
# we get the key from the Keybase website instead.
17+
RUN curl -sSL https://keybase.io/docs/server_security/code_signing_key.asc | gpg --import
18+
# This line will error if the fingerprint of the key in the file does not match the
19+
# known fingerprint of the our PGP key
20+
RUN gpg --fingerprint 222B85B0F90BE2D24CFEB93F47484E50656D16C7
21+
# And then verify the signature now that we have the key
22+
RUN gpg --verify keybase_amd64.deb.sig keybase_amd64.deb
1223

1324
# Silence the error from dpkg about failing to configure keybase since `apt-get install -f` fixes it
25+
USER root
1426
RUN dpkg -i keybase_amd64.deb || true
1527
RUN apt-get install -fy
1628
USER keybase

0 commit comments

Comments
 (0)