Skip to content

Commit

Permalink
refactor!: Renamed SecretName to SecretValueKey and SecretnPath to Se…
Browse files Browse the repository at this point in the history
…cretName (#529)

BREAKING CHANGE: Renamed SecretName to SecretValueKey and SecretPath to SecretName, removed push-to-core profile

Signed-off-by: Marc-Philippe Fuller <marc-philippe.fuller@intel.com>
  • Loading branch information
marcpfuller authored Mar 13, 2023
1 parent 9924ce3 commit 64e14a4
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 150 deletions.
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ module github.com/edgexfoundry/app-service-configurable

go 1.18

require github.com/edgexfoundry/app-functions-sdk-go/v3 v3.0.0-dev.36
require github.com/edgexfoundry/app-functions-sdk-go/v3 v3.0.0-dev.40

require (
github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/armon/go-metrics v0.3.10 // indirect
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/diegoholiveira/jsonlogic/v3 v3.2.7 // indirect
github.com/eclipse/paho.mqtt.golang v1.4.2 // indirect
github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.29 // indirect
github.com/edgexfoundry/go-mod-configuration/v3 v3.0.0-dev.6 // indirect
github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.23 // indirect
github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.12 // indirect
github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.42 // indirect
github.com/edgexfoundry/go-mod-configuration/v3 v3.0.0-dev.7 // indirect
github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.26 // indirect
github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.16 // indirect
github.com/edgexfoundry/go-mod-registry/v3 v3.0.0-dev.5 // indirect
github.com/edgexfoundry/go-mod-secrets/v3 v3.0.0-dev.7 // indirect
github.com/edgexfoundry/go-mod-secrets/v3 v3.0.0-dev.8 // indirect
github.com/fatih/color v1.9.0 // indirect
github.com/fxamacker/cbor/v2 v2.4.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
Expand Down Expand Up @@ -54,7 +54,7 @@ require (
github.com/spiffe/go-spiffe/v2 v2.1.2 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/zeebo/errs v1.3.0 // indirect
golang.org/x/crypto v0.5.0 // indirect
golang.org/x/crypto v0.6.0 // indirect
golang.org/x/mod v0.7.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sync v0.1.0 // indirect
Expand Down
32 changes: 16 additions & 16 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ github.com/diegoholiveira/jsonlogic/v3 v3.2.7 h1:awX07pFPnlntZzRNBcO4a2Ivxa77NMt
github.com/diegoholiveira/jsonlogic/v3 v3.2.7/go.mod h1:9oE8z9G+0OMxOoLHF3fhek3KuqD5CBqM0B6XFL08MSg=
github.com/eclipse/paho.mqtt.golang v1.4.2 h1:66wOzfUHSSI1zamx7jR6yMEI5EuHnT1G6rNA5PM12m4=
github.com/eclipse/paho.mqtt.golang v1.4.2/go.mod h1:JGt0RsEwEX+Xa/agj90YJ9d9DH2b7upDZMK9HRbFvCA=
github.com/edgexfoundry/app-functions-sdk-go/v3 v3.0.0-dev.36 h1:FXye2WQyTGmN57v93HnAb7ui0e6B3YDKOiXqxvnlU7I=
github.com/edgexfoundry/app-functions-sdk-go/v3 v3.0.0-dev.36/go.mod h1:oWXk7vjuBhYuevK11VPPeMIjA3EfDlgTNL9G/mWHgv0=
github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.29 h1:UWK79Xypm0ixd277Ta3PTweDG0Lm0dF8I7hs2yA4jnc=
github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.29/go.mod h1:wl51IXgqjQzWZWvCgKjLab78W3Gn1QrIZgH6CpEEe/E=
github.com/edgexfoundry/go-mod-configuration/v3 v3.0.0-dev.6 h1:x/QErFpfer2vbOGrQx46FWxPw4Ye51f72YOAnEKW5Fk=
github.com/edgexfoundry/go-mod-configuration/v3 v3.0.0-dev.6/go.mod h1:ZZbOu7K0/P8B1VKhZygVujLQyhvWuPe0E2vC/k2yscw=
github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.23 h1:tNvyEI/1QDeqtN8HjgRHiM9xM/LGZz2cfBHgNo9ocxo=
github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.23/go.mod h1:QBzXOAoyLzBm5k9CshgH9CR9nWMNXxZjknBFMnGJN/A=
github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.12 h1:NfJMbIjtOSlOohLF5TNS6ZUorh7x8fZdu6pxObCnupo=
github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.12/go.mod h1:H5N80pdJZ/uKJ19C3kui1AEmli3hdTkIa2s19EsYOPQ=
github.com/edgexfoundry/app-functions-sdk-go/v3 v3.0.0-dev.40 h1:W59BowTHuhQKzStXg/d8FJ04ceM2sqpW/ooiTOxvKWw=
github.com/edgexfoundry/app-functions-sdk-go/v3 v3.0.0-dev.40/go.mod h1:v1QLV8QeM+/bl9TBIPMGM8kE3wuGtRn8eMOIlk8b1jk=
github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.42 h1:7EqTqlEIsubvn5yIZP0Yk7edt6xlXbzGqpVTeygcGRE=
github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.42/go.mod h1:qiG4HABtB+mnFBOby/ZUpIWcQD0TZa8jIG7p/jeVuzc=
github.com/edgexfoundry/go-mod-configuration/v3 v3.0.0-dev.7 h1:pOH2GLDg1KB4EmAzo6IEvl4NEVFAw3ywxPUMa5Wi1Vw=
github.com/edgexfoundry/go-mod-configuration/v3 v3.0.0-dev.7/go.mod h1:ZZbOu7K0/P8B1VKhZygVujLQyhvWuPe0E2vC/k2yscw=
github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.26 h1:vTTaaM3NErQRoNQKkbQ9f9x/FMJqzZX6OAQuXvU6HN8=
github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.26/go.mod h1:QBzXOAoyLzBm5k9CshgH9CR9nWMNXxZjknBFMnGJN/A=
github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.16 h1:JdZiqZ6CAboZ3+GuWZLyXc42y8HfsH1CmsIKNPY+0PY=
github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.16/go.mod h1:3q+Ys51HwpR9/kOv6sT7+EwAANgOfFWi509sEP5iPEo=
github.com/edgexfoundry/go-mod-registry/v3 v3.0.0-dev.5 h1:FUUfsQUKHJqSwOXEj0j/qAn+uoWzM8nV7IOapGf7D80=
github.com/edgexfoundry/go-mod-registry/v3 v3.0.0-dev.5/go.mod h1:MroNeX/i6ymRu8cyuRB4U5zdBusyUpFhUphko6pInTQ=
github.com/edgexfoundry/go-mod-secrets/v3 v3.0.0-dev.7 h1:9Mn389IHlgoPgGUpwnLzoe/shylkQI+nXI3E/AfnYDA=
github.com/edgexfoundry/go-mod-secrets/v3 v3.0.0-dev.7/go.mod h1:Og18u4NhNuqnTVnoXo0bXKYlR6iU6o8GquT/ziynCis=
github.com/edgexfoundry/go-mod-secrets/v3 v3.0.0-dev.8 h1:rvoSu4fWQNAundG1eRKKCjZkzSBJQoYqCtEfzzV91CY=
github.com/edgexfoundry/go-mod-secrets/v3 v3.0.0-dev.8/go.mod h1:tjny0Y2/sLTB9qx3pjvT9PfGHpEOdfej7pjV3s1zppk=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s=
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
Expand Down Expand Up @@ -130,7 +130,7 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/klauspost/compress v1.15.15 h1:EF27CXIuDsYJ6mmvtBRlEuB2UVOqHG1tAXgZ7yIO+lw=
github.com/klauspost/compress v1.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw1HU4=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
Expand Down Expand Up @@ -175,7 +175,7 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/nats-io/jwt/v2 v2.3.0 h1:z2mA1a7tIf5ShggOFlR1oBPgd6hGqcDYsISxZByUzdI=
github.com/nats-io/nats-server/v2 v2.9.14 h1:n2GscWVgXpA14vQSRP/MM1SGi4wyazR9l19/gWxqgXQ=
github.com/nats-io/nats-server/v2 v2.9.15 h1:MuwEJheIwpvFgqvbs20W8Ish2azcygjf4Z0liVu2I4c=
github.com/nats-io/nats.go v1.24.0 h1:CRiD8L5GOQu/DcfkmgBcTTIQORMwizF+rPk6T0RaHVQ=
github.com/nats-io/nats.go v1.24.0/go.mod h1:dVQF+BK3SzUZpwyzHedXsvH3EO38aVKuOPkkHlv5hXA=
github.com/nats-io/nkeys v0.3.0 h1:cgM5tL53EvYRU+2YLXIK0G2mJtK12Ft9oeooSZMA2G8=
Expand Down Expand Up @@ -236,8 +236,8 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnf
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE=
golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc=
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA=
golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand Down
4 changes: 2 additions & 2 deletions res/external-mqtt-trigger/configuration.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ LogLevel = "INFO"
BrokerAddress = "tcp://localhost:1883" # Hive Public Test Broker
# Topic can have place holders in the form "{key-name}" that are replaced with matching Context values. Error occurs if no value match place holder(s).
Topic = "edgex-export"
SecretPath = "mqtt"
SecretName = "mqtt"
ClientId = "external-mqtt-export"
QOS="0"
AutoReconnect="false"
Expand Down Expand Up @@ -47,5 +47,5 @@ PublishTopic="" # optional if publishing response back to the the External MQTT
QoS = 0 # Quality of Service 0 (At most once), 1 (At least once) or 2 (Exactly once)
Retain = true
SkipCertVerify = false
SecretPath = "mqtt-trigger"
SecretName = "mqtt-trigger"
AuthMode = "none"
10 changes: 5 additions & 5 deletions res/functional-tests/configuration.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ LogLevel = "INFO"
[Writable.Pipeline.Functions.Encrypt]
[Writable.Pipeline.Functions.Encrypt.Parameters]
Algorithm = "aes256" # "aes" has been Deprecated. Please use "aes256"
SecretPath = "aes"
SecretName = "key"
SecretName = "aes"
SecretValueKey = "key"
[Writable.Pipeline.Functions.SetResponseData]
[Writable.Pipeline.Functions.SetResponseData.Parameters]
ResponseContentType = ""
Expand All @@ -52,7 +52,7 @@ LogLevel = "INFO"
[Writable.Pipeline.Functions.MQTTExport.Parameters]
BrokerAddress = "tcps://localhost:8883"
Topic = "mytopic"
SecretPath = "mqtt"
SecretName = "mqtt"
ClientId = "myclientid"
QOS="0"
AutoReconnect="false"
Expand All @@ -65,8 +65,8 @@ LogLevel = "INFO"

[Writable.InsecureSecrets]
[Writable.InsecureSecrets.AES]
path = "aes"
[Writable.InsecureSecrets.AES.Secrets]
SecretName = "aes"
[Writable.InsecureSecrets.AES.SecretData]
key = "217A24432646294A404E635266556A586E3272357538782F413F442A472D4B6150645367566B59703373367639792442264529482B4D6251655468576D5A7134"

# Reporting metrics requires the "edgex-messagebus" Trigger.
Expand Down
20 changes: 10 additions & 10 deletions res/http-export/configuration.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
[Writable.Pipeline.Functions.Encrypt]
[Writable.Pipeline.Functions.Encrypt.Parameters]
Algorithm = "aes256" # "aes" has been Deprecated. Please use "aes256"
SecretPath = "aes"
SecretName = "key"
SecretName = "aes"
SecretValueKey = "key"
[Writable.Pipeline.Functions.Batch]
[Writable.Pipeline.Functions.Batch.Parameters]
Mode = "bytimecount" # can be "bycount", "bytime" or "bytimecount"
Expand All @@ -51,8 +51,8 @@
ContinueOnSendError = "false" # For chained multi destination exports, if true continues after send error so next export function executes.
ReturnInputData = "false" # For chained multi destination exports if true, passes the input data to next export function.
HeaderName = "" # Name of the header key to add to the HTTP header
SecretName = "" # Name of the secret for the header value in the SecretStore
SecretPath = "" # Path to the secret for the header value in the SecretStore
SecretValueKey = "" # The key of the secret stored in the SecretStore
SecretName = "" # The name of the secret in the SecretStore
# Partial name matching allows multiple instances of same function (configured differently) to be in the function pipeline.
# This supports chaining export functions to export to multiple destinations. Name must start with name that matches built in function.
[Writable.Pipeline.Functions.HTTPExport2]
Expand All @@ -65,17 +65,17 @@
ContinueOnSendError = "false" # For chained multi destination exports, if true continues after send error so next export function executes.
ReturnInputData = "false" # For chained multi destination exports if true, passing the input data to next export function
HeaderName = "" # Name of the header key to add to the HTTP header
SecretName = "" # Name of the secret for the header value in the SecretStore
SecretPath = "" # Path to the secret for the header value in the SecretStore
SecretValueKey = "" # Name of the secret for the header value in the SecretStore
SecretName = "" # Path to the secret for the header value in the SecretStore

[Writable.InsecureSecrets]
[Writable.InsecureSecrets.http]
path = "http"
[Writable.InsecureSecrets.http.Secrets]
SecretName = "http"
[Writable.InsecureSecrets.http.SecretData]
headervalue = "<put your value here>"
[Writable.InsecureSecrets.AES]
path = "aes"
[Writable.InsecureSecrets.AES.Secrets]
SecretName = "aes"
[Writable.InsecureSecrets.AES.SecretData]
key = "217A24432646294A404E635266556A586E3272357538782F413F442A472D4B6150645367566B59703373367639792442264529482B4D6251655468576D5A7134"

[Service]
Expand Down
8 changes: 4 additions & 4 deletions res/metrics-influxdb/configuration.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
MimeType = "raw"
Url = "http:/<your-influxdb-host>:8086/api/v2/write?org=<your-org>&bucket=<your-bucket>&precision=ns"
HeaderName = "authorization" # Name of the header key to add to the HTTP header
SecretName = "token" # Name of the secret for the header value in the SecretStore
SecretPath = "influxdb" # Path to the secret for the header value in the SecretStore
SecretValueKey = "token" # Name of the secret for the header value in the SecretStore
SecretName = "influxdb" # Path to the secret for the header value in the SecretStore

[Writable.InsecureSecrets]
[Writable.InsecureSecrets.influxdb]
path = "influxdb"
[Writable.InsecureSecrets.influxdb.Secrets]
SecretName = "influxdb"
[Writable.InsecureSecrets.influxdb.SecretData]
token = "Token <place InfluxDB token here>"

[Writable.Telemetry]
Expand Down
14 changes: 7 additions & 7 deletions res/mqtt-export/configuration.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ LogLevel = "INFO"
[Writable.Pipeline.Functions.Encrypt]
[Writable.Pipeline.Functions.Encrypt.Parameters]
Algorithm = "aes256" # "aes" has been Deprecated. Please use "aes256"
SecretPath = "aes"
SecretName = "key"
SecretName = "aes"
SecretValueKey = "key"
[Writable.Pipeline.Functions.Batch]
[Writable.Pipeline.Functions.Batch.Parameters]
Mode = "bytimecount" # can be "bycount", "bytime" or "bytimecount"
Expand All @@ -45,7 +45,7 @@ LogLevel = "INFO"
[Writable.Pipeline.Functions.MQTTExport.Parameters]
BrokerAddress = "tcp://localhost:1883"
Topic = "edgex-export"
SecretPath = "mqtt"
SecretName = "mqtt"
ClientId = "MQTT-Export"
QOS="0"
AutoReconnect="false"
Expand All @@ -58,16 +58,16 @@ LogLevel = "INFO"

[Writable.InsecureSecrets]
[Writable.InsecureSecrets.mqtt]
path = "mqtt"
[Writable.InsecureSecrets.mqtt.Secrets]
SecretName = "mqtt"
[Writable.InsecureSecrets.mqtt.SecretData]
username = ""
password = ""
cacert = ""
clientcert = ""
clientkey = ""
[Writable.InsecureSecrets.AES]
path = "aes"
[Writable.InsecureSecrets.AES.Secrets]
SecretName = "aes"
[Writable.InsecureSecrets.AES.SecretData]
key = "217A24432646294A404E635266556A586E3272357538782F413F442A472D4B6150645367566B59703373367639792442264529482B4D6251655468576D5A7134"

[Service]
Expand Down
88 changes: 0 additions & 88 deletions res/push-to-core/configuration.toml

This file was deleted.

Loading

0 comments on commit 64e14a4

Please sign in to comment.