Skip to content

Commit

Permalink
feat: Add ability to customize spiffe services (#4533)
Browse files Browse the repository at this point in the history
* feat: Add ability to customize spiffe services

Signed-off-by: Elizabeth J Lee <[email protected]>
  • Loading branch information
ejlee3 authored Apr 27, 2023
1 parent 097fa9c commit 824c097
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions cmd/security-spire-config/seed_builtin_entries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,18 @@ echo "local_agent_svid=${local_agent_svid}"
echo "SPIFFE_SERVER_SOCKET=${SPIFFE_SERVER_SOCKET}"
echo "SPIFFE_EDGEX_SVID_BASE=${SPIFFE_EDGEX_SVID_BASE}"

echo "EDGEX_SPIFFE_CUSTOM_SERVICES=${EDGEX_SPIFFE_CUSTOM_SERVICES}"

SPIFFE_SERVICES='security-spiffe-token-provider support-notifications support-scheduler \
device-bacnet device-camera device-grove device-modbus device-mqtt device-rest device-snmp \
device-virtual device-rfid-llrp device-coap device-gpio \
app-http-export app-mqtt-export app-sample app-rfid-llrp-inventory \
app-external-mqtt-trigger'

SEED_SERVICES="${SPIFFE_SERVICES} ${EDGEX_SPIFFE_CUSTOM_SERVICES}"

# add pre-authorized services into spire server entry
for dockerservice in security-spiffe-token-provider support-notifications support-scheduler \
device-bacnet device-camera device-grove device-modbus device-mqtt device-rest device-snmp \
device-virtual device-rfid-llrp device-coap device-gpio \
app-http-export app-mqtt-export app-sample app-rfid-llrp-inventory \
app-external-mqtt-trigger; do
for dockerservice in $SEED_SERVICES; do
# Temporary workaround because service name in dockerfile is not consistent with service key.
# TAF scripts depend on legacy docker-compose service name. Fix in EdgeX 3.0.
service=`echo -n ${dockerservice} | sed -e 's/app-service-/app-/'`
Expand Down

0 comments on commit 824c097

Please sign in to comment.