Skip to content

Commit

Permalink
refactor: Update profiles for refactored http export with secret header
Browse files Browse the repository at this point in the history
close edgexfoundry#197

BREAKING CHANGE: Parameters have changed for HTTP Post/Put with SecretHeader

Signed-off-by: lenny <[email protected]>
  • Loading branch information
lenny committed Feb 25, 2021
1 parent 50a23fb commit ab67b5f
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 22 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test.txt
go.mod.bk
debug
*.exe
app-service-configurable
Expand All @@ -7,4 +8,5 @@ go.sum
coverage.out
logs/
.idea
VERSION
VERSION
vendor/
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module github.com/edgexfoundry/app-service-configurable

go 1.15

require github.com/edgexfoundry/app-functions-sdk-go/v2 v2.0.0-dev.19
require github.com/edgexfoundry/app-functions-sdk-go/v2 v2.0.0-dev.20
24 changes: 17 additions & 7 deletions res/http-export/configuration.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,30 @@
[Writable.Pipeline.Functions.HTTPPostJSON.Parameters]
url = "http://"
persistOnError = "false"
secretheadername = "" # This is the name used in the HTTP header and also used as the secret key
secretpath = ""
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
[Writable.Pipeline.Functions.HTTPPutJSON]
[Writable.Pipeline.Functions.HTTPPutJSON.Parameters]
url = "http://"
persistOnError = "false"
secretheadername = "" # This is the name used in the HTTP header and also used as the secret key
secretpath = ""
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
[Writable.Pipeline.Functions.HTTPPostXML]
[Writable.Pipeline.Functions.HTTPPostXML.Parameters]
url = "http://"
persistOnError = "false"
secretheadername = "" # This is the name used in the HTTP header and also used as the secret key
secretpath = ""
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
[Writable.Pipeline.Functions.HTTPPutXML]
[Writable.Pipeline.Functions.HTTPPutXML.Parameters]
url = "http://"
persistOnError = "false"
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
[Writable.Pipeline.Functions.AddTags]
[Writable.Pipeline.Functions.AddTags.Parameters]
tags=""
Expand All @@ -66,7 +76,7 @@
[Writable.InsecureSecrets.http]
path = "http"
[Writable.InsecureSecrets.http.Secrets]
yoursecretheadername = "" # Note the key name and value are your custom values.
headervalue = "<put your value here>"

[Service]
BootTimeout = "30s"
Expand Down
32 changes: 19 additions & 13 deletions res/sample/configuration.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,39 +86,45 @@
url = "http://"
mimeType = "" #OPTIONAL - default application/json
persistOnError = "false"
secretheadername = "" # This is the name used in the HTTP header and also used as the secret key
secretpath = ""
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
[Writable.Pipeline.Functions.HTTPPostJSON]
[Writable.Pipeline.Functions.HTTPPostJSON.Parameters]
url = "http://"
persistOnError = "false"
secretheadername = "" # This is the name used in the HTTP header and also used as the secret key
secretpath = ""
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
[Writable.Pipeline.Functions.HTTPPostXML]
[Writable.Pipeline.Functions.HTTPPostXML.Parameters]
url = "http://"
persistOnError = "false"
secretheadername = "" # This is the name used in the HTTP header and also used as the secret key
secretpath = ""
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
[Writable.Pipeline.Functions.HTTPPut]
[Writable.Pipeline.Functions.HTTPPut.Parameters]
url = "http://"
mimeType = "" #OPTIONAL - default application/json
persistOnError = "false"
secretheadername = "" # This is the name used in the HTTP header and also used as the secret key
secretpath = ""
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
[Writable.Pipeline.Functions.HTTPPutJSON]
[Writable.Pipeline.Functions.HTTPPutJSON.Parameters]
url = "http://"
persistOnError = "false"
secretheadername = "" # This is the name used in the HTTP header and also used as the secret key
secretpath = ""
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
[Writable.Pipeline.Functions.HTTPPutXML]
[Writable.Pipeline.Functions.HTTPPutXML.Parameters]
url = "http://"
persistOnError = "false"
secretheadername = "" # This is the name used in the HTTP header and also used as the secret key
secretpath = ""
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
[Writable.Pipeline.Functions.MQTTSecretSend]
[Writable.Pipeline.Functions.MQTTSecretSend.Parameters]
brokeraddress = "tcps://localhost:8883"
Expand All @@ -143,7 +149,7 @@
[Writable.InsecureSecrets.http]
path = "http"
[Writable.InsecureSecrets.http.Secrets]
yoursecretheadername = "" # Note the key name and value are your custom values.
headervalue = "<put your value here>"
[Writable.InsecureSecrets.mqtt]
path = "mqtt"
[Writable.InsecureSecrets.mqtt.Secrets]
Expand Down

0 comments on commit ab67b5f

Please sign in to comment.