-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to send hostname for TLS SNI extension
- Loading branch information
1 parent
ff65fb9
commit 8c9bdc4
Showing
24 changed files
with
974 additions
and
160 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
dev/interventions/*.gke.yml | ||
dev/tls/nginx.* | ||
dev/tls/*.key | ||
dev/tls/*.crt | ||
nginx.crt | ||
/output/ | ||
dev/**/*.openshift.yml |
This file contains 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,30 @@ | ||
#!/bin/bash | ||
|
||
sni_cert=$1 | ||
|
||
if [[ ! -z "$sni_cert" ]]; then | ||
sni_cert="$(realpath $1)" | ||
fi | ||
|
||
function copy_cert() { | ||
image=$1 | ||
sni_cert=$2 | ||
|
||
if [[ ! -z $sni_cert ]]; then | ||
docker rm temp_container || true | ||
docker create --name temp_container "$image" | ||
docker cp "$sni_cert" "temp_container:/opt/conjur/etc/ssl/ca/${sni_cert##*/}" | ||
docker commit temp_container "$image" | ||
docker rm temp_container | ||
fi | ||
} | ||
|
||
cd "$(git rev-parse --show-toplevel)" || exit | ||
|
||
TAG="$(git rev-parse --short=8 HEAD)" | ||
export TAG="$TAG" | ||
docker build --no-cache -t "conjur:$TAG" . | ||
copy_cert "conjur:$TAG" "$sni_cert" | ||
docker build --no-cache -t "registry.tld/conjur:$TAG" . | ||
copy_cert "registry.tld/conjur:$TAG" "$sni_cert" | ||
docker build --no-cache --build-arg "VERSION=$TAG" -t "registry.tld/conjur-test:$TAG" -f Dockerfile.test . |
This file contains 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 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,60 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: conjur-authn-k8s | ||
labels: | ||
app: conjur-authn-k8s | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: conjur-authn-k8s | ||
template: | ||
metadata: | ||
labels: | ||
app: conjur-authn-k8s | ||
spec: | ||
hostAliases: | ||
- ip: {{ KUBERNETES_SERVICE_HOST }} | ||
hostnames: | ||
- "{{ KUBERNETES_API_FQDN }}" | ||
containers: | ||
- image: {{ CONJUR_AUTHN_K8S_TAG }} | ||
imagePullPolicy: Always | ||
name: conjur | ||
command: ["conjurctl", "server"] | ||
env: | ||
- name: DATABASE_URL | ||
value: postgres://postgres@postgres:5432/postgres | ||
- name: CONJUR_ADMIN_PASSWORD | ||
value: admin | ||
- name: CONJUR_ACCOUNT | ||
value: cucumber | ||
- name: CONJUR_DATA_KEY | ||
value: "{{ DATA_KEY }}" | ||
- name: RAILS_ENV | ||
value: test | ||
# Enable coverage tracking. | ||
- name: REQUIRE_SIMPLECOV | ||
value: "true" | ||
# Sleep after generating the coverage report to keep the pod alive | ||
# so the report can be retrieved. | ||
- name: SIMPLECOV_SLEEP | ||
value: "true" | ||
- name: WEB_CONCURRENCY | ||
value: "0" | ||
- name: RAILS_MAX_THREADS | ||
value: "10" | ||
- name: CONJUR_AUTHENTICATORS | ||
value: authn-k8s/minikube | ||
- name: KUBERNETES_SERVICE_HOST | ||
value: {{ KUBERNETES_API_FQDN }} | ||
- name: SSL_CERT_DIRECTORY | ||
value: /opt/conjur/etc/ssl/ | ||
volumeMounts: | ||
- mountPath: /run/authn-local | ||
name: authn-local | ||
volumes: | ||
- name: authn-local | ||
emptyDir: | ||
medium: Memory |
This file contains 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 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 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 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 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 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
Oops, something went wrong.