This repository has been archived by the owner on Apr 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathplanb-tokeninfo.conf
34 lines (30 loc) · 1.81 KB
/
planb-tokeninfo.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
description "PlanB Tokeninfo"
setuid nobody
stop on shutdown
respawn
script
eval $(/opt/taupage/bin/parse-yaml.py /meta/taupage.yaml "config")
export TOKENINFO_URL="$config_tokeninfo_url"
export UPSTREAM_TOKENINFO_URL="$config_upstream_tokeninfo_url"
export ACCESS_TOKEN_URL="$config_access_token_url"
export OPENID_PROVIDER_CONFIGURATION_URL="$config_openid_provider_configuration_url"
export REVOCATION_PROVIDER_URL="$config_revocation_provider_url"
export BUSINESS_PARTNERS="$config_tokeninfo_business_partners"
if [ "$config_local_planb_tokeninfo_introspection" = "true" ] || [ "$config_local_planb_tokeninfo_introspection" = "True" ]; then
export ENABLE_INTROSPECTION="true"
fi
if [ -n "$config_local_planb_tokeninfo_lightstep_token" ]; then
config_local_planb_tokeninfo_lightstep_token=${config_local_planb_tokeninfo_lightstep_token##aws:kms:}
config_local_planb_tokeninfo_lightstep_token=$(/opt/taupage/bin/decrypt-kms.py "$config_local_planb_tokeninfo_lightstep_token")
export ENABLE_OPENTRACING="true"
export OPENTRACING_LIGHTSTEP_ACCESS_TOKEN="$config_local_planb_tokeninfo_lightstep_token"
export OPENTRACING_LIGHTSTEP_COMPONENT_NAME="$config_application_id"
export ACCOUNT="aws:$(curl --fail --silent http://169.254.169.254/latest/dynamic/instance-identity/document | jq -r '.accountId')"
export ZONE="aws:$(curl --fail --silent http://169.254.169.254/latest/dynamic/instance-identity/document | jq -r '.availabilityZone')"
export ARTIFACT="$config_source"
if [ ! -z "$config_deployment_id" ]; then
export DEPLOYMENT_ID="$config_deployment_id"
fi
fi
/opt/taupage/bin/planb-tokeninfo
end script