From 186219c83593c36bf0cf2802dc806aa891bd3798 Mon Sep 17 00:00:00 2001 From: Valina Li Date: Wed, 19 Oct 2022 10:54:27 -0700 Subject: [PATCH] feat: add security Consul metrics closes: #374 Signed-off-by: Valina Li --- cmd/core-command/res/configuration.toml | 2 ++ cmd/core-data/res/configuration.toml | 2 ++ cmd/core-metadata/res/configuration.toml | 2 ++ cmd/support-notifications/res/configuration.toml | 2 ++ cmd/support-scheduler/res/configuration.toml | 2 ++ go.mod | 2 +- go.sum | 4 ++-- 7 files changed, 13 insertions(+), 3 deletions(-) diff --git a/cmd/core-command/res/configuration.toml b/cmd/core-command/res/configuration.toml index 87e2bba25a..061d6ee0b0 100644 --- a/cmd/core-command/res/configuration.toml +++ b/cmd/core-command/res/configuration.toml @@ -25,6 +25,8 @@ LogLevel = "INFO" [Writable.Telemetry.Metrics] # All service's metric names must be present in this list. SecuritySecretsRequested = false SecuritySecretsStored = false + SecurityConsulTokensRequested = false + SecurityConsulTokenDuration = false [Writable.Telemetry.Tags] # Contains the service level tags to be attached to all the service's metrics # Gateway="my-iot-gateway" # Tag must be added here or via Consul Env Override can only chnage existing value, not added new ones. diff --git a/cmd/core-data/res/configuration.toml b/cmd/core-data/res/configuration.toml index e7902815f8..f75561f098 100644 --- a/cmd/core-data/res/configuration.toml +++ b/cmd/core-data/res/configuration.toml @@ -17,6 +17,8 @@ LogLevel = "INFO" ReadingsPersisted = false SecuritySecretsRequested = false SecuritySecretsStored = false + SecurityConsulTokensRequested = false + SecurityConsulTokenDuration = false [Writable.Telemetry.Tags] # Contains the service level tags to be attached to all the service's metrics # Gateway="my-iot-gateway" # Tag must be added here or via Consul Env Override can only chnage existing value, not added new ones. [Service] diff --git a/cmd/core-metadata/res/configuration.toml b/cmd/core-metadata/res/configuration.toml index 58c8ff0513..2fca8e1f90 100644 --- a/cmd/core-metadata/res/configuration.toml +++ b/cmd/core-metadata/res/configuration.toml @@ -22,6 +22,8 @@ LogLevel = "INFO" [Writable.Telemetry.Metrics] # All service's metric names must be present in this list. SecuritySecretsRequested = false SecuritySecretsStored = false + SecurityConsulTokensRequested = false + SecurityConsulTokenDuration = false [Writable.Telemetry.Tags] # Contains the service level tags to be attached to all the service's metrics # Gateway="my-iot-gateway" # Tag must be added here or via Consul Env Override can only chnage existing value, not added new ones. diff --git a/cmd/support-notifications/res/configuration.toml b/cmd/support-notifications/res/configuration.toml index f76c6265f3..785bcd9789 100644 --- a/cmd/support-notifications/res/configuration.toml +++ b/cmd/support-notifications/res/configuration.toml @@ -24,6 +24,8 @@ ResendInterval = "5s" [Writable.Telemetry.Metrics] # All service's metric names must be present in this list. SecuritySecretsRequested = false SecuritySecretsStored = false + SecurityConsulTokensRequested = false + SecurityConsulTokenDuration = false [Writable.Telemetry.Tags] # Contains the service level tags to be attached to all the service's metrics # Gateway="my-iot-gateway" # Tag must be added here or via Consul Env Override can only chnage existing value, not added new ones. diff --git a/cmd/support-scheduler/res/configuration.toml b/cmd/support-scheduler/res/configuration.toml index d957356821..dc0c05f89d 100644 --- a/cmd/support-scheduler/res/configuration.toml +++ b/cmd/support-scheduler/res/configuration.toml @@ -19,6 +19,8 @@ LogLevel = "INFO" [Writable.Telemetry.Metrics] # All service's metric names must be present in this list. SecuritySecretsRequested = false SecuritySecretsStored = false + SecurityConsulTokensRequested = false + SecurityConsulTokenDuration = false [Writable.Telemetry.Tags] # Contains the service level tags to be attached to all the service's metrics # Gateway="my-iot-gateway" # Tag must be added here or via Consul Env Override can only chnage existing value, not added new ones. diff --git a/go.mod b/go.mod index 823536ac1f..f4a281a016 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/edgexfoundry/edgex-go require ( bitbucket.org/bertimus9/systemstat v0.0.0-20180207000608-0eeff89b0690 github.com/eclipse/paho.mqtt.golang v1.4.1 - github.com/edgexfoundry/go-mod-bootstrap/v2 v2.3.0-dev.21 + github.com/edgexfoundry/go-mod-bootstrap/v2 v2.3.0-dev.22 github.com/edgexfoundry/go-mod-core-contracts/v2 v2.3.0-dev.18 github.com/edgexfoundry/go-mod-messaging/v2 v2.3.0-dev.23 github.com/edgexfoundry/go-mod-registry/v2 v2.2.0 diff --git a/go.sum b/go.sum index 2b18eb5e89..f6bd0e27cb 100644 --- a/go.sum +++ b/go.sum @@ -32,8 +32,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/eclipse/paho.mqtt.golang v1.4.1 h1:tUSpviiL5G3P9SZZJPC4ZULZJsxQKXxfENpMvdbAXAI= github.com/eclipse/paho.mqtt.golang v1.4.1/go.mod h1:JGt0RsEwEX+Xa/agj90YJ9d9DH2b7upDZMK9HRbFvCA= -github.com/edgexfoundry/go-mod-bootstrap/v2 v2.3.0-dev.21 h1:9SgVgyuEasnvHb9GaXz0rOUID2MeBqtGmm64i08WMow= -github.com/edgexfoundry/go-mod-bootstrap/v2 v2.3.0-dev.21/go.mod h1:QQPtK75bGbYH42tLrwgIV1xpiXufOR5mE/Wby/cxBqQ= +github.com/edgexfoundry/go-mod-bootstrap/v2 v2.3.0-dev.22 h1:tkL2yRn8qKSe+rNeGwiODAvok77wBdNHGUSAhYuqVRc= +github.com/edgexfoundry/go-mod-bootstrap/v2 v2.3.0-dev.22/go.mod h1:QQPtK75bGbYH42tLrwgIV1xpiXufOR5mE/Wby/cxBqQ= github.com/edgexfoundry/go-mod-configuration/v2 v2.2.0 h1:AZeaAPJM5X93ITFgwbwluYDtYEJ7tkCMSlj35GwfLLU= github.com/edgexfoundry/go-mod-configuration/v2 v2.2.0/go.mod h1:YP17JhMnXTitowXE13QJwFaKo0oc03iyoKLjWAYl4FE= github.com/edgexfoundry/go-mod-core-contracts/v2 v2.3.0-dev.18 h1:Smkhoqq9+XsMcs0B3JokAmIT7hXJy9eQWk6SYk9z4yE=