Skip to content

Commit 7051aa9

Browse files
committed
fix: clean up secrets and gen secrets script
Signed-off-by: Chris Butler <chris.butler@redhat.com>
1 parent a3a23c8 commit 7051aa9

File tree

2 files changed

+1
-29
lines changed

2 files changed

+1
-29
lines changed

scripts/gen-secrets.sh

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,13 @@ echo "Creating secrets as required"
44
echo
55

66
COCO_SECRETS_DIR="${HOME}/.coco-pattern"
7-
SECURITY_POLICY_FILE="${COCO_SECRETS_DIR}/security-policy-config.json"
8-
SSH_KEY_FILE="${COCO_SECRETS_DIR}/id_rsa"
97
KBS_PRIVATE_KEY="${COCO_SECRETS_DIR}/kbsPrivateKey"
108
KBS_PUBLIC_KEY="${COCO_SECRETS_DIR}/kbsPublicKey"
119
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
1210
VALUES_FILE="${HOME}/values-secret-coco-pattern.yaml"
1311

1412
mkdir -p ${COCO_SECRETS_DIR}
1513

16-
if [ ! -f "${SECURITY_POLICY_FILE}" ]; then
17-
echo "Creating security policy"
18-
cat > ${SECURITY_POLICY_FILE} <<EOF
19-
{
20-
"default": [
21-
{
22-
"type": "insecureAcceptAnything"
23-
}],
24-
"transports": {}
25-
}
26-
EOF
27-
28-
fi
2914

3015
if [ ! -f "${KBS_PRIVATE_KEY}" ]; then
3116
echo "Creating kbs keys"
@@ -34,13 +19,6 @@ if [ ! -f "${KBS_PRIVATE_KEY}" ]; then
3419
openssl pkey -in "${KBS_PRIVATE_KEY}" -pubout -out "${KBS_PUBLIC_KEY}"
3520
fi
3621

37-
if [ ! -f "${SSH_KEY_FILE}" ]; then
38-
echo "Creating ssh keys"
39-
rm -f "${SSH_KEY_FILE}.pub"
40-
ssh-keygen -f "${SSH_KEY_FILE}" -N ""
41-
fi
42-
43-
4422
## Copy a sample values file if this stuff doesn't exist
4523

4624
if [ ! -f "${VALUES_FILE}" ]; then

values-secret.yaml.template

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ secrets:
5555
# - hub
5656
# fields:
5757
# - name: key-0
58-
# path: ~/.coco-pattern/trustee/cosign-key-0.pub
58+
# path: ~/.coco-pattern/cosign-key-0.pub
5959

6060

6161
- name: attestationStatus
@@ -76,12 +76,6 @@ secrets:
7676
- name: publicKey
7777
path: ~/.coco-pattern/kbsPublicKey
7878

79-
- name: kbsPrivateKey
80-
vaultPrefixes:
81-
- global
82-
fields:
83-
- name: privateKey
84-
path: ~/.coco-pattern/kbsPrivateKey
8579

8680
- name: kbsres1
8781
vaultPrefixes:

0 commit comments

Comments
 (0)