-
Notifications
You must be signed in to change notification settings - Fork 86
Add public key verification for aws cli download #715
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
Open
PotatoWKY
wants to merge
5
commits into
main
Choose a base branch
from
dev-wukeyu-enable_signature_verification
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
8f78731
Add public key verification for aws cli download
4cecf38
store publickey in assets folder, add file copying logic
43594fa
remove finger pring verify, as it is trivial
ff474fc
format code with black
316e83c
add sudo back to follow the doc
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
-----BEGIN PGP PUBLIC KEY BLOCK----- | ||
|
||
mQINBF2Cr7UBEADJZHcgusOJl7ENSyumXh85z0TRV0xJorM2B/JL0kHOyigQluUG | ||
ZMLhENaG0bYatdrKP+3H91lvK050pXwnO/R7fB/FSTouki4ciIx5OuLlnJZIxSzx | ||
PqGl0mkxImLNbGWoi6Lto0LYxqHN2iQtzlwTVmq9733zd3XfcXrZ3+LblHAgEt5G | ||
TfNxEKJ8soPLyWmwDH6HWCnjZ/aIQRBTIQ05uVeEoYxSh6wOai7ss/KveoSNBbYz | ||
gbdzoqI2Y8cgH2nbfgp3DSasaLZEdCSsIsK1u05CinE7k2qZ7KgKAUIcT/cR/grk | ||
C6VwsnDU0OUCideXcQ8WeHutqvgZH1JgKDbznoIzeQHJD238GE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Mg2Los1CK6nXWnImYHKuaKS9LVaCoC8vu7 | ||
IRBik1NX6SjrQnftk0M9dY+s0ZbAN1gbdjZ8H3qlbl/4TxMdr87m8LP4FZIIo261 | ||
Eycv34pVkCePZiP+dgamEiQJ7IL4ZArio9mv6HbDGV6mLY45+l6/0EzCwkI5IyIf | ||
BfWC9s/USgxchg== | ||
=ptgS | ||
-----END PGP PUBLIC KEY BLOCK----- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,8 @@ RUN usermod "--login=${NB_USER}" "--home=/home/${NB_USER}" --move-home "-u ${NB_ | |
ENV MAMBA_USER=$NB_USER | ||
ENV USER=$NB_USER | ||
|
||
COPY aws-cli-public-key.asc /tmp/ | ||
|
||
RUN apt-get update && apt-get upgrade -y && \ | ||
apt-get install -y --no-install-recommends sudo gettext-base wget curl unzip git rsync build-essential openssh-client nano cron less mandoc jq ca-certificates gnupg && \ | ||
# We just install tzdata below but leave default time zone as UTC. This helps packages like Pandas to function correctly. | ||
|
@@ -57,10 +59,13 @@ RUN apt-get update && apt-get upgrade -y && \ | |
touch /etc/krb5.conf.lock && chown ${NB_USER}:${MAMBA_USER} /etc/krb5.conf* && \ | ||
# Note that we do NOT run `rm -rf /var/lib/apt/lists/*` here. If we did, anyone building on top of our images will | ||
# not be able to run any `apt-get install` commands and that would hamper customizability of the images. | ||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \ | ||
unzip awscliv2.zip && \ | ||
curl -O "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" && \ | ||
curl -O "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip.sig" && \ | ||
gpg --import /tmp/aws-cli-public-key.asc && \ | ||
gpg --verify awscli-exe-linux-x86_64.zip.sig awscli-exe-linux-x86_64.zip && \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add fallback error for verification:
|
||
unzip awscli-exe-linux-x86_64.zip && \ | ||
sudo ./aws/install && \ | ||
rm -rf aws awscliv2.zip && \ | ||
rm -rf aws awscli-exe-linux-x86_64.zip awscli-exe-linux-x86_64.zip.sig aws-cli-public-key.asc && \ | ||
: && \ | ||
echo "source /usr/local/bin/_activate_current_env.sh" | tee --append /etc/profile && \ | ||
# CodeEditor - create server, user data dirs | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,8 @@ RUN usermod "--login=${NB_USER}" "--home=/home/${NB_USER}" --move-home "-u ${NB_ | |
ENV MAMBA_USER=$NB_USER | ||
ENV USER=$NB_USER | ||
|
||
COPY aws-cli-public-key.asc /tmp/ | ||
|
||
RUN apt-get update && apt-get upgrade -y && \ | ||
apt-get install -y --no-install-recommends sudo gettext-base wget curl unzip git rsync build-essential openssh-client nano cron less mandoc jq ca-certificates gnupg && \ | ||
# We just install tzdata below but leave default time zone as UTC. This helps packages like Pandas to function correctly. | ||
|
@@ -57,10 +59,13 @@ RUN apt-get update && apt-get upgrade -y && \ | |
touch /etc/krb5.conf.lock && chown ${NB_USER}:${MAMBA_USER} /etc/krb5.conf* && \ | ||
# Note that we do NOT run `rm -rf /var/lib/apt/lists/*` here. If we did, anyone building on top of our images will | ||
# not be able to run any `apt-get install` commands and that would hamper customizability of the images. | ||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \ | ||
unzip awscliv2.zip && \ | ||
curl -O "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" && \ | ||
curl -O "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip.sig" && \ | ||
gpg --import /tmp/aws-cli-public-key.asc && \ | ||
gpg --verify awscli-exe-linux-x86_64.zip.sig awscli-exe-linux-x86_64.zip && \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comments as the v2 Dockerfile apply here. |
||
unzip awscli-exe-linux-x86_64.zip && \ | ||
sudo ./aws/install && \ | ||
rm -rf aws awscliv2.zip && \ | ||
rm -rf aws awscli-exe-linux-x86_64.zip awscli-exe-linux-x86_64.zip.sig aws-cli-public-key.asc && \ | ||
: && \ | ||
echo "source /usr/local/bin/_activate_current_env.sh" | tee --append /etc/profile && \ | ||
# CodeEditor - create server, user data dirs | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set an explicit trust level for the imported key:
Ex.
5 is the number for ultimate trust. Levels include:
• Unknown (default when imported)
• Never trust
• Marginal trust
• Full trust
• Ultimate trust