Skip to content
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

add deps and fix certs #23

Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.7
0.1.8
4 changes: 3 additions & 1 deletion formula/ih-core.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class IhCore < Formula
VERSION="0.1.7"
VERSION="0.1.8"
desc "Brew formula for installing core tools used at Included Health engineering."
homepage "https://github.com/ConsultingMD/homebrew-ih-public"
license "CC BY-NC-ND 4.0"
Expand All @@ -18,6 +18,8 @@ class IhCore < Formula
depends_on "envconsul"
depends_on "openssl@3"
depends_on "coreutils"
depends_on "yamllint"
depends_on "wget"

def install
lib.install Dir["lib/*"]
Expand Down
4 changes: 4 additions & 0 deletions lib/core/certificates/certs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ These certificates are copied from https://github.com/ConsultingMD/paloaltonetwo
They are used by the GlobalProtect VPN DLP MITM inspector.

If these certs expire John Walsh is probably the person to talk to.

The mozilla.pem file contains all the certs from
SteveRuble marked this conversation as resolved.
Show resolved Hide resolved
SteveRuble marked this conversation as resolved.
Show resolved Hide resolved
along with the DLP certs for the VPN, so it should be comprehensive
enough to work as a CA bundle whether you're on the VPN or not.
12 changes: 11 additions & 1 deletion lib/core/certificates/default/11_certificates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,14 @@
# This script adds environment variables needed for
# our DLP certificates to be respected

export NODE_EXTRA_CA_CERTS="$HOME/.ih/certs/grand_rounds_chained_ca.pem"
# Tell OpenSSL to use our cert bundle.
export SSL_CERT_FILE="$HOME/.ih/certs/mozilla.pem"

# Tell node and npm to use our cert bundle.
export NODE_EXTRA_CA_CERTS="$SSL_CERT_FILE"

# Tell Python requests library to use our cert bundle.
export REQUESTS_CA_BUNDLE="$SSL_CERT_FILE"

# Tell cURL to use our cert bundle.
export CURL_CA_BUNDLE="$SSL_CERT_FILE"
5 changes: 3 additions & 2 deletions lib/core/certificates/step.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ function ih::setup::core.certificates::install() {

ih::log::info "Acquiring cert bundle from Mozilla"
curl https://curl.se/ca/cacert.pem >"$MOZILLA_PATH"

curl https://curl.se/ca/cacert.pem >"$HOME/.ih/certs/mozilla.pem"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So as far as I can tell you're just deleting duplicate lines, not actually sorting out the "use $VARIABLE vs. use /full/path" differences?

# Append our DLP cerTs to the mozilla bundle.
cat "$HOME/.ih/certs/grand_rounds_chained_ca.pem" >>"$HOME/.ih/certs/mozilla.pem"
SteveRuble marked this conversation as resolved.
Show resolved Hide resolved

# Configure NPM to use the bundle.
npm config set cafile "$HOME/.ih/certs/mozilla.pem"

cat "$CA_PATH" >>"$MOZILLA_PATH"
Expand Down