From aeecef7d54b6f69b7cdad0a7514adeac94bb327f Mon Sep 17 00:00:00 2001 From: Leszek Stachowski Date: Thu, 25 Jan 2024 13:40:58 +0100 Subject: [PATCH] Remove mnemonic files (#153) --- apps/firebase/env.mnemonic.alfajores.enc | Bin 1840 -> 0 bytes apps/firebase/env.mnemonic.baklava.enc | Bin 1551 -> 0 bytes apps/firebase/env.mnemonic.enc | Bin 689 -> 0 bytes apps/firebase/env.mnemonic.rc1.enc | Bin 2033 -> 0 bytes apps/firebase/package.json | 3 +- apps/firebase/scripts/key_placer.sh | 80 ----------------------- 6 files changed, 1 insertion(+), 82 deletions(-) delete mode 100644 apps/firebase/env.mnemonic.alfajores.enc delete mode 100644 apps/firebase/env.mnemonic.baklava.enc delete mode 100644 apps/firebase/env.mnemonic.enc delete mode 100644 apps/firebase/env.mnemonic.rc1.enc delete mode 100755 apps/firebase/scripts/key_placer.sh diff --git a/apps/firebase/env.mnemonic.alfajores.enc b/apps/firebase/env.mnemonic.alfajores.enc deleted file mode 100644 index 1ac9e78b88733fb937501a64e328ea2326e8144d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1840 zcmV-02haElBmmByEbC_C!!&DiyVbRr+t0rB!kVYm9y~r(2syGQ$+f5llYbASGoa0`dpJaW;EkW^l`V@vg zAr^A@OD}wN6}?BP^9j{MpMdD`@5Bh-eH}2Ykg=zZC5d#pNag=_U3|W3^w@x$3=J`; zieYh6-7TI9r%Li1Vage^0EM9V7eYwQjL>+TQ%oaR@}@T$@GyHfT+T=c&0zF9{WUqI zX3Onr9(Z=53HTnd!;~I)5DbISErF+VOS9Up!hRPIlkry?yib&@cOeX#l#Kw1>|fudboc5 zqo$IBFDroDRelv*v)hV7jA%GoymO|061a$mxZ=cXmeOrozVscz$j0Z2c)k>XF2Jg; z15)KZC5dW?0eVc_YB{?x**MYyMw(=uiWI$?9AptE#fdbTaBM}m2zc_EWOv>=P`10g zXGjs9@F$s~D{k|9frHfx3^sii%s8ZP`%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*N$NR6n44GHqr-rUXmt!^ zIY0>qId;Ykd%e8QRpVPKEI&;{V-Ma+JV-u~(?Hz@|5f;ZP`ZYWCqxnzk&$Snjl`)< zUq%<<$ih^dk0a{OwE+}9wxVlJT;RMQTbEF;Epij=-x4C1NnW2!nCdbNdwfVbLxFq= zQiE&XZWDE<&1X{jL0d9e6K!t=p!nNBNBfr*q;%Np@xq3|D95E}$>egYExpDI}0gSB`wtZfnkPY`0 zkY_2soNQp~%*H(S|I0Ud&R{0wAm0_46_t^uYV4)aOE$BGp3EF;t=8xT{o%mU%2Z9^ XEb023A0}$5-$b@LMx@4mLQ3`_FX%|e diff --git a/apps/firebase/env.mnemonic.rc1.enc b/apps/firebase/env.mnemonic.rc1.enc deleted file mode 100644 index e0da5e98eccfa96ef3c32cb06d580709849da30e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2033 zcmV>hK?}xB&9ImN$rlcyr%>dZ8eR z-`Ef0n@GYiW^Fi+qc(&%8`c|4^v@$I>x&AT2sIPw~iPudRaMccx!$yBt}JG=iH^a_B?_!(TK zTm%}0xG>Nb)*SR68bZB{6v6tdQV*`K!`GAQoF$5dM6L** zS+7Q#okjCV{wb#$L^7KdHIy~)6d{S_>8?`V<<-@*;?3qt%J9**s-aIG*q6tcm6Gzr z6c{o;?=Ul1M%tgU|Mt~yxSN35wz2~F zr!};*hmXhbavT7(7e7M`%Hxex^3Bq~NL;itk3&jW9IOQgTs{MMW$&rE-6Mk&&uQQ* zf*E#a6ODY9l`gjI^Z`vQ`Ip-1`zp;ODPbcjtfZboW}`(;HC^s``DM1A;(2MEE*Xc? zltJJEO+5_*jZX!-I&~eyelzF44TK!;SEF#78gGRyg_4|Zfiz%`UNwi;#`M9smKK*Y zLDi{lUr9!|UT)%lt_}VqpD3K$Ksrvb%@h8!)~JH<`AZHHZ!K5N$qqZRiS}R{I^ovL zoV`2t&Ad9oCnuM5eUcEl_WC!+#mwm?+iTAw8n4!79&`65kJLNkv>vhp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ebase/package.json index 76733f983..ceef70ff4 100644 --- a/apps/firebase/package.json +++ b/apps/firebase/package.json @@ -15,8 +15,7 @@ "lint": "eslint -c ../../.eslintrc.js --ext .ts ./src", "transfer-funds": "ts-node scripts/transfer-funds.ts", "cli": "ts-node scripts/cli.ts", - "build:rules": "firebase-bolt database-rules.bolt", - "keys:encrypt": "bash scripts/key_placer.sh encrypt" + "build:rules": "firebase-bolt database-rules.bolt" }, "dependencies": { "@celo/connect": "^5.0.0", diff --git a/apps/firebase/scripts/key_placer.sh b/apps/firebase/scripts/key_placer.sh deleted file mode 100755 index d9460b2a1..000000000 --- a/apps/firebase/scripts/key_placer.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env bash - -echo "Processing encrypted files v2" - -# Set list of secret files to encrypt and decrypt. -files=( - ".env.mnemonic:celo-testnet" - ".env.mnemonic.alfajores:celo-testnet" - ".env.mnemonic.baklava:celo-testnet" - ".env.mnemonic.rc1:celo-testnet-production" -) - -if [[ -z "$1" ]]; then - echo "Encrypt or decrypt secret files using GCP keystore." - echo "usage: $0 < encrypt | decrypt >" - exit 1 -elif [[ $1 != "encrypt" ]] && [[ $1 != "decrypt" ]]; then - echo "invalid action $1. Choose 'encrypt' or 'decrypt'" - echo "usage: $0 < encrypt | decrypt >" - exit 1 -fi - -# this is to allow the script to be called from anywhere -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -cd $DIR -cd .. - -# place templates to be used (if they exist) in case the environment -# doesn't have access to decryption keys -if [[ $1 == "decrypt" ]]; then - for file_path_map in "${files[@]}"; do - file_path=${file_path_map%%:*} - template_file_path="$file_path.template" - - if test -f "$template_file_path" && ! test -f "$file_path"; then - cp "$template_file_path" "$file_path" - fi - done -fi - -command -v gcloud > /dev/null 2>&1 -if [[ $? -eq 1 ]]; then - echo "gcloud is not installed - skipping ${1}ion" - exit 0 -fi - -for file_path_map in "${files[@]}"; do - file_path=${file_path_map%%:*} - environment=${file_path_map#*:} - encrypted_file_path="$file_path.enc" - - # When decrypting ensure the encrypted file exists or skip. - if [[ $1 == "decrypt" ]] && ! test -f "$encrypted_file_path"; then - echo "$encrypted_file_path does not exist, cannot decrypt - skipping file" >&2 - continue - fi - - # When encrypting ensure the plaintext file exists. - if [[ $1 == "encrypt" ]]; then - if [[ ! -f "$file_path" ]]; then - echo "$file_path does not exist, cannot encrypt - skipping file" >&2 - continue - fi - fi - - # Encrypt or decrypt this file. - gcloud kms $1 --ciphertext-file=$encrypted_file_path --plaintext-file=$file_path --key=github-mnemonic-key --keyring=celo-keyring --location=global --project $environment - if [[ $? -eq 1 ]]; then - echo "Only cLabs employees with $environment access can $1 keys - skipping ${1}ion" - exit 0 - fi -done - -if [[ $1 == "decrypt" ]]; then - echo "Encrypted files decrypted" -elif [[ $1 == "encrypt" ]]; then - echo "Decrypted files encrypted" -fi - -exit 0