Skip to content

Commit

Permalink
feat: update RDS CA bundle (#19)
Browse files Browse the repository at this point in the history
* feat: update RDS CA bundle

Updating to new link for the combined cert bundle from
[AWS](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html).

* build: bump golangci-lint-action

Resolves issue where it would panic on `load embedded ruleguard rules`.

Add setting up go since new version doesn't any longer
  • Loading branch information
mappt authored Feb 29, 2024
1 parent 1e1c6f9 commit fad1d4e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Go
uses: actions/[email protected]
with:
go-version: 1.17.x
- name: Lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
version: v1.45
version: v1.51
13 changes: 6 additions & 7 deletions build/bin/import_certs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@
set -e

mydir=/tmp/rds-ca
if [ ! -e "${mydir}" ]
then
mkdir -p "${mydir}"
if [ ! -e "${mydir}" ]; then
mkdir -p "${mydir}"
fi

pushd "${mydir}"
curl -sS "https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem" > ${mydir}/rds-combined-ca-bundle.pem
awk 'split_after == 1 {n++;split_after=0} /-----END CERTIFICATE-----/ {split_after=1}{print > "rds-ca-" n ""}' < ${mydir}/rds-combined-ca-bundle.pem
curl -sS "https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem" >${mydir}/rds-combined-ca-bundle.pem
awk 'split_after == 1 {n++;split_after=0} /-----END CERTIFICATE-----/ {split_after=1}{print > "rds-ca-" n ""}' <${mydir}/rds-combined-ca-bundle.pem

for CERT in rds-ca-*; do
mv "$CERT" "/usr/local/share/ca-certificates/aws-rds-ca-$(basename $CERT).crt"
done
mv "$CERT" "/usr/local/share/ca-certificates/aws-rds-ca-$(basename $CERT).crt"
done

popd
rm -rf ${mydir}
Expand Down

0 comments on commit fad1d4e

Please sign in to comment.