diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3924a04c0c..103985de7c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,15 +6,15 @@ updates: schedule: interval: "daily" ignore: - - dependency-name: "github.com/edgexfoundry/go-mod-configuration/v3" + - dependency-name: "github.com/edgexfoundry/go-mod-configuration/v4" # Included when go-mod-bootstrap is updated - - dependency-name: "github.com/edgexfoundry/go-mod-core-contracts/v3" + - dependency-name: "github.com/edgexfoundry/go-mod-core-contracts/v4" # Included when go-mod-bootstrap is updated - - dependency-name: "github.com/edgexfoundry/go-mod-messaging/v3" + - dependency-name: "github.com/edgexfoundry/go-mod-messaging/v4" # Included when go-mod-bootstrap is updated - - dependency-name: "github.com/edgexfoundry/go-mod-registry/v3" + - dependency-name: "github.com/edgexfoundry/go-mod-registry/v4" # Included when go-mod-bootstrap is updated - - dependency-name: "github.com/edgexfoundry/go-mod-secrets/v3" + - dependency-name: "github.com/edgexfoundry/go-mod-secrets/v4" # Included when go-mod-bootstrap is updated - dependency-name: "github.com/gomodule/redigo" # For github.com/gomodule/redigo, ignore version v2.0.0 diff --git a/Attribution.txt b/Attribution.txt index 82c61997dc..6b9eaeff1a 100644 --- a/Attribution.txt +++ b/Attribution.txt @@ -98,22 +98,22 @@ https://bitbucket.org/bertimus9/systemstat/src/master/LICENSE davecgh/go-spew (ISC) https://github.com/davecgh/go-spew https://github.com/davecgh/go-spew/blob/master/LICENSE -edgexfoundry/go-mod-bootstrap (Apache 2.0) https://github.com/edgexfoundry/go-mod-bootstrap/v3 +edgexfoundry/go-mod-bootstrap (Apache 2.0) https://github.com/edgexfoundry/go-mod-bootstrap/v4 https://github.com/edgexfoundry/go-mod-bootstrap/blob/master/LICENSE -edgexfoundry/go-mod-configuration (Apache 2.0) https://github.com/edgexfoundry/go-mod-configuration/v3 +edgexfoundry/go-mod-configuration (Apache 2.0) https://github.com/edgexfoundry/go-mod-configuration/v4 https://github.com/edgexfoundry/go-mod-configuration/blob/master/LICENSE -edgexfoundry/go-mod-core-contracts (Apache 2.0) https://github.com/edgexfoundry/go-mod-core-contracts/v3 +edgexfoundry/go-mod-core-contracts (Apache 2.0) https://github.com/edgexfoundry/go-mod-core-contracts/v4 https://github.com/edgexfoundry/go-mod-core-contracts/blob/master/LICENSE -edgexfoundry/go-mod-messaging (Apache 2.0) https://github.com/edgexfoundry/go-mod-messaging/v3 +edgexfoundry/go-mod-messaging (Apache 2.0) https://github.com/edgexfoundry/go-mod-messaging/v4 https://github.com/edgexfoundry/go-mod-messaging/blob/master/LICENSE -edgexfoundry/go-mod-registry (Apache 2.0) https://github.com/edgexfoundry/go-mod-registry/v3 +edgexfoundry/go-mod-registry (Apache 2.0) https://github.com/edgexfoundry/go-mod-registry/v4 https://github.com/edgexfoundry/go-mod-registry/blob/master/LICENSE -edgexfoundry/go-mod-secrets (Apache 2.0) https://github.com/edgexfoundry/go-mod-secrets/v3 +edgexfoundry/go-mod-secrets (Apache 2.0) https://github.com/edgexfoundry/go-mod-secrets/v4 https://github.com/edgexfoundry/go-mod-secrets/blob/master/LICENSE gorilla/context (BSD-3) https://github.com/gorilla/context diff --git a/cmd/secrets-config/res/configuration.yaml b/cmd/secrets-config/res/configuration.yaml index cb8aedb9dc..16969e74e2 100644 --- a/cmd/secrets-config/res/configuration.yaml +++ b/cmd/secrets-config/res/configuration.yaml @@ -1,12 +1,13 @@ # # Copyright (c) 2023 Intel Corporation +# Copyright (c) 2024 IOTech Ltd # # SPDX-License-Identifier: Apache-2.0 # LogLevel: DEBUG SecretStore: - Type: vault + Type: openbao Protocol: http Host: localhost Port: 8200 @@ -14,9 +15,9 @@ SecretStore: CaFilePath: "" CertFilePath: "" KeyFilePath: "" - # for root token use: /vault/config/assets + # for root token use: /openbao/config/assets # for service token use: /tmp/edgex/secrets/security-proxy-setup - TokenFolderPath: /vault/config/assets + TokenFolderPath: /openbao/config/assets # for root token use: resp-init.json # for service token use: secrets-token.json TokenFile: resp-init.json diff --git a/cmd/security-bootstrapper/entrypoint-scripts/vault_wait_install.sh b/cmd/security-bootstrapper/entrypoint-scripts/secretstore_wait_install.sh similarity index 72% rename from cmd/security-bootstrapper/entrypoint-scripts/vault_wait_install.sh rename to cmd/security-bootstrapper/entrypoint-scripts/secretstore_wait_install.sh index f2a484015c..5ad82d8979 100755 --- a/cmd/security-bootstrapper/entrypoint-scripts/vault_wait_install.sh +++ b/cmd/security-bootstrapper/entrypoint-scripts/secretstore_wait_install.sh @@ -1,6 +1,7 @@ #!/usr/bin/dumb-init /bin/sh # ---------------------------------------------------------------------------------- # Copyright (c) 2021 Intel Corporation +# Copyright (c) 2024 IOTech Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,41 +18,41 @@ # SPDX-License-Identifier: Apache-2.0 # ---------------------------------------------------------------------------------- -# This is customized entrypoint script for Vault. +# This is customized entrypoint script for secret store. # In particular, it waits for the BootstrapPort ready to roll set -e # env settings are populated from env files of docker-compose -echo "Script for waiting security bootstrapping on Vault" +echo "Script for waiting security bootstrapping on Secret Store" -DEFAULT_VAULT_LOCAL_CONFIG=' +DEFAULT_BAO_LOCAL_CONFIG=' listener "tcp" { - address = "edgex-vault:8200" + address = "edgex-secret-store:8200" tls_disable = "1" - cluster_address = "edgex-vault:8201" + cluster_address = "edgex-secret-store:8201" } backend "file" { - path = "/vault/file" + path = "/openbao/file" } default_lease_ttl = "168h" max_lease_ttl = "720h" ' -VAULT_LOCAL_CONFIG=${VAULT_LOCAL_CONFIG:-$DEFAULT_VAULT_LOCAL_CONFIG} +BAO_LOCAL_CONFIG=${BAO_LOCAL_CONFIG:-$DEFAULT_BAO_LOCAL_CONFIG} -export VAULT_LOCAL_CONFIG +export BAO_LOCAL_CONFIG -echo "$(date) VAULT_LOCAL_CONFIG: ${VAULT_LOCAL_CONFIG}" +echo "$(date) BAO_LOCAL_CONFIG: ${BAO_LOCAL_CONFIG}" if [ "$1" = 'server' ]; then - echo "$(date) Executing waitFor on vault $* with \ + echo "$(date) Executing waitFor on secret store $* with \ tcp://${STAGEGATE_BOOTSTRAPPER_HOST}:${STAGEGATE_BOOTSTRAPPER_STARTPORT}" /edgex-init/security-bootstrapper --configDir=/edgex-init/res waitFor \ -uri tcp://"${STAGEGATE_BOOTSTRAPPER_HOST}":"${STAGEGATE_BOOTSTRAPPER_STARTPORT}" \ -timeout "${STAGEGATE_WAITFOR_TIMEOUT}" - echo "$(date) Starting edgex-vault..." + echo "$(date) Starting edgex-secret-store..." exec /usr/local/bin/docker-entrypoint.sh server -log-level=info fi diff --git a/cmd/security-bootstrapper/res/configuration.yaml b/cmd/security-bootstrapper/res/configuration.yaml index 7f61444701..b8d8180a39 100644 --- a/cmd/security-bootstrapper/res/configuration.yaml +++ b/cmd/security-bootstrapper/res/configuration.yaml @@ -61,7 +61,7 @@ StageGate: # protocol, host, and port of secretstore using in the security-bootstrapper # we are not really using the secret store provider from go-mod-bootstrap in the code SecretStore: - Type: vault + Type: openbao Protocol: http Host: localhost Port: 8200 diff --git a/cmd/security-proxy-setup/entrypoint.sh b/cmd/security-proxy-setup/entrypoint.sh index fee7d08f09..88d5c133b9 100644 --- a/cmd/security-proxy-setup/entrypoint.sh +++ b/cmd/security-proxy-setup/entrypoint.sh @@ -305,13 +305,13 @@ server { proxy_set_header Host \$host; } - # Note: Vault login API does not require authentication at the gateway for obvious reasons - set \$upstream_vault edgex-vault; + # Note: OpenBao login API does not require authentication at the gateway for obvious reasons + set \$upstream_secret_store edgex-secret-store; location /vault/v1/auth/userpass/login { `cat "${corssnippet}"` rewrite /vault/(.*) /\$1 break; resolver 127.0.0.11 valid=30s; - proxy_pass http://\$upstream_vault:8200; + proxy_pass http://\$upstream_secret_store:8200; proxy_redirect off; proxy_set_header Host \$host; } @@ -319,7 +319,7 @@ server { `cat "${corssnippet}"` rewrite /vault/(.*) /\$1 break; resolver 127.0.0.11 valid=30s; - proxy_pass http://\$upstream_vault:8200; + proxy_pass http://\$upstream_secret_store:8200; proxy_redirect off; proxy_set_header Host \$host; } diff --git a/cmd/security-secretstore-setup/README.md b/cmd/security-secretstore-setup/README.md index bb08629bfa..66817006ff 100644 --- a/cmd/security-secretstore-setup/README.md +++ b/cmd/security-secretstore-setup/README.md @@ -18,13 +18,13 @@ This will create an executable located at `cmd/security-secretstore-setup/` if s The binary supports multiple command line parameters -| Parameter | Description | -|-----------------------------------|----------------------------------------------------------------------------------------------------------------| -| -p, --profile `name` | Indicate configuration profile other than default | -| -r, --registry | Indicates service should use Registry | -| --insecureSkipVerify=`true/false` | Indicates if skipping the server side SSL cert verifcation, similar to -k of curl | -| --configfile=`file.yaml` | Use a different config file (default: res/configuration.yaml) | -| --vaultInterval=`seconds` | **Required** Indicates how long the program will pause between vault initialization attempts until it succeeds | +| Parameter | Description | +|-----------------------------------|-----------------------------------------------------------------------------------------------------------------------| +| -p, --profile `name` | Indicate configuration profile other than default | +| -r, --registry | Indicates service should use Registry | +| --insecureSkipVerify=`true/false` | Indicates if skipping the server side SSL cert verifcation, similar to -k of curl | +| --configfile=`file.yaml` | Use a different config file (default: res/configuration.yaml) | +| --secretStoreInterval=`seconds` | **Required** Indicates how long the program will pause between secret store initialization attempts until it succeeds | An example of using the parameters can be found in the following docker compose file: @@ -50,19 +50,19 @@ It should create a docker image with the name `edgexfoundry/docker_security_secr RevokeRootTokens = false ``` -* The edgex-vault-worker uses _compose-files_vault-config_ volume to store its token. To copy the root token from edgex-vault-worker, use +* The edgex-vault-worker uses _compose-files_secret-store-config_ volume to store its token. To copy the root token from edgex-vault-worker, use ```sh - docker run --rm -v compose-files_vault-config:/vault/config alpine:latest cat /vault/config/assets/resp-init.json > resp-init.json + docker run --rm -v compose-secret-store-config:/openbao/config alpine:latest cat /openbao/config/assets/resp-init.json > resp-init.json ``` * To verify the root token ```sh - docker exec -ti edgex-vault sh -l + docker exec -ti edgex-secret-store sh -l export VAULT_SKIP_VERIFY=true export VAULT_TOKEN=s.xxxxxxxxxxxxxxxx - vault token lookup + bao token lookup ``` where `s.xxxxxxxxxxxxxxxx` is the _root_token_ member of `resp-init.json` @@ -72,19 +72,19 @@ It should create a docker image with the name `edgexfoundry/docker_security_secr * To explore the vault ```sh - docker exec -ti edgex-vault sh -l + docker exec -ti edgex-secret-store sh -l export VAULT_SKIP_VERIFY=true export VAULT_TOKEN=s.xxxxxxxxxxxxxxxx - vault kv list secret/ + bao kv list secret/ ``` - and drill down from there. To read a key use `vault kv get` or `vault read`. + and drill down from there. To read a key use `bao kv get` or `bao read`. ```sh - docker exec -ti edgex-vault sh -l + docker exec -ti edgex-secret-store sh -l export VAULT_SKIP_VERIFY=true export VAULT_TOKEN=s.xxxxxxxxxxxxxxxx - vault kv get /secret/edgex/redis/redis5 + bao kv get /secret/edgex/redis/redis5 ``` Note you can set the environment variables on the docker command line with `-e` and avoid the additional shell commands. diff --git a/cmd/security-secretstore-setup/entrypoint.sh b/cmd/security-secretstore-setup/entrypoint.sh index 6c9cfb6c38..141bc27704 100644 --- a/cmd/security-secretstore-setup/entrypoint.sh +++ b/cmd/security-secretstore-setup/entrypoint.sh @@ -27,11 +27,11 @@ if [ ! -z "${TOKENFILEPROVIDER_OUTPUTDIR}" ]; then fi # create token dir, and assign perms -mkdir -p /vault/config/assets -chown -Rh 100:1000 /vault/ +mkdir -p /openbao/config/assets +chown -Rh 100:1000 /openbao/ echo "Initializing secret store..." -/security-secretstore-setup --vaultInterval=10 +/security-secretstore-setup --secretStoreInterval=10 # default User and Group in case never set if [ -z "${EDGEX_USER}" ]; then diff --git a/cmd/security-secretstore-setup/res-file-token-provider/configuration.yaml b/cmd/security-secretstore-setup/res-file-token-provider/configuration.yaml index 6b2dd8e84e..96cd2b5f67 100644 --- a/cmd/security-secretstore-setup/res-file-token-provider/configuration.yaml +++ b/cmd/security-secretstore-setup/res-file-token-provider/configuration.yaml @@ -1,6 +1,6 @@ LogLevel: DEBUG SecretStore: - Type: vault + Type: openbao Protocol: http Host: localhost Port: 8200 diff --git a/cmd/security-secretstore-setup/res/configuration.yaml b/cmd/security-secretstore-setup/res/configuration.yaml index 9146e5243f..0b9769c623 100644 --- a/cmd/security-secretstore-setup/res/configuration.yaml +++ b/cmd/security-secretstore-setup/res/configuration.yaml @@ -16,7 +16,7 @@ LogLevel: DEBUG SecretStore: - Type: vault + Type: openbao Protocol: http Host: localhost Port: 8200 @@ -24,10 +24,10 @@ SecretStore: CaFilePath: "" CertFilePath: "" KeyFilePath: "" - TokenFolderPath: /vault/config/assets + TokenFolderPath: /openbao/config/assets TokenFile: resp-init.json - VaultSecretShares: 5 - VaultSecretThreshold: 3 + SecretShares: 5 + SecretThreshold: 3 TokenProvider: /security-file-token-provider TokenProviderArgs: - "-configDir" diff --git a/go.mod b/go.mod index bc7c7c9d90..107ece8b21 100644 --- a/go.mod +++ b/go.mod @@ -4,11 +4,11 @@ go 1.23 require ( github.com/eclipse/paho.mqtt.golang v1.5.0 - github.com/edgexfoundry/go-mod-bootstrap/v3 v3.2.0-dev.66 - github.com/edgexfoundry/go-mod-configuration/v3 v3.2.0-dev.19 - github.com/edgexfoundry/go-mod-core-contracts/v3 v3.2.0-dev.53 - github.com/edgexfoundry/go-mod-messaging/v3 v3.2.0-dev.40 - github.com/edgexfoundry/go-mod-secrets/v3 v3.2.0-dev.18 + github.com/edgexfoundry/go-mod-bootstrap/v4 v4.0.0-dev.1 + github.com/edgexfoundry/go-mod-configuration/v4 v4.0.0-dev.1 + github.com/edgexfoundry/go-mod-core-contracts/v4 v4.0.0-dev.2 + github.com/edgexfoundry/go-mod-messaging/v4 v4.0.0-dev.2 + github.com/edgexfoundry/go-mod-secrets/v4 v4.0.0-dev.1 github.com/fxamacker/cbor/v2 v2.7.0 github.com/go-co-op/gocron/v2 v2.12.1 github.com/gomodule/redigo v1.9.2 @@ -33,7 +33,7 @@ require ( github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/edgexfoundry/go-mod-registry/v3 v3.2.0-dev.18 // indirect + github.com/edgexfoundry/go-mod-registry/v4 v4.0.0-dev.1 // indirect github.com/fatih/color v1.16.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa // indirect diff --git a/go.sum b/go.sum index 9e6f3662c9..5cac715b73 100644 --- a/go.sum +++ b/go.sum @@ -84,18 +84,18 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/eclipse/paho.mqtt.golang v1.5.0 h1:EH+bUVJNgttidWFkLLVKaQPGmkTUfQQqjOsyvMGvD6o= github.com/eclipse/paho.mqtt.golang v1.5.0/go.mod h1:du/2qNQVqJf/Sqs4MEL77kR8QTqANF7XU7Fk0aOTAgk= -github.com/edgexfoundry/go-mod-bootstrap/v3 v3.2.0-dev.66 h1:kmBEAhNi4ftrJMXM3IvEbwrRCOWUDuUOKTVAOgHnoPw= -github.com/edgexfoundry/go-mod-bootstrap/v3 v3.2.0-dev.66/go.mod h1:3IXVpc5Qez5nwFJ8IkMyJMba8Iavj620E0XB42BQzfQ= -github.com/edgexfoundry/go-mod-configuration/v3 v3.2.0-dev.19 h1:274NZdVBkJBuQP6yT3tVrb7psTFuIPogX/DLQqv7OCQ= -github.com/edgexfoundry/go-mod-configuration/v3 v3.2.0-dev.19/go.mod h1:BG6hCDxXizpgMdNEljwNfLWSsd4Op7GAHd3Pis1dVv8= -github.com/edgexfoundry/go-mod-core-contracts/v3 v3.2.0-dev.53 h1:aHnYwqpg0LcnMrgNQlkRQjzHAS/IML/9GI368OmNCz4= -github.com/edgexfoundry/go-mod-core-contracts/v3 v3.2.0-dev.53/go.mod h1:MLk37/79M26+bZr3IptNZuYmQBEVbXwzDp1VHQkFhIk= -github.com/edgexfoundry/go-mod-messaging/v3 v3.2.0-dev.40 h1:YyB21HEapV5pENG01vFlpjPI6UkmKpJuaWFfgGFVUsY= -github.com/edgexfoundry/go-mod-messaging/v3 v3.2.0-dev.40/go.mod h1:8NpZ6/eAsiyZHgn/s3DRIpcOjUrve+ZONIgvcDvA3Yg= -github.com/edgexfoundry/go-mod-registry/v3 v3.2.0-dev.18 h1:AzILZ/xcEmSYVhIwSF4zkWpXyFoBA733E/j8ttzlNnI= -github.com/edgexfoundry/go-mod-registry/v3 v3.2.0-dev.18/go.mod h1:TBgZZMF8FAJwxUl3AJgHQaT0S5pwKJKKDP3d638ttrc= -github.com/edgexfoundry/go-mod-secrets/v3 v3.2.0-dev.18 h1:UHyNs7pAdFqURAVL/BWd5riiZczVRdyb7r76dUGxqUU= -github.com/edgexfoundry/go-mod-secrets/v3 v3.2.0-dev.18/go.mod h1:2q9qMnQD4MCAZHgXyB8ltpwuct554HOiPrbRydyXyWQ= +github.com/edgexfoundry/go-mod-bootstrap/v4 v4.0.0-dev.1 h1:9uiZON4CDOVAZNNawtncvfX4Abgz31r8QcOVEWvlUD4= +github.com/edgexfoundry/go-mod-bootstrap/v4 v4.0.0-dev.1/go.mod h1:OJdeMt2HyzMZZyKy89ICwGu4Ui7ddWd+dQXGMJTAmYk= +github.com/edgexfoundry/go-mod-configuration/v4 v4.0.0-dev.1 h1:eWcDmVFwkFSmlrD745lZQ6xs+ZKJ9u6TqNUnXuWJ5AY= +github.com/edgexfoundry/go-mod-configuration/v4 v4.0.0-dev.1/go.mod h1:AHvE7RQJabfMVHXCDDDKhg3hzJNQtUqbyB9yJxv2Qbk= +github.com/edgexfoundry/go-mod-core-contracts/v4 v4.0.0-dev.2 h1:BEJKSvyW+dMTW/yzEKWjs0tGUZnMkFPYX4eypyoG0IY= +github.com/edgexfoundry/go-mod-core-contracts/v4 v4.0.0-dev.2/go.mod h1:I3EG+Tg/gcVSUJ+IJDuvVKFISnRu8oQtMXqltE1rzT8= +github.com/edgexfoundry/go-mod-messaging/v4 v4.0.0-dev.2 h1:2zRS7LTEoucQmAkZ33b/Erw13ne1LoxexPhhHGa065Q= +github.com/edgexfoundry/go-mod-messaging/v4 v4.0.0-dev.2/go.mod h1:eAmCHilZWXL0skB9Frnm2kZTeY81sF6xKOmePoWKTNE= +github.com/edgexfoundry/go-mod-registry/v4 v4.0.0-dev.1 h1:/CrP00ozrLjMR0R9OTSJlQi5zJ7/9IKnfG0zS2ZN+8U= +github.com/edgexfoundry/go-mod-registry/v4 v4.0.0-dev.1/go.mod h1:YgkZ1ThNEEXPzC2iu3/53QcrDQ3tlQHlflnjb3Jseo8= +github.com/edgexfoundry/go-mod-secrets/v4 v4.0.0-dev.1 h1:lw9GNOujQhqnPMJko6n9BGU9Pu3P9RPUQYCT5GpoSw0= +github.com/edgexfoundry/go-mod-secrets/v4 v4.0.0-dev.1/go.mod h1:p6RbhVfJ/SNBLYlz8P/v6kOJmj5Zz1In5/T3TSXylO4= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= diff --git a/internal/core/command/application/command.go b/internal/core/command/application/command.go index 9077d0f9fe..455c678ed9 100644 --- a/internal/core/command/application/command.go +++ b/internal/core/command/application/command.go @@ -12,13 +12,13 @@ import ( commandContainer "github.com/edgexfoundry/edgex-go/internal/core/command/container" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" ) // AllCommands query commands by offset, and limit diff --git a/internal/core/command/application/command_test.go b/internal/core/command/application/command_test.go index 18ea6bcd69..cdbac192df 100644 --- a/internal/core/command/application/command_test.go +++ b/internal/core/command/application/command_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" "github.com/stretchr/testify/assert" ) diff --git a/internal/core/command/config/config.go b/internal/core/command/config/config.go index d6f0ef54cf..abed8c26f7 100644 --- a/internal/core/command/config/config.go +++ b/internal/core/command/config/config.go @@ -17,7 +17,7 @@ package config import ( - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" ) // ConfigurationStruct contains the configuration properties for the core-command service. diff --git a/internal/core/command/container/config.go b/internal/core/command/container/config.go index f0e9893356..5b98d340ba 100644 --- a/internal/core/command/container/config.go +++ b/internal/core/command/container/config.go @@ -17,7 +17,7 @@ package container import ( "github.com/edgexfoundry/edgex-go/internal/core/command/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) // ConfigurationName contains the name of command's config.ConfigurationStruct implementation in the DIC. diff --git a/internal/core/command/controller/http/command.go b/internal/core/command/controller/http/command.go index 3c794361c0..bfe33e1f4a 100644 --- a/internal/core/command/controller/http/command.go +++ b/internal/core/command/controller/http/command.go @@ -10,11 +10,11 @@ import ( "math" "net/http" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" "github.com/edgexfoundry/edgex-go/internal/core/command/application" commandContainer "github.com/edgexfoundry/edgex-go/internal/core/command/container" diff --git a/internal/core/command/controller/http/command_test.go b/internal/core/command/controller/http/command_test.go index 6496df23fd..7458c1ed90 100644 --- a/internal/core/command/controller/http/command_test.go +++ b/internal/core/command/controller/http/command_test.go @@ -17,17 +17,17 @@ import ( "github.com/edgexfoundry/edgex-go/internal/core/command/config" commandContainer "github.com/edgexfoundry/edgex-go/internal/core/command/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/interfaces/mocks" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/interfaces/mocks" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" "github.com/google/uuid" "github.com/labstack/echo/v4" diff --git a/internal/core/command/controller/messaging/external.go b/internal/core/command/controller/messaging/external.go index a0a2bf0018..591217ae90 100644 --- a/internal/core/command/controller/messaging/external.go +++ b/internal/core/command/controller/messaging/external.go @@ -14,12 +14,12 @@ import ( "time" mqtt "github.com/eclipse/paho.mqtt.golang" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" - "github.com/edgexfoundry/go-mod-messaging/v3/pkg/types" + "github.com/edgexfoundry/go-mod-messaging/v4/pkg/types" "github.com/edgexfoundry/edgex-go/internal/core/command/container" ) diff --git a/internal/core/command/controller/messaging/external_test.go b/internal/core/command/controller/messaging/external_test.go index 0f9f4a9a4b..1f17e2cf64 100644 --- a/internal/core/command/controller/messaging/external_test.go +++ b/internal/core/command/controller/messaging/external_test.go @@ -14,21 +14,21 @@ import ( "testing" "time" - clientMocks "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/interfaces/mocks" - lcMocks "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger/mocks" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - edgexErr "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + clientMocks "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/interfaces/mocks" + lcMocks "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger/mocks" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + edgexErr "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - internalMessagingMocks "github.com/edgexfoundry/go-mod-messaging/v3/messaging/mocks" - "github.com/edgexfoundry/go-mod-messaging/v3/pkg/types" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + internalMessagingMocks "github.com/edgexfoundry/go-mod-messaging/v4/messaging/mocks" + "github.com/edgexfoundry/go-mod-messaging/v4/pkg/types" "github.com/edgexfoundry/edgex-go/internal/core/command/config" "github.com/edgexfoundry/edgex-go/internal/core/command/container" diff --git a/internal/core/command/controller/messaging/internal.go b/internal/core/command/controller/messaging/internal.go index 6f400f6e52..bcfe63518c 100644 --- a/internal/core/command/controller/messaging/internal.go +++ b/internal/core/command/controller/messaging/internal.go @@ -13,15 +13,15 @@ import ( "strings" "time" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-messaging/v3/messaging" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-messaging/v4/messaging" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" - "github.com/edgexfoundry/go-mod-messaging/v3/pkg/types" + "github.com/edgexfoundry/go-mod-messaging/v4/pkg/types" "github.com/edgexfoundry/edgex-go/internal/core/command/container" ) diff --git a/internal/core/command/controller/messaging/internal_test.go b/internal/core/command/controller/messaging/internal_test.go index 2f5fa51bbb..9d7c68f4eb 100644 --- a/internal/core/command/controller/messaging/internal_test.go +++ b/internal/core/command/controller/messaging/internal_test.go @@ -11,16 +11,16 @@ import ( "testing" "time" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - config2 "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - mocks2 "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/interfaces/mocks" - lcMocks "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger/mocks" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-messaging/v3/messaging/mocks" - "github.com/edgexfoundry/go-mod-messaging/v3/pkg/types" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + config2 "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + mocks2 "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/interfaces/mocks" + lcMocks "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger/mocks" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-messaging/v4/messaging/mocks" + "github.com/edgexfoundry/go-mod-messaging/v4/pkg/types" "github.com/google/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/internal/core/command/controller/messaging/utils.go b/internal/core/command/controller/messaging/utils.go index afef09d7bc..6bcd6a1441 100644 --- a/internal/core/command/controller/messaging/utils.go +++ b/internal/core/command/controller/messaging/utils.go @@ -14,12 +14,12 @@ import ( "net/http" "strconv" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" - "github.com/edgexfoundry/go-mod-messaging/v3/pkg/types" + "github.com/edgexfoundry/go-mod-messaging/v4/pkg/types" "github.com/edgexfoundry/edgex-go/internal/core/command/application" ) diff --git a/internal/core/command/init.go b/internal/core/command/init.go index 702231c40f..29a909fd72 100644 --- a/internal/core/command/init.go +++ b/internal/core/command/init.go @@ -21,13 +21,13 @@ import ( "sync" "github.com/edgexfoundry/edgex-go/internal/core/command/container" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/secret" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - clients "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/http" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/secret" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + clients "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/http" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/zerotrust" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/zerotrust" "github.com/labstack/echo/v4" ) diff --git a/internal/core/command/main.go b/internal/core/command/main.go index 02f4150cdb..d24b62a93d 100644 --- a/internal/core/command/main.go +++ b/internal/core/command/main.go @@ -22,21 +22,21 @@ import ( "sync" "time" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/flags" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/handlers" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/flags" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/handlers" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/interfaces" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" "github.com/edgexfoundry/edgex-go" "github.com/edgexfoundry/edgex-go/internal/core/command/config" "github.com/edgexfoundry/edgex-go/internal/core/command/container" "github.com/edgexfoundry/edgex-go/internal/core/command/controller/messaging" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" "github.com/labstack/echo/v4" ) diff --git a/internal/core/command/router.go b/internal/core/command/router.go index dc22780565..11f8c6fef6 100644 --- a/internal/core/command/router.go +++ b/internal/core/command/router.go @@ -9,11 +9,11 @@ package command import ( "github.com/edgexfoundry/edgex-go" commandController "github.com/edgexfoundry/edgex-go/internal/core/command/controller/http" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/controller" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/handlers" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/controller" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/handlers" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" "github.com/labstack/echo/v4" ) diff --git a/internal/core/common_config/main.go b/internal/core/common_config/main.go index eb46045d9c..806b0b82a1 100644 --- a/internal/core/common_config/main.go +++ b/internal/core/common_config/main.go @@ -24,17 +24,17 @@ import ( "sync" "syscall" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/environment" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/flags" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/secret" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-configuration/v3/configuration" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/environment" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/flags" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/secret" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-configuration/v4/configuration" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "gopkg.in/yaml.v3" ) diff --git a/internal/core/data/application/app.go b/internal/core/data/application/app.go index bf5f7faadf..6730740fdc 100644 --- a/internal/core/data/application/app.go +++ b/internal/core/data/application/app.go @@ -20,10 +20,10 @@ import ( gometrics "github.com/rcrowley/go-metrics" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) const ( diff --git a/internal/core/data/application/event.go b/internal/core/data/application/event.go index fe3af72358..3de6c895db 100644 --- a/internal/core/data/application/event.go +++ b/internal/core/data/application/event.go @@ -10,14 +10,14 @@ import ( "fmt" "strings" - msgTypes "github.com/edgexfoundry/go-mod-messaging/v3/pkg/types" - - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + msgTypes "github.com/edgexfoundry/go-mod-messaging/v4/pkg/types" + + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/edgexfoundry/edgex-go/internal/core/data/container" "github.com/edgexfoundry/edgex-go/internal/pkg/correlation" diff --git a/internal/core/data/application/event_test.go b/internal/core/data/application/event_test.go index e14df9920a..1a2b9573b9 100644 --- a/internal/core/data/application/event_test.go +++ b/internal/core/data/application/event_test.go @@ -20,10 +20,10 @@ import ( dbMock "github.com/edgexfoundry/edgex-go/internal/core/data/infrastructure/interfaces/mocks" "github.com/edgexfoundry/edgex-go/internal/core/data/mocks" pkgCommon "github.com/edgexfoundry/edgex-go/internal/pkg/common" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) const ( diff --git a/internal/core/data/application/reading.go b/internal/core/data/application/reading.go index af64a418e3..cfb46dcbfc 100644 --- a/internal/core/data/application/reading.go +++ b/internal/core/data/application/reading.go @@ -11,11 +11,11 @@ import ( "sync" "time" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/edgexfoundry/edgex-go/internal/core/data/container" "github.com/edgexfoundry/edgex-go/internal/pkg/utils" diff --git a/internal/core/data/application/reading_test.go b/internal/core/data/application/reading_test.go index ce0ae6141a..86a0a56331 100644 --- a/internal/core/data/application/reading_test.go +++ b/internal/core/data/application/reading_test.go @@ -17,9 +17,9 @@ import ( "github.com/edgexfoundry/edgex-go/internal/core/data/container" dbMock "github.com/edgexfoundry/edgex-go/internal/core/data/infrastructure/interfaces/mocks" "github.com/edgexfoundry/edgex-go/internal/core/data/mocks" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) func TestAllReadings(t *testing.T) { diff --git a/internal/core/data/config/config.go b/internal/core/data/config/config.go index 6405de0636..f176be6720 100644 --- a/internal/core/data/config/config.go +++ b/internal/core/data/config/config.go @@ -16,7 +16,7 @@ package config import ( - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" ) type ConfigurationStruct struct { diff --git a/internal/core/data/container/config.go b/internal/core/data/container/config.go index 8cf2675ea5..3a9393890f 100644 --- a/internal/core/data/container/config.go +++ b/internal/core/data/container/config.go @@ -17,7 +17,7 @@ package container import ( "github.com/edgexfoundry/edgex-go/internal/core/data/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) // ConfigurationName contains the name of data's config.ConfigurationStruct implementation in the DIC. diff --git a/internal/core/data/container/database.go b/internal/core/data/container/database.go index 86ebde37f8..2ec9849770 100644 --- a/internal/core/data/container/database.go +++ b/internal/core/data/container/database.go @@ -8,7 +8,7 @@ package container import ( "github.com/edgexfoundry/edgex-go/internal/core/data/infrastructure/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) // DBClientInterfaceName contains the name of the interfaces.DBClient implementation in the DIC. diff --git a/internal/core/data/controller/http/event.go b/internal/core/data/controller/http/event.go index 9340a27624..2ca7817b40 100644 --- a/internal/core/data/controller/http/event.go +++ b/internal/core/data/controller/http/event.go @@ -15,13 +15,13 @@ import ( edgexIO "github.com/edgexfoundry/edgex-go/internal/io" "github.com/edgexfoundry/edgex-go/internal/pkg" "github.com/edgexfoundry/edgex-go/internal/pkg/utils" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - requestDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + requestDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" "github.com/labstack/echo/v4" ) diff --git a/internal/core/data/controller/http/event_test.go b/internal/core/data/controller/http/event_test.go index 736b2e05ae..85c7e8c1ce 100644 --- a/internal/core/data/controller/http/event_test.go +++ b/internal/core/data/controller/http/event_test.go @@ -18,14 +18,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/edgexfoundry/edgex-go/internal/core/data/application" "github.com/edgexfoundry/edgex-go/internal/core/data/config" diff --git a/internal/core/data/controller/http/reading.go b/internal/core/data/controller/http/reading.go index 4a060b444e..f2b5d43a17 100644 --- a/internal/core/data/controller/http/reading.go +++ b/internal/core/data/controller/http/reading.go @@ -15,12 +15,12 @@ import ( "github.com/edgexfoundry/edgex-go/internal/io" "github.com/edgexfoundry/edgex-go/internal/pkg" "github.com/edgexfoundry/edgex-go/internal/pkg/utils" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" "github.com/labstack/echo/v4" ) diff --git a/internal/core/data/controller/http/reading_test.go b/internal/core/data/controller/http/reading_test.go index 8dacfb0a95..7bf6b460ee 100644 --- a/internal/core/data/controller/http/reading_test.go +++ b/internal/core/data/controller/http/reading_test.go @@ -8,17 +8,17 @@ import ( "strings" "testing" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/edgexfoundry/edgex-go/internal/core/data/container" dbMock "github.com/edgexfoundry/edgex-go/internal/core/data/infrastructure/interfaces/mocks" "github.com/edgexfoundry/edgex-go/internal/core/data/mocks" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/labstack/echo/v4" ) diff --git a/internal/core/data/controller/messaging/subscriber.go b/internal/core/data/controller/messaging/subscriber.go index 00f87abfd5..b911e0ecd4 100644 --- a/internal/core/data/controller/messaging/subscriber.go +++ b/internal/core/data/controller/messaging/subscriber.go @@ -18,14 +18,14 @@ import ( dataContainer "github.com/edgexfoundry/edgex-go/internal/core/data/container" "github.com/edgexfoundry/edgex-go/internal/pkg/utils" - "github.com/edgexfoundry/go-mod-messaging/v3/pkg/types" - - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + "github.com/edgexfoundry/go-mod-messaging/v4/pkg/types" + + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" ) // SubscribeEvents subscribes to events from message bus diff --git a/internal/core/data/infrastructure/interfaces/db.go b/internal/core/data/infrastructure/interfaces/db.go index 3e73666805..439dc70fb0 100644 --- a/internal/core/data/infrastructure/interfaces/db.go +++ b/internal/core/data/infrastructure/interfaces/db.go @@ -6,8 +6,8 @@ package interfaces import ( - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - model "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + model "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) type DBClient interface { diff --git a/internal/core/data/infrastructure/interfaces/mocks/DBClient.go b/internal/core/data/infrastructure/interfaces/mocks/DBClient.go index bf74eb357c..3f87a73040 100644 --- a/internal/core/data/infrastructure/interfaces/mocks/DBClient.go +++ b/internal/core/data/infrastructure/interfaces/mocks/DBClient.go @@ -3,11 +3,11 @@ package mocks import ( - errors "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + errors "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" mock "github.com/stretchr/testify/mock" - models "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + models "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) // DBClient is an autogenerated mock type for the DBClient type diff --git a/internal/core/data/init.go b/internal/core/data/init.go index f80ee133ab..03d8d5d154 100644 --- a/internal/core/data/init.go +++ b/internal/core/data/init.go @@ -24,9 +24,9 @@ import ( "github.com/edgexfoundry/edgex-go/internal/core/data/application" "github.com/edgexfoundry/edgex-go/internal/core/data/container" "github.com/edgexfoundry/edgex-go/internal/core/data/controller/messaging" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" "github.com/labstack/echo/v4" ) diff --git a/internal/core/data/main.go b/internal/core/data/main.go index 0f0820dad2..036fa9295e 100644 --- a/internal/core/data/main.go +++ b/internal/core/data/main.go @@ -20,14 +20,14 @@ import ( "context" "os" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/flags" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/handlers" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/flags" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/handlers" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/interfaces" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" "github.com/edgexfoundry/edgex-go" "github.com/edgexfoundry/edgex-go/internal/core/data/application" diff --git a/internal/core/data/mocks/container.go b/internal/core/data/mocks/container.go index 29a6fc00e7..f86373de70 100644 --- a/internal/core/data/mocks/container.go +++ b/internal/core/data/mocks/container.go @@ -8,13 +8,13 @@ package mocks import ( "github.com/edgexfoundry/edgex-go/internal/core/data/config" dataContainer "github.com/edgexfoundry/edgex-go/internal/core/data/container" - "github.com/edgexfoundry/go-mod-messaging/v3/messaging/mocks" + "github.com/edgexfoundry/go-mod-messaging/v4/messaging/mocks" "github.com/stretchr/testify/mock" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) // NewMockDIC function returns a mock bootstrap di Container diff --git a/internal/core/data/router.go b/internal/core/data/router.go index 1f14946c7c..a8aa092c97 100644 --- a/internal/core/data/router.go +++ b/internal/core/data/router.go @@ -8,11 +8,11 @@ package data import ( "github.com/edgexfoundry/edgex-go" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/controller" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/handlers" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/controller" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/handlers" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" dataController "github.com/edgexfoundry/edgex-go/internal/core/data/controller/http" diff --git a/internal/core/keeper/application/kv.go b/internal/core/keeper/application/kv.go index 691cc56116..60cad44b2b 100644 --- a/internal/core/keeper/application/kv.go +++ b/internal/core/keeper/application/kv.go @@ -12,12 +12,12 @@ import ( "github.com/edgexfoundry/edgex-go/internal/core/keeper/utils" "github.com/edgexfoundry/edgex-go/internal/pkg/correlation" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" - msgTypes "github.com/edgexfoundry/go-mod-messaging/v3/pkg/types" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" + msgTypes "github.com/edgexfoundry/go-mod-messaging/v4/pkg/types" ) func Keys(key string, keysOnly bool, isRaw bool, dic *di.Container) (configs []models.KVResponse, err errors.EdgeX) { diff --git a/internal/core/keeper/application/registry.go b/internal/core/keeper/application/registry.go index 96be1b806f..b13918769e 100644 --- a/internal/core/keeper/application/registry.go +++ b/internal/core/keeper/application/registry.go @@ -6,10 +6,10 @@ package application import ( - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/edgexfoundry/edgex-go/internal/core/keeper/container" ) diff --git a/internal/core/keeper/config/config.go b/internal/core/keeper/config/config.go index 14c8ad8180..79b4caa654 100644 --- a/internal/core/keeper/config/config.go +++ b/internal/core/keeper/config/config.go @@ -6,7 +6,7 @@ package config import ( - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" ) type ConfigurationStruct struct { diff --git a/internal/core/keeper/constants/const.go b/internal/core/keeper/constants/const.go index 8a4115f06a..ceb6a463e8 100644 --- a/internal/core/keeper/constants/const.go +++ b/internal/core/keeper/constants/const.go @@ -8,7 +8,7 @@ package constants import ( "regexp" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" ) // new constants relates to EdgeX Keeper service and will be added to go-mod-core-contracts in the future diff --git a/internal/core/keeper/container/config.go b/internal/core/keeper/container/config.go index c1205c02ab..630feafbd6 100644 --- a/internal/core/keeper/container/config.go +++ b/internal/core/keeper/container/config.go @@ -8,7 +8,7 @@ package container import ( "github.com/edgexfoundry/edgex-go/internal/core/keeper/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) // ConfigurationName contains the name of keeper's config.ConfigurationStruct implementation in the DIC. diff --git a/internal/core/keeper/container/database.go b/internal/core/keeper/container/database.go index 1d61362187..c41e6fae35 100644 --- a/internal/core/keeper/container/database.go +++ b/internal/core/keeper/container/database.go @@ -8,7 +8,7 @@ package container import ( "github.com/edgexfoundry/edgex-go/internal/core/keeper/infrastructure/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) // DBClientInterfaceName contains the name of the interfaces.DBClient implementation in the DIC. diff --git a/internal/core/keeper/container/registry.go b/internal/core/keeper/container/registry.go index cf478a9737..d4d06b1b3b 100644 --- a/internal/core/keeper/container/registry.go +++ b/internal/core/keeper/container/registry.go @@ -7,7 +7,7 @@ package container import ( "github.com/edgexfoundry/edgex-go/internal/core/keeper/infrastructure/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) // RegistryInterfaceName contains the name of the interfaces.Registry implementation in the DIC. diff --git a/internal/core/keeper/controller/http/kv.go b/internal/core/keeper/controller/http/kv.go index 14754e0f07..622637426b 100644 --- a/internal/core/keeper/controller/http/kv.go +++ b/internal/core/keeper/controller/http/kv.go @@ -16,11 +16,11 @@ import ( "github.com/edgexfoundry/edgex-go/internal/pkg" "github.com/edgexfoundry/edgex-go/internal/pkg/utils" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" "github.com/labstack/echo/v4" ) diff --git a/internal/core/keeper/controller/http/kv_test.go b/internal/core/keeper/controller/http/kv_test.go index 73d5d3d90a..968bd037b9 100644 --- a/internal/core/keeper/controller/http/kv_test.go +++ b/internal/core/keeper/controller/http/kv_test.go @@ -18,15 +18,15 @@ import ( "github.com/edgexfoundry/edgex-go/internal/core/keeper/container" "github.com/edgexfoundry/edgex-go/internal/core/keeper/infrastructure/interfaces/mocks" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" - "github.com/edgexfoundry/go-mod-messaging/v3/messaging" - msgTypes "github.com/edgexfoundry/go-mod-messaging/v3/pkg/types" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" + "github.com/edgexfoundry/go-mod-messaging/v4/messaging" + msgTypes "github.com/edgexfoundry/go-mod-messaging/v4/pkg/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/core/keeper/controller/http/registry.go b/internal/core/keeper/controller/http/registry.go index efa718eb61..b0ce4496c6 100644 --- a/internal/core/keeper/controller/http/registry.go +++ b/internal/core/keeper/controller/http/registry.go @@ -6,15 +6,15 @@ package http import ( - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" "net/http" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" "github.com/edgexfoundry/edgex-go/internal/core/keeper/application" "github.com/edgexfoundry/edgex-go/internal/core/keeper/constants" diff --git a/internal/core/keeper/controller/http/registry_test.go b/internal/core/keeper/controller/http/registry_test.go index 20d2fe5154..a63fac5e53 100644 --- a/internal/core/keeper/controller/http/registry_test.go +++ b/internal/core/keeper/controller/http/registry_test.go @@ -17,17 +17,17 @@ import ( "github.com/edgexfoundry/edgex-go/internal/core/keeper/container" "github.com/edgexfoundry/edgex-go/internal/core/keeper/infrastructure/interfaces/mocks" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - v2Models "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + v2Models "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/core/keeper/infrastructure/interfaces/db.go b/internal/core/keeper/infrastructure/interfaces/db.go index 3bd514e5d1..ce96e4c6d8 100644 --- a/internal/core/keeper/infrastructure/interfaces/db.go +++ b/internal/core/keeper/infrastructure/interfaces/db.go @@ -6,8 +6,8 @@ package interfaces import ( - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) type DBClient interface { diff --git a/internal/core/keeper/infrastructure/interfaces/mocks/DBClient.go b/internal/core/keeper/infrastructure/interfaces/mocks/DBClient.go index 4fa0c36edf..f84925737d 100644 --- a/internal/core/keeper/infrastructure/interfaces/mocks/DBClient.go +++ b/internal/core/keeper/infrastructure/interfaces/mocks/DBClient.go @@ -3,11 +3,11 @@ package mocks import ( - errors "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + errors "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" mock "github.com/stretchr/testify/mock" - models "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + models "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) // DBClient is an autogenerated mock type for the DBClient type diff --git a/internal/core/keeper/infrastructure/interfaces/mocks/Registry.go b/internal/core/keeper/infrastructure/interfaces/mocks/Registry.go index a719f2f60d..99b65b5de7 100644 --- a/internal/core/keeper/infrastructure/interfaces/mocks/Registry.go +++ b/internal/core/keeper/infrastructure/interfaces/mocks/Registry.go @@ -3,7 +3,7 @@ package mocks import ( - models "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + models "github.com/edgexfoundry/go-mod-core-contracts/v4/models" mock "github.com/stretchr/testify/mock" ) diff --git a/internal/core/keeper/infrastructure/interfaces/registry.go b/internal/core/keeper/infrastructure/interfaces/registry.go index 432aa929cc..bcca9896d8 100644 --- a/internal/core/keeper/infrastructure/interfaces/registry.go +++ b/internal/core/keeper/infrastructure/interfaces/registry.go @@ -5,7 +5,7 @@ package interfaces -import "github.com/edgexfoundry/go-mod-core-contracts/v3/models" +import "github.com/edgexfoundry/go-mod-core-contracts/v4/models" // Registry defines the functionalities of a registry service type Registry interface { diff --git a/internal/core/keeper/init.go b/internal/core/keeper/init.go index ba6e713e58..7dcc7c2a73 100644 --- a/internal/core/keeper/init.go +++ b/internal/core/keeper/init.go @@ -9,8 +9,8 @@ import ( "context" "sync" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" "github.com/labstack/echo/v4" ) diff --git a/internal/core/keeper/main.go b/internal/core/keeper/main.go index 297a099975..9f6e12b913 100644 --- a/internal/core/keeper/main.go +++ b/internal/core/keeper/main.go @@ -9,14 +9,14 @@ import ( "context" "os" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/flags" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/handlers" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/flags" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/handlers" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/interfaces" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" "github.com/edgexfoundry/edgex-go" "github.com/edgexfoundry/edgex-go/internal/core/keeper/config" diff --git a/internal/core/keeper/registry/bootstrap.go b/internal/core/keeper/registry/bootstrap.go index bb1a9be6d5..00aabc12da 100644 --- a/internal/core/keeper/registry/bootstrap.go +++ b/internal/core/keeper/registry/bootstrap.go @@ -11,11 +11,11 @@ import ( "github.com/edgexfoundry/edgex-go/internal/core/keeper/container" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) func BootstrapHandler(ctx context.Context, wg *sync.WaitGroup, _ startup.Timer, dic *di.Container) bool { diff --git a/internal/core/keeper/registry/registry.go b/internal/core/keeper/registry/registry.go index bb5da52069..5c8e31240a 100644 --- a/internal/core/keeper/registry/registry.go +++ b/internal/core/keeper/registry/registry.go @@ -13,10 +13,10 @@ import ( "sync" "time" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/edgexfoundry/edgex-go/internal/core/keeper/container" ) diff --git a/internal/core/keeper/router.go b/internal/core/keeper/router.go index a35029f9d8..38a9f969db 100644 --- a/internal/core/keeper/router.go +++ b/internal/core/keeper/router.go @@ -7,11 +7,11 @@ package keeper import ( "github.com/edgexfoundry/edgex-go" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/controller" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/handlers" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/controller" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/handlers" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" keeperController "github.com/edgexfoundry/edgex-go/internal/core/keeper/controller/http" diff --git a/internal/core/keeper/utils/http.go b/internal/core/keeper/utils/http.go index b71b7ef269..268287e363 100644 --- a/internal/core/keeper/utils/http.go +++ b/internal/core/keeper/utils/http.go @@ -13,7 +13,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal/core/keeper/constants" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" ) // ParseGetKeyRequestQueryString parses keyOnly and plaintext from the query parameters. diff --git a/internal/core/keeper/utils/key.go b/internal/core/keeper/utils/key.go index 2b6a8ddc23..b631b32d24 100644 --- a/internal/core/keeper/utils/key.go +++ b/internal/core/keeper/utils/key.go @@ -8,7 +8,7 @@ package utils import ( "github.com/edgexfoundry/edgex-go/internal/core/keeper/constants" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" ) // ValidateKeys validates if the key contains invalid characters diff --git a/internal/core/metadata/application/device.go b/internal/core/metadata/application/device.go index 4694de0d68..3b139b3fff 100644 --- a/internal/core/metadata/application/device.go +++ b/internal/core/metadata/application/device.go @@ -23,13 +23,13 @@ import ( "slices" "time" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/edgexfoundry/edgex-go/internal/core/metadata/container" "github.com/edgexfoundry/edgex-go/internal/core/metadata/infrastructure/interfaces" diff --git a/internal/core/metadata/application/device_test.go b/internal/core/metadata/application/device_test.go index 00c65ecca8..fa9f8c73a8 100644 --- a/internal/core/metadata/application/device_test.go +++ b/internal/core/metadata/application/device_test.go @@ -14,11 +14,11 @@ import ( "github.com/edgexfoundry/edgex-go/internal/core/metadata/infrastructure/interfaces/mocks" "github.com/edgexfoundry/edgex-go/internal/pkg/correlation" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/core/metadata/application/devicecommand.go b/internal/core/metadata/application/devicecommand.go index 075fc0b0cf..8fc56f6283 100644 --- a/internal/core/metadata/application/devicecommand.go +++ b/internal/core/metadata/application/devicecommand.go @@ -9,12 +9,12 @@ import ( "context" "github.com/edgexfoundry/edgex-go/internal/core/metadata/container" "github.com/edgexfoundry/edgex-go/internal/pkg/correlation" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) // The AddDeviceProfileDeviceCommand function accepts the device profile name and device command model from the controller functions diff --git a/internal/core/metadata/application/deviceprofile.go b/internal/core/metadata/application/deviceprofile.go index 982d6e231c..b303efac94 100644 --- a/internal/core/metadata/application/deviceprofile.go +++ b/internal/core/metadata/application/deviceprofile.go @@ -14,14 +14,14 @@ import ( "github.com/edgexfoundry/edgex-go/internal/pkg/correlation" "github.com/edgexfoundry/edgex-go/internal/pkg/utils" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) // The AddDeviceProfile function accepts the new device profile model from the controller functions diff --git a/internal/core/metadata/application/deviceresource.go b/internal/core/metadata/application/deviceresource.go index 3dd2241f57..57cf7ca4ef 100644 --- a/internal/core/metadata/application/deviceresource.go +++ b/internal/core/metadata/application/deviceresource.go @@ -12,12 +12,12 @@ import ( "github.com/edgexfoundry/edgex-go/internal/core/metadata/container" "github.com/edgexfoundry/edgex-go/internal/pkg/correlation" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) // DeviceResourceByProfileNameAndResourceName query the device resource by profileName and resourceName diff --git a/internal/core/metadata/application/deviceservice.go b/internal/core/metadata/application/deviceservice.go index 77e3f8046b..3141cb2f29 100644 --- a/internal/core/metadata/application/deviceservice.go +++ b/internal/core/metadata/application/deviceservice.go @@ -13,13 +13,13 @@ import ( "github.com/edgexfoundry/edgex-go/internal/core/metadata/infrastructure/interfaces" "github.com/edgexfoundry/edgex-go/internal/pkg/correlation" "github.com/edgexfoundry/edgex-go/internal/pkg/utils" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) // The AddDeviceService function accepts the new device service model from the controller function diff --git a/internal/core/metadata/application/notify.go b/internal/core/metadata/application/notify.go index 4771156322..7439968d65 100644 --- a/internal/core/metadata/application/notify.go +++ b/internal/core/metadata/application/notify.go @@ -11,13 +11,13 @@ import ( "fmt" "time" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-messaging/v3/pkg/types" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-messaging/v4/pkg/types" "github.com/edgexfoundry/edgex-go/internal/core/metadata/container" ) diff --git a/internal/core/metadata/application/notify_test.go b/internal/core/metadata/application/notify_test.go index e8c21f87f3..f1b98d73fa 100644 --- a/internal/core/metadata/application/notify_test.go +++ b/internal/core/metadata/application/notify_test.go @@ -15,20 +15,20 @@ import ( "github.com/edgexfoundry/edgex-go/internal/core/metadata/config" "github.com/edgexfoundry/edgex-go/internal/core/metadata/container" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - mocks2 "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger/mocks" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-messaging/v3/messaging/mocks" - "github.com/edgexfoundry/go-mod-messaging/v3/pkg/types" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + mocks2 "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger/mocks" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-messaging/v4/messaging/mocks" + "github.com/edgexfoundry/go-mod-messaging/v4/pkg/types" "github.com/google/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) func TestPublishSystemEvent(t *testing.T) { diff --git a/internal/core/metadata/application/provisionwatcher.go b/internal/core/metadata/application/provisionwatcher.go index e8f487cdaf..6a8207d956 100644 --- a/internal/core/metadata/application/provisionwatcher.go +++ b/internal/core/metadata/application/provisionwatcher.go @@ -14,13 +14,13 @@ import ( "github.com/edgexfoundry/edgex-go/internal/pkg/correlation" "github.com/edgexfoundry/edgex-go/internal/pkg/utils" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) // AddProvisionWatcher function accepts the new provision watcher model from the controller function diff --git a/internal/core/metadata/config/config.go b/internal/core/metadata/config/config.go index d9811451c7..4cf7b02d5b 100644 --- a/internal/core/metadata/config/config.go +++ b/internal/core/metadata/config/config.go @@ -16,7 +16,7 @@ package config import ( - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" ) // Struct used to parse the JSON configuration file diff --git a/internal/core/metadata/container/config.go b/internal/core/metadata/container/config.go index 0e7c44718a..c1d9d13755 100644 --- a/internal/core/metadata/container/config.go +++ b/internal/core/metadata/container/config.go @@ -17,7 +17,7 @@ package container import ( "github.com/edgexfoundry/edgex-go/internal/core/metadata/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) // ConfigurationName contains the name of the metadata's config.ConfigurationStruct implementation in the DIC. diff --git a/internal/core/metadata/container/database.go b/internal/core/metadata/container/database.go index e747b02158..3209237ad0 100644 --- a/internal/core/metadata/container/database.go +++ b/internal/core/metadata/container/database.go @@ -8,7 +8,7 @@ package container import ( "github.com/edgexfoundry/edgex-go/internal/core/metadata/infrastructure/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) // DBClientInterfaceName contains the name of the interfaces.DBClient implementation in the DIC. diff --git a/internal/core/metadata/container/uom.go b/internal/core/metadata/container/uom.go index 4d4c9c533a..1143d0b3ff 100644 --- a/internal/core/metadata/container/uom.go +++ b/internal/core/metadata/container/uom.go @@ -6,7 +6,7 @@ package container import ( - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" "github.com/edgexfoundry/edgex-go/internal/core/metadata/infrastructure/interfaces" ) diff --git a/internal/core/metadata/controller/http/device.go b/internal/core/metadata/controller/http/device.go index 68b5a1e590..a412a5ffb8 100644 --- a/internal/core/metadata/controller/http/device.go +++ b/internal/core/metadata/controller/http/device.go @@ -16,13 +16,13 @@ import ( "github.com/edgexfoundry/edgex-go/internal/pkg/correlation" "github.com/edgexfoundry/edgex-go/internal/pkg/utils" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - requestDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + requestDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" "github.com/labstack/echo/v4" ) diff --git a/internal/core/metadata/controller/http/device_test.go b/internal/core/metadata/controller/http/device_test.go index 608b0ad6c8..81dc22ad7a 100644 --- a/internal/core/metadata/controller/http/device_test.go +++ b/internal/core/metadata/controller/http/device_test.go @@ -15,22 +15,22 @@ import ( "sync" "testing" - messagingMocks "github.com/edgexfoundry/go-mod-messaging/v3/messaging/mocks" - "github.com/edgexfoundry/go-mod-messaging/v3/pkg/types" + messagingMocks "github.com/edgexfoundry/go-mod-messaging/v4/messaging/mocks" + "github.com/edgexfoundry/go-mod-messaging/v4/pkg/types" "github.com/stretchr/testify/mock" "github.com/edgexfoundry/edgex-go/internal/core/metadata/container" dbMock "github.com/edgexfoundry/edgex-go/internal/core/metadata/infrastructure/interfaces/mocks" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - edgexErr "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + edgexErr "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/labstack/echo/v4" "github.com/stretchr/testify/assert" diff --git a/internal/core/metadata/controller/http/devicecommand.go b/internal/core/metadata/controller/http/devicecommand.go index 54eebe2bd3..8e5d28ed03 100644 --- a/internal/core/metadata/controller/http/devicecommand.go +++ b/internal/core/metadata/controller/http/devicecommand.go @@ -13,12 +13,12 @@ import ( "github.com/edgexfoundry/edgex-go/internal/pkg" "github.com/edgexfoundry/edgex-go/internal/pkg/correlation" "github.com/edgexfoundry/edgex-go/internal/pkg/utils" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - requestDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + requestDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" "github.com/labstack/echo/v4" ) diff --git a/internal/core/metadata/controller/http/devicecommand_test.go b/internal/core/metadata/controller/http/devicecommand_test.go index e237e3c5dc..6e65a9610a 100644 --- a/internal/core/metadata/controller/http/devicecommand_test.go +++ b/internal/core/metadata/controller/http/devicecommand_test.go @@ -15,13 +15,13 @@ import ( "github.com/edgexfoundry/edgex-go/internal/core/metadata/container" dbMock "github.com/edgexfoundry/edgex-go/internal/core/metadata/infrastructure/interfaces/mocks" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/labstack/echo/v4" "github.com/stretchr/testify/assert" diff --git a/internal/core/metadata/controller/http/deviceprofile.go b/internal/core/metadata/controller/http/deviceprofile.go index a8b32796b0..f02999a5ee 100644 --- a/internal/core/metadata/controller/http/deviceprofile.go +++ b/internal/core/metadata/controller/http/deviceprofile.go @@ -16,15 +16,15 @@ import ( "github.com/edgexfoundry/edgex-go/internal/pkg/correlation" "github.com/edgexfoundry/edgex-go/internal/pkg/utils" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - requestDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + requestDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" "github.com/labstack/echo/v4" ) diff --git a/internal/core/metadata/controller/http/deviceprofile_test.go b/internal/core/metadata/controller/http/deviceprofile_test.go index 9fcea1df69..b5a551dfb6 100644 --- a/internal/core/metadata/controller/http/deviceprofile_test.go +++ b/internal/core/metadata/controller/http/deviceprofile_test.go @@ -18,18 +18,18 @@ import ( "github.com/stretchr/testify/mock" "gopkg.in/yaml.v3" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/edgexfoundry/edgex-go/internal/core/metadata/config" "github.com/edgexfoundry/edgex-go/internal/core/metadata/container" diff --git a/internal/core/metadata/controller/http/deviceresource.go b/internal/core/metadata/controller/http/deviceresource.go index 6933bd3809..00183f4384 100644 --- a/internal/core/metadata/controller/http/deviceresource.go +++ b/internal/core/metadata/controller/http/deviceresource.go @@ -14,13 +14,13 @@ import ( "github.com/edgexfoundry/edgex-go/internal/pkg/correlation" "github.com/edgexfoundry/edgex-go/internal/pkg/utils" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - requestDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + requestDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" "github.com/labstack/echo/v4" ) diff --git a/internal/core/metadata/controller/http/deviceresource_test.go b/internal/core/metadata/controller/http/deviceresource_test.go index 4ab03c0008..358e5b33bd 100644 --- a/internal/core/metadata/controller/http/deviceresource_test.go +++ b/internal/core/metadata/controller/http/deviceresource_test.go @@ -16,14 +16,14 @@ import ( "github.com/edgexfoundry/edgex-go/internal/core/metadata/container" "github.com/edgexfoundry/edgex-go/internal/core/metadata/infrastructure/interfaces/mocks" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/labstack/echo/v4" "github.com/stretchr/testify/assert" diff --git a/internal/core/metadata/controller/http/deviceservice.go b/internal/core/metadata/controller/http/deviceservice.go index f2c6b9f0ab..c70c9b17d3 100644 --- a/internal/core/metadata/controller/http/deviceservice.go +++ b/internal/core/metadata/controller/http/deviceservice.go @@ -16,12 +16,12 @@ import ( "github.com/edgexfoundry/edgex-go/internal/pkg/correlation" "github.com/edgexfoundry/edgex-go/internal/pkg/utils" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - requestDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + requestDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" "github.com/labstack/echo/v4" ) diff --git a/internal/core/metadata/controller/http/deviceservice_test.go b/internal/core/metadata/controller/http/deviceservice_test.go index c545452d16..ca58a8cc4e 100644 --- a/internal/core/metadata/controller/http/deviceservice_test.go +++ b/internal/core/metadata/controller/http/deviceservice_test.go @@ -16,14 +16,14 @@ import ( "github.com/edgexfoundry/edgex-go/internal/core/metadata/container" dbMock "github.com/edgexfoundry/edgex-go/internal/core/metadata/infrastructure/interfaces/mocks" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/labstack/echo/v4" "github.com/stretchr/testify/assert" diff --git a/internal/core/metadata/controller/http/provisionwatcher.go b/internal/core/metadata/controller/http/provisionwatcher.go index 8042e1e350..92454cd815 100644 --- a/internal/core/metadata/controller/http/provisionwatcher.go +++ b/internal/core/metadata/controller/http/provisionwatcher.go @@ -15,12 +15,12 @@ import ( "github.com/edgexfoundry/edgex-go/internal/pkg" "github.com/edgexfoundry/edgex-go/internal/pkg/correlation" "github.com/edgexfoundry/edgex-go/internal/pkg/utils" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - requestDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + requestDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" "github.com/labstack/echo/v4" ) diff --git a/internal/core/metadata/controller/http/provisionwatcher_test.go b/internal/core/metadata/controller/http/provisionwatcher_test.go index c60be50324..6bea2a6217 100644 --- a/internal/core/metadata/controller/http/provisionwatcher_test.go +++ b/internal/core/metadata/controller/http/provisionwatcher_test.go @@ -13,14 +13,14 @@ import ( "strings" "testing" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/labstack/echo/v4" "github.com/stretchr/testify/assert" diff --git a/internal/core/metadata/controller/http/uom.go b/internal/core/metadata/controller/http/uom.go index b6080d1e12..18fec94319 100644 --- a/internal/core/metadata/controller/http/uom.go +++ b/internal/core/metadata/controller/http/uom.go @@ -8,10 +8,10 @@ package http import ( "net/http" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" "github.com/edgexfoundry/edgex-go/internal/core/metadata/container" "github.com/edgexfoundry/edgex-go/internal/pkg" diff --git a/internal/core/metadata/controller/http/uom_test.go b/internal/core/metadata/controller/http/uom_test.go index 331a8e0acc..46ef2bf2b6 100644 --- a/internal/core/metadata/controller/http/uom_test.go +++ b/internal/core/metadata/controller/http/uom_test.go @@ -12,9 +12,9 @@ import ( "net/http/httptest" "testing" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/core/metadata/infrastructure/interfaces/db.go b/internal/core/metadata/infrastructure/interfaces/db.go index e26fe5ed06..c6b54a2071 100644 --- a/internal/core/metadata/infrastructure/interfaces/db.go +++ b/internal/core/metadata/infrastructure/interfaces/db.go @@ -6,8 +6,8 @@ package interfaces import ( - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - model "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + model "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) type DBClient interface { diff --git a/internal/core/metadata/infrastructure/interfaces/mocks/DBClient.go b/internal/core/metadata/infrastructure/interfaces/mocks/DBClient.go index eb0549dc73..fa49d41693 100644 --- a/internal/core/metadata/infrastructure/interfaces/mocks/DBClient.go +++ b/internal/core/metadata/infrastructure/interfaces/mocks/DBClient.go @@ -3,11 +3,11 @@ package mocks import ( - errors "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + errors "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" mock "github.com/stretchr/testify/mock" - models "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + models "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) // DBClient is an autogenerated mock type for the DBClient type diff --git a/internal/core/metadata/init.go b/internal/core/metadata/init.go index 33a3b438a8..50a7259ba4 100644 --- a/internal/core/metadata/init.go +++ b/internal/core/metadata/init.go @@ -20,8 +20,8 @@ import ( "context" "sync" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" "github.com/labstack/echo/v4" ) diff --git a/internal/core/metadata/main.go b/internal/core/metadata/main.go index c4d6f2eccb..68e4e68f1b 100644 --- a/internal/core/metadata/main.go +++ b/internal/core/metadata/main.go @@ -26,15 +26,15 @@ import ( "github.com/edgexfoundry/edgex-go/internal/core/metadata/uom" pkgHandlers "github.com/edgexfoundry/edgex-go/internal/pkg/bootstrap/handlers" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/flags" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/handlers" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/flags" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/handlers" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/interfaces" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" "github.com/labstack/echo/v4" ) diff --git a/internal/core/metadata/router.go b/internal/core/metadata/router.go index 9ce27446e7..7f37be09fa 100644 --- a/internal/core/metadata/router.go +++ b/internal/core/metadata/router.go @@ -8,12 +8,12 @@ package metadata import ( "github.com/edgexfoundry/edgex-go" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/controller" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/handlers" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/controller" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/handlers" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" metadataController "github.com/edgexfoundry/edgex-go/internal/core/metadata/controller/http" diff --git a/internal/core/metadata/uom/bootstrap.go b/internal/core/metadata/uom/bootstrap.go index bc3a9f925c..d5b0fecd19 100644 --- a/internal/core/metadata/uom/bootstrap.go +++ b/internal/core/metadata/uom/bootstrap.go @@ -12,10 +12,10 @@ import ( "gopkg.in/yaml.v3" "github.com/edgexfoundry/edgex-go/internal/core/metadata/container" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/file" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/file" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) func BootstrapHandler(_ context.Context, _ *sync.WaitGroup, _ startup.Timer, dic *di.Container) bool { diff --git a/internal/io/reader.go b/internal/io/reader.go index ffb7179f3d..fee03862ac 100644 --- a/internal/io/reader.go +++ b/internal/io/reader.go @@ -11,8 +11,8 @@ import ( "io" "strings" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" "github.com/fxamacker/cbor/v2" "gopkg.in/yaml.v3" diff --git a/internal/io/reader_test.go b/internal/io/reader_test.go index 77740d118a..bda280e3a0 100644 --- a/internal/io/reader_test.go +++ b/internal/io/reader_test.go @@ -5,9 +5,9 @@ import ( "encoding/json" "testing" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - dto "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + dto "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" "github.com/fxamacker/cbor/v2" "github.com/stretchr/testify/assert" diff --git a/internal/pkg/bootstrap/handlers/database.go b/internal/pkg/bootstrap/handlers/database.go index 20d8ceff61..91119fe29a 100644 --- a/internal/pkg/bootstrap/handlers/database.go +++ b/internal/pkg/bootstrap/handlers/database.go @@ -16,12 +16,12 @@ import ( "github.com/edgexfoundry/edgex-go/internal/pkg/infrastructure/redis" "github.com/edgexfoundry/edgex-go/internal/pkg/interfaces" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/secret" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/secret" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) const ( diff --git a/internal/pkg/bootstrap/interfaces/database.go b/internal/pkg/bootstrap/interfaces/database.go index 8fb64ef7ed..c02f126a34 100644 --- a/internal/pkg/bootstrap/interfaces/database.go +++ b/internal/pkg/bootstrap/interfaces/database.go @@ -14,7 +14,7 @@ package interfaces -import "github.com/edgexfoundry/go-mod-bootstrap/v3/config" +import "github.com/edgexfoundry/go-mod-bootstrap/v4/config" // Database interface provides an abstraction for obtaining the database configuration information. type Database interface { diff --git a/internal/pkg/correlation/handler.go b/internal/pkg/correlation/handler.go index 4772a1f8cb..cb72403717 100644 --- a/internal/pkg/correlation/handler.go +++ b/internal/pkg/correlation/handler.go @@ -5,7 +5,7 @@ import ( "github.com/google/uuid" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" ) func FromContext(ctx context.Context) string { diff --git a/internal/pkg/db/postgres/client.go b/internal/pkg/db/postgres/client.go index 7ebdfb4232..cd0ba11dff 100644 --- a/internal/pkg/db/postgres/client.go +++ b/internal/pkg/db/postgres/client.go @@ -14,8 +14,8 @@ import ( "github.com/jackc/pgx/v5/pgxpool" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" "github.com/edgexfoundry/edgex-go/internal/pkg/db" ) diff --git a/internal/pkg/db/postgres/utils.go b/internal/pkg/db/postgres/utils.go index c2e18bed1b..fbb45e6cec 100644 --- a/internal/pkg/db/postgres/utils.go +++ b/internal/pkg/db/postgres/utils.go @@ -19,7 +19,7 @@ import ( "github.com/jackc/pgx/v5/pgconn" "github.com/jackc/pgx/v5/pgxpool" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" ) var sqlFileNameRegexp = regexp.MustCompile(`([[:digit:]]+)-[[:word:]]+.sql`) diff --git a/internal/pkg/db/redis/client.go b/internal/pkg/db/redis/client.go index 07989b196c..e6d0d3d5d3 100644 --- a/internal/pkg/db/redis/client.go +++ b/internal/pkg/db/redis/client.go @@ -19,7 +19,7 @@ import ( "sync" "time" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" "github.com/gomodule/redigo/redis" diff --git a/internal/pkg/encoding.go b/internal/pkg/encoding.go index 6fed082639..40e6fb5571 100644 --- a/internal/pkg/encoding.go +++ b/internal/pkg/encoding.go @@ -20,8 +20,8 @@ import ( "gopkg.in/yaml.v3" "net/http" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" "github.com/labstack/echo/v4" ) diff --git a/internal/pkg/infrastructure/postgres/client.go b/internal/pkg/infrastructure/postgres/client.go index 2e9b6167ea..d2588b9d2f 100644 --- a/internal/pkg/infrastructure/postgres/client.go +++ b/internal/pkg/infrastructure/postgres/client.go @@ -8,8 +8,8 @@ package postgres import ( "context" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" "github.com/edgexfoundry/edgex-go/internal/pkg/db" postgresClient "github.com/edgexfoundry/edgex-go/internal/pkg/db/postgres" diff --git a/internal/pkg/infrastructure/postgres/device.go b/internal/pkg/infrastructure/postgres/device.go index fdad5580ad..de79597965 100644 --- a/internal/pkg/infrastructure/postgres/device.go +++ b/internal/pkg/infrastructure/postgres/device.go @@ -17,8 +17,8 @@ import ( pkgCommon "github.com/edgexfoundry/edgex-go/internal/pkg/common" pgClient "github.com/edgexfoundry/edgex-go/internal/pkg/db/postgres" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - model "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + model "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) // AddDevice adds a new device diff --git a/internal/pkg/infrastructure/postgres/device_profile.go b/internal/pkg/infrastructure/postgres/device_profile.go index a4f38474cc..d4dc31e1b9 100644 --- a/internal/pkg/infrastructure/postgres/device_profile.go +++ b/internal/pkg/infrastructure/postgres/device_profile.go @@ -17,8 +17,8 @@ import ( pkgCommon "github.com/edgexfoundry/edgex-go/internal/pkg/common" pgClient "github.com/edgexfoundry/edgex-go/internal/pkg/db/postgres" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - model "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + model "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) // AddDeviceProfile adds a new device profile diff --git a/internal/pkg/infrastructure/postgres/device_service.go b/internal/pkg/infrastructure/postgres/device_service.go index 694010bafd..851d02f2ea 100644 --- a/internal/pkg/infrastructure/postgres/device_service.go +++ b/internal/pkg/infrastructure/postgres/device_service.go @@ -17,8 +17,8 @@ import ( pkgCommon "github.com/edgexfoundry/edgex-go/internal/pkg/common" pgClient "github.com/edgexfoundry/edgex-go/internal/pkg/db/postgres" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - model "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + model "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) // AddDeviceService adds a new device service diff --git a/internal/pkg/infrastructure/postgres/event.go b/internal/pkg/infrastructure/postgres/event.go index 1998b380d8..c2f525f4a8 100644 --- a/internal/pkg/infrastructure/postgres/event.go +++ b/internal/pkg/infrastructure/postgres/event.go @@ -14,8 +14,8 @@ import ( pgClient "github.com/edgexfoundry/edgex-go/internal/pkg/db/postgres" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - model "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + model "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/google/uuid" "github.com/jackc/pgx/v5" diff --git a/internal/pkg/infrastructure/postgres/kv.go b/internal/pkg/infrastructure/postgres/kv.go index 815f4b3cd0..4c07d489cc 100644 --- a/internal/pkg/infrastructure/postgres/kv.go +++ b/internal/pkg/infrastructure/postgres/kv.go @@ -15,8 +15,8 @@ import ( pgClient "github.com/edgexfoundry/edgex-go/internal/pkg/db/postgres" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgxpool" diff --git a/internal/pkg/infrastructure/postgres/models/reading.go b/internal/pkg/infrastructure/postgres/models/reading.go index 220cdd54fd..89a675cf9f 100644 --- a/internal/pkg/infrastructure/postgres/models/reading.go +++ b/internal/pkg/infrastructure/postgres/models/reading.go @@ -5,7 +5,7 @@ package models -import "github.com/edgexfoundry/go-mod-core-contracts/v3/models" +import "github.com/edgexfoundry/go-mod-core-contracts/v4/models" // Reading struct contains the columns of the core_data.reading table in Postgres db relates to a reading // which includes all the fields in BaseReading, BinaryReading, SimpleReading and ObjectReading diff --git a/internal/pkg/infrastructure/postgres/notification.go b/internal/pkg/infrastructure/postgres/notification.go index c6986595b7..a643bfe4f7 100644 --- a/internal/pkg/infrastructure/postgres/notification.go +++ b/internal/pkg/infrastructure/postgres/notification.go @@ -15,8 +15,8 @@ import ( "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgxpool" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" pgClient "github.com/edgexfoundry/edgex-go/internal/pkg/db/postgres" ) diff --git a/internal/pkg/infrastructure/postgres/provision_watcher.go b/internal/pkg/infrastructure/postgres/provision_watcher.go index 3dd609f90d..00e1226aa7 100644 --- a/internal/pkg/infrastructure/postgres/provision_watcher.go +++ b/internal/pkg/infrastructure/postgres/provision_watcher.go @@ -17,8 +17,8 @@ import ( pkgCommon "github.com/edgexfoundry/edgex-go/internal/pkg/common" pgClient "github.com/edgexfoundry/edgex-go/internal/pkg/db/postgres" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - model "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + model "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) // AddProvisionWatcher adds a new provision watcher diff --git a/internal/pkg/infrastructure/postgres/reading.go b/internal/pkg/infrastructure/postgres/reading.go index b9aa84ace1..33d4e4771a 100644 --- a/internal/pkg/infrastructure/postgres/reading.go +++ b/internal/pkg/infrastructure/postgres/reading.go @@ -13,8 +13,8 @@ import ( pgClient "github.com/edgexfoundry/edgex-go/internal/pkg/db/postgres" dbModels "github.com/edgexfoundry/edgex-go/internal/pkg/infrastructure/postgres/models" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - model "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + model "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/google/uuid" "github.com/jackc/pgx/v5" diff --git a/internal/pkg/infrastructure/postgres/registry.go b/internal/pkg/infrastructure/postgres/registry.go index be94ecaee9..408ae81ae7 100644 --- a/internal/pkg/infrastructure/postgres/registry.go +++ b/internal/pkg/infrastructure/postgres/registry.go @@ -14,8 +14,8 @@ import ( pgClient "github.com/edgexfoundry/edgex-go/internal/pkg/db/postgres" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgxpool" diff --git a/internal/pkg/infrastructure/postgres/scheduleactionrecord.go b/internal/pkg/infrastructure/postgres/scheduleactionrecord.go index e27fd17ccd..26e5393697 100644 --- a/internal/pkg/infrastructure/postgres/scheduleactionrecord.go +++ b/internal/pkg/infrastructure/postgres/scheduleactionrecord.go @@ -14,8 +14,8 @@ import ( "github.com/google/uuid" "github.com/jackc/pgx/v5/pgxpool" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - model "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + model "github.com/edgexfoundry/go-mod-core-contracts/v4/models" pgClient "github.com/edgexfoundry/edgex-go/internal/pkg/db/postgres" ) diff --git a/internal/pkg/infrastructure/postgres/schedulejob.go b/internal/pkg/infrastructure/postgres/schedulejob.go index 359b05634f..72d1fe6868 100644 --- a/internal/pkg/infrastructure/postgres/schedulejob.go +++ b/internal/pkg/infrastructure/postgres/schedulejob.go @@ -15,8 +15,8 @@ import ( "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgxpool" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" pgClient "github.com/edgexfoundry/edgex-go/internal/pkg/db/postgres" ) diff --git a/internal/pkg/infrastructure/postgres/subscription.go b/internal/pkg/infrastructure/postgres/subscription.go index d1adb34d8d..93849935b1 100644 --- a/internal/pkg/infrastructure/postgres/subscription.go +++ b/internal/pkg/infrastructure/postgres/subscription.go @@ -15,8 +15,8 @@ import ( "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgxpool" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" pgClient "github.com/edgexfoundry/edgex-go/internal/pkg/db/postgres" ) diff --git a/internal/pkg/infrastructure/postgres/transmission.go b/internal/pkg/infrastructure/postgres/transmission.go index dc6c52364e..d492c2ba8c 100644 --- a/internal/pkg/infrastructure/postgres/transmission.go +++ b/internal/pkg/infrastructure/postgres/transmission.go @@ -15,8 +15,8 @@ import ( "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgxpool" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" pgClient "github.com/edgexfoundry/edgex-go/internal/pkg/db/postgres" ) diff --git a/internal/pkg/infrastructure/postgres/utils.go b/internal/pkg/infrastructure/postgres/utils.go index 89a49b2f6f..c7002c3609 100644 --- a/internal/pkg/infrastructure/postgres/utils.go +++ b/internal/pkg/infrastructure/postgres/utils.go @@ -11,7 +11,7 @@ import ( "github.com/jackc/pgx/v5/pgxpool" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" pgClient "github.com/edgexfoundry/edgex-go/internal/pkg/db/postgres" ) diff --git a/internal/pkg/infrastructure/redis/client.go b/internal/pkg/infrastructure/redis/client.go index 7859c6ee99..b54ac0c232 100644 --- a/internal/pkg/infrastructure/redis/client.go +++ b/internal/pkg/infrastructure/redis/client.go @@ -8,9 +8,9 @@ package redis import ( "fmt" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - model "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + model "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/edgexfoundry/edgex-go/internal/pkg/db" redisClient "github.com/edgexfoundry/edgex-go/internal/pkg/db/redis" diff --git a/internal/pkg/infrastructure/redis/device.go b/internal/pkg/infrastructure/redis/device.go index d2bcbd5117..2d13cb0fcf 100644 --- a/internal/pkg/infrastructure/redis/device.go +++ b/internal/pkg/infrastructure/redis/device.go @@ -11,9 +11,9 @@ import ( pkgCommon "github.com/edgexfoundry/edgex-go/internal/pkg/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/gomodule/redigo/redis" ) diff --git a/internal/pkg/infrastructure/redis/device_profile.go b/internal/pkg/infrastructure/redis/device_profile.go index 9b01557e01..299f458ec8 100644 --- a/internal/pkg/infrastructure/redis/device_profile.go +++ b/internal/pkg/infrastructure/redis/device_profile.go @@ -11,9 +11,9 @@ import ( pkgCommon "github.com/edgexfoundry/edgex-go/internal/pkg/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/gomodule/redigo/redis" ) diff --git a/internal/pkg/infrastructure/redis/device_service.go b/internal/pkg/infrastructure/redis/device_service.go index ec8738b84a..51310771da 100644 --- a/internal/pkg/infrastructure/redis/device_service.go +++ b/internal/pkg/infrastructure/redis/device_service.go @@ -11,9 +11,9 @@ import ( pkgCommon "github.com/edgexfoundry/edgex-go/internal/pkg/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/gomodule/redigo/redis" ) diff --git a/internal/pkg/infrastructure/redis/event.go b/internal/pkg/infrastructure/redis/event.go index a8d5e2bf7a..3b2043c111 100644 --- a/internal/pkg/infrastructure/redis/event.go +++ b/internal/pkg/infrastructure/redis/event.go @@ -12,9 +12,9 @@ import ( "time" pkgCommon "github.com/edgexfoundry/edgex-go/internal/pkg/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/gomodule/redigo/redis" ) diff --git a/internal/pkg/infrastructure/redis/interval.go b/internal/pkg/infrastructure/redis/interval.go index 65c05724ff..abfe6b3fd3 100644 --- a/internal/pkg/infrastructure/redis/interval.go +++ b/internal/pkg/infrastructure/redis/interval.go @@ -11,9 +11,9 @@ import ( pkgCommon "github.com/edgexfoundry/edgex-go/internal/pkg/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/gomodule/redigo/redis" ) diff --git a/internal/pkg/infrastructure/redis/intervalaction.go b/internal/pkg/infrastructure/redis/intervalaction.go index 713b139bf7..1f294f3969 100644 --- a/internal/pkg/infrastructure/redis/intervalaction.go +++ b/internal/pkg/infrastructure/redis/intervalaction.go @@ -10,9 +10,9 @@ import ( "fmt" pkgCommon "github.com/edgexfoundry/edgex-go/internal/pkg/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/gomodule/redigo/redis" ) diff --git a/internal/pkg/infrastructure/redis/kv.go b/internal/pkg/infrastructure/redis/kv.go index 9e2eff4ba1..4155df17c1 100644 --- a/internal/pkg/infrastructure/redis/kv.go +++ b/internal/pkg/infrastructure/redis/kv.go @@ -13,8 +13,8 @@ import ( "github.com/edgexfoundry/edgex-go/internal/core/keeper/constants" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/gomodule/redigo/redis" "github.com/spf13/cast" diff --git a/internal/pkg/infrastructure/redis/notification.go b/internal/pkg/infrastructure/redis/notification.go index 659bbe666a..7247a29eda 100644 --- a/internal/pkg/infrastructure/redis/notification.go +++ b/internal/pkg/infrastructure/redis/notification.go @@ -11,9 +11,9 @@ import ( pkgCommon "github.com/edgexfoundry/edgex-go/internal/pkg/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/gomodule/redigo/redis" ) diff --git a/internal/pkg/infrastructure/redis/provisionwatcher.go b/internal/pkg/infrastructure/redis/provisionwatcher.go index 2bd2957ffa..803b16b2a2 100644 --- a/internal/pkg/infrastructure/redis/provisionwatcher.go +++ b/internal/pkg/infrastructure/redis/provisionwatcher.go @@ -10,9 +10,9 @@ import ( "fmt" pkgCommon "github.com/edgexfoundry/edgex-go/internal/pkg/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/gomodule/redigo/redis" ) diff --git a/internal/pkg/infrastructure/redis/queries.go b/internal/pkg/infrastructure/redis/queries.go index 3527358690..668c532476 100644 --- a/internal/pkg/infrastructure/redis/queries.go +++ b/internal/pkg/infrastructure/redis/queries.go @@ -13,9 +13,9 @@ import ( "strings" pkgCommon "github.com/edgexfoundry/edgex-go/internal/pkg/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/gomodule/redigo/redis" "github.com/google/uuid" diff --git a/internal/pkg/infrastructure/redis/reading.go b/internal/pkg/infrastructure/redis/reading.go index 0395a778c0..763e1e2c83 100644 --- a/internal/pkg/infrastructure/redis/reading.go +++ b/internal/pkg/infrastructure/redis/reading.go @@ -9,9 +9,9 @@ import ( "encoding/json" "fmt" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" pkgCommon "github.com/edgexfoundry/edgex-go/internal/pkg/common" diff --git a/internal/pkg/infrastructure/redis/reading_test.go b/internal/pkg/infrastructure/redis/reading_test.go index 45ca34e199..5f1d9aa0cb 100644 --- a/internal/pkg/infrastructure/redis/reading_test.go +++ b/internal/pkg/infrastructure/redis/reading_test.go @@ -9,8 +9,8 @@ import ( "encoding/json" "testing" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/internal/pkg/infrastructure/redis/registry.go b/internal/pkg/infrastructure/redis/registry.go index c3579ac226..3872f197bb 100644 --- a/internal/pkg/infrastructure/redis/registry.go +++ b/internal/pkg/infrastructure/redis/registry.go @@ -9,9 +9,9 @@ import ( "encoding/json" "fmt" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/gomodule/redigo/redis" pkgCommon "github.com/edgexfoundry/edgex-go/internal/pkg/common" diff --git a/internal/pkg/infrastructure/redis/subscription.go b/internal/pkg/infrastructure/redis/subscription.go index f80dbdb392..2e716c0069 100644 --- a/internal/pkg/infrastructure/redis/subscription.go +++ b/internal/pkg/infrastructure/redis/subscription.go @@ -11,9 +11,9 @@ import ( pkgCommon "github.com/edgexfoundry/edgex-go/internal/pkg/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/gomodule/redigo/redis" ) diff --git a/internal/pkg/infrastructure/redis/transmission.go b/internal/pkg/infrastructure/redis/transmission.go index 7a67d381a5..cd6ff87569 100644 --- a/internal/pkg/infrastructure/redis/transmission.go +++ b/internal/pkg/infrastructure/redis/transmission.go @@ -11,9 +11,9 @@ import ( pkgCommon "github.com/edgexfoundry/edgex-go/internal/pkg/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/gomodule/redigo/redis" ) diff --git a/internal/pkg/utils/count.go b/internal/pkg/utils/count.go index f3b8d0cb60..c2173dd54c 100644 --- a/internal/pkg/utils/count.go +++ b/internal/pkg/utils/count.go @@ -8,7 +8,7 @@ package utils import ( "fmt" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" ) // CheckCountRange evaluates if the offset and limit parameters are within the valid range. diff --git a/internal/pkg/utils/http.go b/internal/pkg/utils/http.go index 54b0d8fb9c..40624d692b 100644 --- a/internal/pkg/utils/http.go +++ b/internal/pkg/utils/http.go @@ -19,10 +19,10 @@ import ( "github.com/edgexfoundry/edgex-go/internal/pkg" "github.com/edgexfoundry/edgex-go/internal/pkg/correlation" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" "github.com/labstack/echo/v4" ) diff --git a/internal/pkg/utils/http_test.go b/internal/pkg/utils/http_test.go index 8ba98755a4..95f3ca5f2c 100644 --- a/internal/pkg/utils/http_test.go +++ b/internal/pkg/utils/http_test.go @@ -12,8 +12,8 @@ import ( "strconv" "testing" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" "github.com/labstack/echo/v4" "github.com/stretchr/testify/assert" diff --git a/internal/pkg/utils/payload.go b/internal/pkg/utils/payload.go index 47c4039573..74243c22dc 100644 --- a/internal/pkg/utils/payload.go +++ b/internal/pkg/utils/payload.go @@ -8,7 +8,7 @@ package utils import ( "fmt" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" ) func CheckPayloadSize(payload []byte, sizeLimit int64) errors.EdgeX { diff --git a/internal/pkg/utils/payload_test.go b/internal/pkg/utils/payload_test.go index 96cfa97c6b..f36232e1a0 100644 --- a/internal/pkg/utils/payload_test.go +++ b/internal/pkg/utils/payload_test.go @@ -3,7 +3,7 @@ package utils import ( "testing" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/internal/pkg/utils/restaddress.go b/internal/pkg/utils/restaddress.go index 3ee206f3c5..1764fbac8f 100644 --- a/internal/pkg/utils/restaddress.go +++ b/internal/pkg/utils/restaddress.go @@ -13,11 +13,11 @@ import ( "strconv" "strings" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/interfaces" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/interfaces" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) var methods = map[string]struct{}{ diff --git a/internal/pkg/utils/struct_test.go b/internal/pkg/utils/struct_test.go index d8aeb982fb..49d7701787 100644 --- a/internal/pkg/utils/struct_test.go +++ b/internal/pkg/utils/struct_test.go @@ -8,8 +8,8 @@ package utils import ( "testing" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/stretchr/testify/assert" ) diff --git a/internal/pkg/utils/time.go b/internal/pkg/utils/time.go index e6de5813db..fa5e4590e3 100644 --- a/internal/pkg/utils/time.go +++ b/internal/pkg/utils/time.go @@ -8,7 +8,7 @@ package utils import ( "time" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) // CheckMinInterval parses the ISO 8601 time duration string to Duration type diff --git a/internal/pkg/utils/time_test.go b/internal/pkg/utils/time_test.go index d3458052e2..d6e8b30954 100644 --- a/internal/pkg/utils/time_test.go +++ b/internal/pkg/utils/time_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger/mocks" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger/mocks" ) func TestCheckMinInterval(t *testing.T) { diff --git a/internal/security/bootstrapper/command/cmd_dispatcher.go b/internal/security/bootstrapper/command/cmd_dispatcher.go index 1c248516f2..5a037aeab0 100644 --- a/internal/security/bootstrapper/command/cmd_dispatcher.go +++ b/internal/security/bootstrapper/command/cmd_dispatcher.go @@ -29,7 +29,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/config" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/interfaces" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) // NewCommand instantiates a command implementing interfaces.Command based on the input command argument diff --git a/internal/security/bootstrapper/command/cmd_dispatcher_test.go b/internal/security/bootstrapper/command/cmd_dispatcher_test.go index cf8529d092..4ff9fac94e 100644 --- a/internal/security/bootstrapper/command/cmd_dispatcher_test.go +++ b/internal/security/bootstrapper/command/cmd_dispatcher_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) func TestNewCommand(t *testing.T) { diff --git a/internal/security/bootstrapper/command/flags_common.go b/internal/security/bootstrapper/command/flags_common.go index 3fb37c9e03..f2799c054a 100644 --- a/internal/security/bootstrapper/command/flags_common.go +++ b/internal/security/bootstrapper/command/flags_common.go @@ -22,7 +22,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/flags" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/flags" ) // commonFlags is a custom implementation of flags.Common from go-mod-bootstrap diff --git a/internal/security/bootstrapper/command/gate/command.go b/internal/security/bootstrapper/command/gate/command.go index 38a77c7204..a0ee874c9f 100644 --- a/internal/security/bootstrapper/command/gate/command.go +++ b/internal/security/bootstrapper/command/gate/command.go @@ -27,7 +27,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/interfaces" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/tcp" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) const ( diff --git a/internal/security/bootstrapper/command/gate/command_test.go b/internal/security/bootstrapper/command/gate/command_test.go index 6a0c869995..9d5c61f783 100644 --- a/internal/security/bootstrapper/command/gate/command_test.go +++ b/internal/security/bootstrapper/command/gate/command_test.go @@ -27,7 +27,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/interfaces" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/tcp" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) func TestNewCommand(t *testing.T) { diff --git a/internal/security/bootstrapper/command/genpassword/command.go b/internal/security/bootstrapper/command/genpassword/command.go index 4e593eff3c..87849e7e66 100644 --- a/internal/security/bootstrapper/command/genpassword/command.go +++ b/internal/security/bootstrapper/command/genpassword/command.go @@ -28,7 +28,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/config" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/interfaces" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) const ( diff --git a/internal/security/bootstrapper/command/genpassword/command_test.go b/internal/security/bootstrapper/command/genpassword/command_test.go index 612033447f..13b3c4ff60 100644 --- a/internal/security/bootstrapper/command/genpassword/command_test.go +++ b/internal/security/bootstrapper/command/genpassword/command_test.go @@ -25,7 +25,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/config" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/interfaces" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) func TestNewCommand(t *testing.T) { diff --git a/internal/security/bootstrapper/command/gethttpstatus/command.go b/internal/security/bootstrapper/command/gethttpstatus/command.go index 55e9523224..fdf126681d 100644 --- a/internal/security/bootstrapper/command/gethttpstatus/command.go +++ b/internal/security/bootstrapper/command/gethttpstatus/command.go @@ -28,9 +28,9 @@ import ( "github.com/edgexfoundry/edgex-go/internal" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/config" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/interfaces" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) const ( diff --git a/internal/security/bootstrapper/command/gethttpstatus/command_test.go b/internal/security/bootstrapper/command/gethttpstatus/command_test.go index ec8750925e..cb46b17f92 100644 --- a/internal/security/bootstrapper/command/gethttpstatus/command_test.go +++ b/internal/security/bootstrapper/command/gethttpstatus/command_test.go @@ -27,7 +27,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/config" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/interfaces" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) func TestNewCommand(t *testing.T) { diff --git a/internal/security/bootstrapper/command/help/command.go b/internal/security/bootstrapper/command/help/command.go index 36b6878a7a..cf39ec1c39 100644 --- a/internal/security/bootstrapper/command/help/command.go +++ b/internal/security/bootstrapper/command/help/command.go @@ -24,7 +24,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/config" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/interfaces" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) const ( diff --git a/internal/security/bootstrapper/command/help/command_test.go b/internal/security/bootstrapper/command/help/command_test.go index 3e8eb43695..fdd233d1ad 100644 --- a/internal/security/bootstrapper/command/help/command_test.go +++ b/internal/security/bootstrapper/command/help/command_test.go @@ -23,7 +23,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/config" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/interfaces" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) // TestHelp tests functionality of help command diff --git a/internal/security/bootstrapper/command/listen/command.go b/internal/security/bootstrapper/command/listen/command.go index 4186033eea..7e06bd31f3 100644 --- a/internal/security/bootstrapper/command/listen/command.go +++ b/internal/security/bootstrapper/command/listen/command.go @@ -27,7 +27,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/interfaces" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/tcp" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) const ( diff --git a/internal/security/bootstrapper/command/listen/command_test.go b/internal/security/bootstrapper/command/listen/command_test.go index bfa9908fbc..6f95ad95fa 100644 --- a/internal/security/bootstrapper/command/listen/command_test.go +++ b/internal/security/bootstrapper/command/listen/command_test.go @@ -28,7 +28,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/interfaces" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/tcp" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) func TestNewCommand(t *testing.T) { diff --git a/internal/security/bootstrapper/command/setupacl/aclbootstrap.go b/internal/security/bootstrapper/command/setupacl/aclbootstrap.go index f09d984d16..4f1cc5e52b 100644 --- a/internal/security/bootstrapper/command/setupacl/aclbootstrap.go +++ b/internal/security/bootstrapper/command/setupacl/aclbootstrap.go @@ -24,8 +24,8 @@ import ( "os" "path/filepath" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/fileioperformer" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/types" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/fileioperformer" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/types" ) // generateBootStrapACLToken should only be called once per Consul agent diff --git a/internal/security/bootstrapper/command/setupacl/aclpolicies.go b/internal/security/bootstrapper/command/setupacl/aclpolicies.go index 193442a7a0..c76edac4ee 100644 --- a/internal/security/bootstrapper/command/setupacl/aclpolicies.go +++ b/internal/security/bootstrapper/command/setupacl/aclpolicies.go @@ -24,8 +24,8 @@ import ( "strings" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/command/setupacl/share" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/types" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/types" ) const ( diff --git a/internal/security/bootstrapper/command/setupacl/aclpolicies_test.go b/internal/security/bootstrapper/command/setupacl/aclpolicies_test.go index f06222d692..b858206f30 100644 --- a/internal/security/bootstrapper/command/setupacl/aclpolicies_test.go +++ b/internal/security/bootstrapper/command/setupacl/aclpolicies_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) func TestGetOrCreatePolicy(t *testing.T) { diff --git a/internal/security/bootstrapper/command/setupacl/acltokens.go b/internal/security/bootstrapper/command/setupacl/acltokens.go index 50263918c1..7651268eff 100644 --- a/internal/security/bootstrapper/command/setupacl/acltokens.go +++ b/internal/security/bootstrapper/command/setupacl/acltokens.go @@ -29,10 +29,10 @@ import ( "strings" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/command/setupacl/share" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/fileioperformer" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/types" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/fileioperformer" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/types" ) // AgentTokenType is the type of token to be set on the Consul agent diff --git a/internal/security/bootstrapper/command/setupacl/acltokens_test.go b/internal/security/bootstrapper/command/setupacl/acltokens_test.go index 8b5377fc6a..ed0dccb43d 100644 --- a/internal/security/bootstrapper/command/setupacl/acltokens_test.go +++ b/internal/security/bootstrapper/command/setupacl/acltokens_test.go @@ -23,8 +23,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/types" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/types" ) func TestIsACLTokenPersistent(t *testing.T) { diff --git a/internal/security/bootstrapper/command/setupacl/command.go b/internal/security/bootstrapper/command/setupacl/command.go index 594dafb8c1..4ee2847046 100644 --- a/internal/security/bootstrapper/command/setupacl/command.go +++ b/internal/security/bootstrapper/command/setupacl/command.go @@ -32,34 +32,30 @@ import ( "time" "github.com/edgexfoundry/edgex-go/internal" - "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/command/setupacl/share" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/config" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/helper" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/environment" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/secret" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/authtokenloader" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/fileioperformer" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/types" - "github.com/edgexfoundry/go-mod-secrets/v3/secrets" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/environment" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/secret" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/fileioperformer" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/types" ) const ( // the command name for setting up registry's ACL CommandName string = "setupRegistryACL" - consulGetLeaderAPI = "/v1/status/leader" - consulACLBootstrapAPI = "/v1/acl/bootstrap" - consulConfigAccessVaultAPI = "/v1/consul/config/access" - consulLegacyACLModeError = "The ACL system is currently in legacy mode" - defaultRetryTimeout = 30 * time.Second - emptyLeader = `""` + consulGetLeaderAPI = "/v1/status/leader" + consulACLBootstrapAPI = "/v1/acl/bootstrap" + consulLegacyACLModeError = "The ACL system is currently in legacy mode" + defaultRetryTimeout = 30 * time.Second + emptyLeader = `""` // environment variable contains a comma separated list of registry role names to be added addRegistryRolesEnvKey = "EDGEX_ADD_REGISTRY_ACL_ROLES" @@ -74,7 +70,6 @@ type cmd struct { // internal state retryTimeout time.Duration bootstrapACLTokenCache *types.BootStrapACLTokenInfo - secretstoreTokenCache string } // NewCommand creates a new cmd and parses through options if any @@ -144,28 +139,6 @@ func (c *cmd) Execute() (statusCode int, err error) { return interfaces.StatusCodeExitWithError, fmt.Errorf("failed to create bootstrap ACL token: %v", err) } - // retrieve the secretstore (Vault) token from the file produced by secretstore-setup - secretstoreToken, err := c.retrieveSecretStoreTokenFromFile() - if err != nil { - return interfaces.StatusCodeExitWithError, fmt.Errorf("failed to retrieve secretstore token: %v", err) - } - - client, err := c.createSecretStoreClient(c.configuration) - if err != nil { - return interfaces.StatusCodeExitWithError, fmt.Errorf("failed to create SecretStoreClient: %s", err.Error()) - } - //configure Consul access with both Secret Store token and consul's bootstrap acl token - if err := client.ConfigureConsulAccess(secretstoreToken, bootstrapACLToken.SecretID, - c.configuration.StageGate.Registry.Host, c.configuration.StageGate.Registry.Port); err != nil { - return interfaces.StatusCodeExitWithError, fmt.Errorf("failed to configure Consul access: %v", err) - } - - c.loggingClient.Info("successfully get secretstore token and configuring the registry access for secretestore") - - if err := c.createEdgeXACLTokenRoles(bootstrapACLToken.SecretID, secretstoreToken); err != nil { - return interfaces.StatusCodeExitWithError, fmt.Errorf("failed to createEdgeXACLTokenRoles: %v", err) - } - // set up agent token to agent for the first time if err := c.setupAgentToken(bootstrapACLToken); err != nil { return interfaces.StatusCodeExitWithError, fmt.Errorf("failed to set up agent token: %v", err) @@ -200,11 +173,11 @@ func (c *cmd) reSetup() error { return fmt.Errorf("on 2nd time or later, failed to re-set up agent token: %v", err) } - // set up roles for both static and dynamic again in case there're changes - err := c.reSetupEdgeXACLTokenRoles() - if err != nil { - return fmt.Errorf("on 2nd time or later, failed to re-set up roles: %v", err) - } + //set up roles for both static and dynamic again in case there're changes + //err := c.reSetupEdgeXACLTokenRoles() + //if err != nil { + // return fmt.Errorf("on 2nd time or later, failed to re-set up roles: %v", err) + //} bootstrapACLToken, err := c.reconstructBootstrapACLToken() if err != nil { @@ -233,26 +206,6 @@ func (c *cmd) reSetup() error { return nil } -func (c *cmd) reSetupEdgeXACLTokenRoles() error { - bootstrapACLToken, err := c.reconstructBootstrapACLToken() - if err != nil { - return fmt.Errorf("failed to reconstruct bootstrap ACL token: %v", err) - } else if len(bootstrapACLToken.SecretID) == 0 { - return errors.New("bootstrapACLToken.SecretID is empty") - } - - secretstoreToken, err := c.getSecretStoreToken() - if err != nil { - return fmt.Errorf("failed to retrieve secretstore token: %v", err) - } - - if err := c.createEdgeXACLTokenRoles(bootstrapACLToken.SecretID, secretstoreToken); err != nil { - return fmt.Errorf("failed to create EdgeX roles: %v", err) - } - - return nil -} - func (c *cmd) createBootstrapACLToken() (*types.BootStrapACLTokenInfo, error) { bootstrapACLToken, err := c.generateBootStrapACLToken() if err != nil { @@ -306,82 +259,6 @@ func (c *cmd) createAndSaveManagementACLToken(bootstrapACLToken *types.BootStrap return nil } -// createEdgeXACLTokenRoles creates secret store roles that can be used for generating registry tokens -// via Consul secret engine API /consul/creds/[role_name] later on for all EdgeX microservices -func (c *cmd) createEdgeXACLTokenRoles(bootstrapACLTokenID, secretstoreToken string) error { - roleNames, err := c.getUniqueRoleNames() - if err != nil { - return fmt.Errorf("failed to get unique role names: %v", err) - } - - client, err := c.createSecretStoreClient(c.configuration) - if err != nil { - return fmt.Errorf("failed to create SecretStoreClient: %s", err.Error()) - } - // create registry roles for EdgeX - for roleName := range roleNames { - // create policy for each service role - servicePolicyRules := ` - # HCL definition of server agent policy for EdgeX - node "" { - policy = "read" - } - node_prefix "edgex" { - policy = "write" - } - service "` + roleName + `" { - policy = "write" - } - service_prefix "" { - policy = "read" - } - key_prefix "` + c.getKeyPrefix(roleName) + `" { - policy = "write" - } - key_prefix "` + c.getKeyPrefix(common.CoreCommonConfigServiceKey) + `" { - policy = "read" - } - ` - - edgexServicePolicy, err := c.getOrCreateRegistryPolicy(bootstrapACLTokenID, "acl_policy_for_"+roleName, servicePolicyRules) - if err != nil { - return fmt.Errorf("failed to create edgex service policy: %v", err) - } - - // create roles based on the service keys as the role names - edgexACLTokenRole := types.NewConsulRole(roleName, types.ClientType, []types.Policy{ - *edgexServicePolicy, - // localUse set to false as some EdgeX services may be running in a different node - }, false) - - if err := client.CreateRole(secretstoreToken, edgexACLTokenRole); err != nil { - return fmt.Errorf("failed to create edgex role: %v", err) - } - } - - return nil -} - -// getKeyPrefix get the consul ACL key prefix for the service with the input roleName, ie. the service key-based -// Currently we support 3 types of services: app services, device services, and security services -// if the input role name does not fall into the above types, then it is categorized into core type for the key prefix -func (c *cmd) getKeyPrefix(roleName string) string { - if strings.HasPrefix(roleName, "app-") { - return common.ConfigStemApp + "/" + roleName - } - - if strings.HasPrefix(roleName, "device-") { - return common.ConfigStemDevice + "/" + roleName - } - - if strings.HasPrefix(roleName, "security-") { - return common.ConfigStemSecurity + "/" + roleName - } - - // anything else falls into the 3rd category: core bucket - return common.ConfigStemCore + "/" + roleName -} - func (c *cmd) getUniqueRoleNames() (map[string]struct{}, error) { roleNamesFromConfig := c.configuration.StageGate.Registry.ACL.GetACLRoleNames() if len(roleNamesFromConfig) == 0 { @@ -626,48 +503,6 @@ func (c *cmd) getNonEmptyConsulLeader() error { } } -func (c *cmd) getSecretStoreToken() (string, error) { - if len(c.secretstoreTokenCache) > 0 { - return c.secretstoreTokenCache, nil - } - - if secretStoreToken, err := c.retrieveSecretStoreTokenFromFile(); err == nil { - c.secretstoreTokenCache = secretStoreToken - return secretStoreToken, nil - } else { - return share.EmptyToken, err - } -} - -func (c *cmd) retrieveSecretStoreTokenFromFile() (string, error) { - trimmedFilePath := strings.TrimSpace(c.configuration.StageGate.Registry.ACL.SecretsAdminTokenPath) - if len(trimmedFilePath) == 0 { - return share.EmptyToken, errors.New("required StageGate_Registry_ACL_SecretsAdminTokenPath from configuration is empty") - } - - tokenFileAbsPath, err := filepath.Abs(trimmedFilePath) - if err != nil { - return share.EmptyToken, fmt.Errorf("failed to convert tokenFile to absolute path %s: %v", trimmedFilePath, err) - } - - // since the secretstore token is created by another service, secretstore-setup, - // so here we want to make sure we have the file - if exists := helper.CheckIfFileExists(tokenFileAbsPath); !exists { - return share.EmptyToken, fmt.Errorf("secretstore token file %s not found", tokenFileAbsPath) - } - - fileOpener := fileioperformer.NewDefaultFileIoPerformer() - tokenLoader := authtokenloader.NewAuthTokenLoader(fileOpener) - secretStoreToken, err := tokenLoader.Load(tokenFileAbsPath) - if err != nil { - return share.EmptyToken, fmt.Errorf("tokenLoader failed to load secretstore token: %v", err) - } - - c.loggingClient.Infof("successfully retrieved secretstore management token from %s", trimmedFilePath) - - return secretStoreToken, nil -} - func (c *cmd) writeSentinelFile() error { absPath, err := filepath.Abs(c.configuration.StageGate.Registry.ACL.SentinelFilePath) if err != nil { @@ -692,19 +527,3 @@ func (c *cmd) writeSentinelFile() error { return nil } - -func (c *cmd) createSecretStoreClient(secretConfig *config.ConfigurationStruct) (secrets.SecretStoreClient, error) { - clientConfig := types.SecretConfig{ - Type: secrets.Vault, - Host: c.secretStoreinfo.Host, - Port: c.secretStoreinfo.Port, - Protocol: c.secretStoreinfo.Protocol, - } - - client, err := secrets.NewSecretStoreClient(clientConfig, c.loggingClient, c.client) - if err != nil { - return nil, fmt.Errorf("failed to create SecretStoreClient: %s", err.Error()) - } - - return client, nil -} diff --git a/internal/security/bootstrapper/command/setupacl/command_test.go b/internal/security/bootstrapper/command/setupacl/command_test.go index 67f03e5607..c5491111b7 100644 --- a/internal/security/bootstrapper/command/setupacl/command_test.go +++ b/internal/security/bootstrapper/command/setupacl/command_test.go @@ -35,7 +35,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/helper" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/interfaces" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) func TestNewCommand(t *testing.T) { @@ -109,10 +109,6 @@ func TestExecute(t *testing.T) { }, }}, httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})) }, false, false, true}, - {"Bad:setupRegistryACL with timed out on waiting for secret token file", "", - prepareTestRegistryServer, true, false, true}, - {"Bad:setupRegistryACL with config access API failed response from server", "test5", - prepareTestRegistryServer, true, false, true}, } for _, tt := range tests { diff --git a/internal/security/bootstrapper/command/setupacl/stubregistryserver_test.go b/internal/security/bootstrapper/command/setupacl/stubregistryserver_test.go index b16f92297b..cfd58dfcc5 100644 --- a/internal/security/bootstrapper/command/setupacl/stubregistryserver_test.go +++ b/internal/security/bootstrapper/command/setupacl/stubregistryserver_test.go @@ -154,20 +154,6 @@ func (registry *registryTestServer) getRegistryServerConf(t *testing.T) *config. w.WriteHeader(http.StatusInternalServerError) _, _ = w.Write([]byte("The ACL system is currently in legacy mode.")) } - case consulConfigAccessVaultAPI: - require.Equal(t, http.MethodPost, r.Method) - if registry.serverOptions.configAccessOkResponse { - w.WriteHeader(http.StatusNoContent) - } else { - w.WriteHeader(http.StatusForbidden) - } - case fmt.Sprintf("/v1/consul/roles/%s", pathBase): - require.Equal(t, http.MethodPost, r.Method) - if registry.serverOptions.createRoleOk { - w.WriteHeader(http.StatusNoContent) - } else { - w.WriteHeader(http.StatusForbidden) - } case consulCheckAgentAPI: require.Equal(t, http.MethodGet, r.Method) if registry.serverOptions.consulCheckAgentOk { diff --git a/internal/security/bootstrapper/command/waitfor/command.go b/internal/security/bootstrapper/command/waitfor/command.go index a3c22fb414..f4eb3f50fc 100644 --- a/internal/security/bootstrapper/command/waitfor/command.go +++ b/internal/security/bootstrapper/command/waitfor/command.go @@ -30,7 +30,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/config" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/interfaces" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) const ( diff --git a/internal/security/bootstrapper/command/waitfor/command_test.go b/internal/security/bootstrapper/command/waitfor/command_test.go index 2d47abdb21..b95b7c11d5 100644 --- a/internal/security/bootstrapper/command/waitfor/command_test.go +++ b/internal/security/bootstrapper/command/waitfor/command_test.go @@ -34,7 +34,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/interfaces" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/tcp" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) func TestNewCommand(t *testing.T) { diff --git a/internal/security/bootstrapper/config/config.go b/internal/security/bootstrapper/config/config.go index 7e54b5f5b2..9ba7584ff0 100644 --- a/internal/security/bootstrapper/config/config.go +++ b/internal/security/bootstrapper/config/config.go @@ -18,7 +18,7 @@ package config import ( "strings" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" ) type ConfigurationStruct struct { diff --git a/internal/security/bootstrapper/container/container.go b/internal/security/bootstrapper/container/container.go index 31ab43eed1..fff9c8ca7f 100644 --- a/internal/security/bootstrapper/container/container.go +++ b/internal/security/bootstrapper/container/container.go @@ -18,7 +18,7 @@ package container import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) // ConfigurationName contains the name of the config.ConfigurationStruct implementation in the DIC. diff --git a/internal/security/bootstrapper/handlers/init.go b/internal/security/bootstrapper/handlers/init.go index 8b0c4fbcd2..e01516100c 100644 --- a/internal/security/bootstrapper/handlers/init.go +++ b/internal/security/bootstrapper/handlers/init.go @@ -26,9 +26,9 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/container" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/interfaces" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) // Bootstrap is to implement BootstrapHandler diff --git a/internal/security/bootstrapper/helper/helper.go b/internal/security/bootstrapper/helper/helper.go index 89899c2d92..8175d42127 100644 --- a/internal/security/bootstrapper/helper/helper.go +++ b/internal/security/bootstrapper/helper/helper.go @@ -24,7 +24,7 @@ import ( "strconv" "time" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) // file read/write permission only for owner diff --git a/internal/security/bootstrapper/helper/helper_test.go b/internal/security/bootstrapper/helper/helper_test.go index 4399784c71..fc3d903d70 100644 --- a/internal/security/bootstrapper/helper/helper_test.go +++ b/internal/security/bootstrapper/helper/helper_test.go @@ -22,7 +22,7 @@ import ( "path/filepath" "testing" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" "github.com/stretchr/testify/require" ) diff --git a/internal/security/bootstrapper/main.go b/internal/security/bootstrapper/main.go index ae4495161b..974f554d0e 100644 --- a/internal/security/bootstrapper/main.go +++ b/internal/security/bootstrapper/main.go @@ -22,7 +22,7 @@ import ( "fmt" "os" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" bootstrapper "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/command" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/config" @@ -31,11 +31,11 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/postgres" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/redis" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/interfaces" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) const ( diff --git a/internal/security/bootstrapper/messagebus_factory.go b/internal/security/bootstrapper/messagebus_factory.go index e126d5ba8e..21e04d8aa0 100644 --- a/internal/security/bootstrapper/messagebus_factory.go +++ b/internal/security/bootstrapper/messagebus_factory.go @@ -20,7 +20,7 @@ import ( "fmt" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/mosquitto" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/flags" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/flags" ) const ( diff --git a/internal/security/bootstrapper/mosquitto/config/config.go b/internal/security/bootstrapper/mosquitto/config/config.go index ac666142b5..72f26a19aa 100644 --- a/internal/security/bootstrapper/mosquitto/config/config.go +++ b/internal/security/bootstrapper/mosquitto/config/config.go @@ -16,7 +16,7 @@ package config import ( - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" ) // ConfigurationStruct has a 1:1 relationship to the configuration.yaml for the service. Writable is diff --git a/internal/security/bootstrapper/mosquitto/configure.go b/internal/security/bootstrapper/mosquitto/configure.go index 00150ae07d..044a5ba529 100644 --- a/internal/security/bootstrapper/mosquitto/configure.go +++ b/internal/security/bootstrapper/mosquitto/configure.go @@ -23,14 +23,14 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/mosquitto/config" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/mosquitto/container" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/mosquitto/handlers" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/flags" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/flags" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/interfaces" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) // Configure is the main entry point for configuring the mosquitto broker before startup diff --git a/internal/security/bootstrapper/mosquitto/container/config.go b/internal/security/bootstrapper/mosquitto/container/config.go index 6b0394a0f7..48bfd1ce3e 100644 --- a/internal/security/bootstrapper/mosquitto/container/config.go +++ b/internal/security/bootstrapper/mosquitto/container/config.go @@ -17,7 +17,7 @@ package container import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/mosquitto/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) // ConfigurationName contains the name of the config.ConfigurationStruct implementation in the DIC. diff --git a/internal/security/bootstrapper/mosquitto/handlers/handlers.go b/internal/security/bootstrapper/mosquitto/handlers/handlers.go index 86907fb41a..3da551b2ca 100644 --- a/internal/security/bootstrapper/mosquitto/handlers/handlers.go +++ b/internal/security/bootstrapper/mosquitto/handlers/handlers.go @@ -27,11 +27,11 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/mosquitto/container" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/secret" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/secret" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) const ( diff --git a/internal/security/bootstrapper/mosquitto/handlers/handlers_test.go b/internal/security/bootstrapper/mosquitto/handlers/handlers_test.go index 90bce16eb3..ac1d4dfa0c 100644 --- a/internal/security/bootstrapper/mosquitto/handlers/handlers_test.go +++ b/internal/security/bootstrapper/mosquitto/handlers/handlers_test.go @@ -22,12 +22,12 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/mosquitto/config" messagebus "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/mosquitto/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/interfaces/mocks" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/messaging" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/interfaces/mocks" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/messaging" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) type Testdata struct { diff --git a/internal/security/bootstrapper/postgres/config/config.go b/internal/security/bootstrapper/postgres/config/config.go index a67afc6e8e..5bf8c21851 100644 --- a/internal/security/bootstrapper/postgres/config/config.go +++ b/internal/security/bootstrapper/postgres/config/config.go @@ -6,7 +6,7 @@ package config import ( - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" ) // ConfigurationStruct has a 1:1 relationship to the configuration.yaml for the service. Writable is diff --git a/internal/security/bootstrapper/postgres/configure.go b/internal/security/bootstrapper/postgres/configure.go index b5af17fefb..2c922abfd7 100644 --- a/internal/security/bootstrapper/postgres/configure.go +++ b/internal/security/bootstrapper/postgres/configure.go @@ -13,13 +13,13 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/postgres/container" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/postgres/handlers" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/flags" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/flags" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/interfaces" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" ) // Configure is the main entry point for configuring the Postgres database before startup diff --git a/internal/security/bootstrapper/postgres/container/config.go b/internal/security/bootstrapper/postgres/container/config.go index bc7b28f0fd..a737123053 100644 --- a/internal/security/bootstrapper/postgres/container/config.go +++ b/internal/security/bootstrapper/postgres/container/config.go @@ -8,7 +8,7 @@ package container import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/postgres/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) // ConfigurationName contains the name of the config.ConfigurationStruct implementation in the DIC. diff --git a/internal/security/bootstrapper/postgres/handlers/handler_test.go b/internal/security/bootstrapper/postgres/handlers/handler_test.go index 8aa6c767f3..7cabe20122 100644 --- a/internal/security/bootstrapper/postgres/handlers/handler_test.go +++ b/internal/security/bootstrapper/postgres/handlers/handler_test.go @@ -16,11 +16,11 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/postgres/config" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/postgres/container" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/interfaces/mocks" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/interfaces/mocks" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/internal/security/bootstrapper/postgres/handlers/handlers.go b/internal/security/bootstrapper/postgres/handlers/handlers.go index 32f98dd8fc..e53b7a57c6 100644 --- a/internal/security/bootstrapper/postgres/handlers/handlers.go +++ b/internal/security/bootstrapper/postgres/handlers/handlers.go @@ -15,10 +15,10 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/helper" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/postgres/container" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/secret" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/secret" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) const postgresSecretName = "postgres" diff --git a/internal/security/bootstrapper/redis/config/config.go b/internal/security/bootstrapper/redis/config/config.go index 683b521c18..08c2ca751c 100644 --- a/internal/security/bootstrapper/redis/config/config.go +++ b/internal/security/bootstrapper/redis/config/config.go @@ -16,7 +16,7 @@ package config import ( - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" ) // ConfigurationStruct has a 1:1 relationship to the configuration.yaml for the service. Writable is diff --git a/internal/security/bootstrapper/redis/configure.go b/internal/security/bootstrapper/redis/configure.go index a1c1a29999..eda9c3e178 100644 --- a/internal/security/bootstrapper/redis/configure.go +++ b/internal/security/bootstrapper/redis/configure.go @@ -25,13 +25,13 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/redis/container" redisHandlers "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/redis/handlers" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/flags" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/flags" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/interfaces" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" ) // Configure is the main entry point for configuring the database redis before startup diff --git a/internal/security/bootstrapper/redis/container/config.go b/internal/security/bootstrapper/redis/container/config.go index 9dd1c2cba5..43f8cccb2f 100644 --- a/internal/security/bootstrapper/redis/container/config.go +++ b/internal/security/bootstrapper/redis/container/config.go @@ -19,7 +19,7 @@ package container import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/redis/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) // ConfigurationName contains the name of the config.ConfigurationStruct implementation in the DIC. diff --git a/internal/security/bootstrapper/redis/handlers/handlers.go b/internal/security/bootstrapper/redis/handlers/handlers.go index 06e2061e86..4d69f7f1c2 100644 --- a/internal/security/bootstrapper/redis/handlers/handlers.go +++ b/internal/security/bootstrapper/redis/handlers/handlers.go @@ -26,11 +26,11 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/helper" "github.com/edgexfoundry/edgex-go/internal/security/bootstrapper/redis/container" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/secret" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/secret" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) const ( diff --git a/internal/security/bootstrapper/tcp/client.go b/internal/security/bootstrapper/tcp/client.go index a072051488..e2ef26b6e8 100644 --- a/internal/security/bootstrapper/tcp/client.go +++ b/internal/security/bootstrapper/tcp/client.go @@ -23,7 +23,7 @@ import ( "strings" "time" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) const ( diff --git a/internal/security/bootstrapper/tcp/client_test.go b/internal/security/bootstrapper/tcp/client_test.go index 70da995d21..3cb074cd35 100644 --- a/internal/security/bootstrapper/tcp/client_test.go +++ b/internal/security/bootstrapper/tcp/client_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) func TestDialTcpClient(t *testing.T) { diff --git a/internal/security/bootstrapper/tcp/listener.go b/internal/security/bootstrapper/tcp/listener.go index fc0941be02..5649d4cc3b 100644 --- a/internal/security/bootstrapper/tcp/listener.go +++ b/internal/security/bootstrapper/tcp/listener.go @@ -23,7 +23,7 @@ import ( "strings" "time" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) const ( diff --git a/internal/security/bootstrapper/tcp/listener_test.go b/internal/security/bootstrapper/tcp/listener_test.go index 5d47d3c5fe..9dcd7b2c46 100644 --- a/internal/security/bootstrapper/tcp/listener_test.go +++ b/internal/security/bootstrapper/tcp/listener_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) func TestStartListener(t *testing.T) { diff --git a/internal/security/common/usermanager.go b/internal/security/common/usermanager.go index 4c9702f522..722ec9fe44 100644 --- a/internal/security/common/usermanager.go +++ b/internal/security/common/usermanager.go @@ -10,8 +10,8 @@ import ( "encoding/json" "fmt" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-secrets/v3/secrets" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-secrets/v4/secrets" ) type UserManager struct { @@ -47,7 +47,7 @@ func NewUserManager( } } -// CreatePasswordUserWithPolicy creates a vault identity with an attached policy +// CreatePasswordUserWithPolicy creates a secretstore identity with an attached policy // using userpass authentication engine. // username should be the name of the user or service to be created // password should be a random password to be assigned @@ -72,7 +72,7 @@ func (m *UserManager) CreatePasswordUserWithPolicy(username string, password str return err } - // Create or update underlying vault identity + // Create or update underlying secretstore identity identityMetadata := map[string]string{ // we will also put a name claim in any generated JWT's "name": username, diff --git a/internal/security/config/bootstraphandler.go b/internal/security/config/bootstraphandler.go index 9fe260aca0..38b57b8193 100644 --- a/internal/security/config/bootstraphandler.go +++ b/internal/security/config/bootstraphandler.go @@ -18,9 +18,9 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/config/interfaces" "github.com/edgexfoundry/edgex-go/internal/security/secretstore/container" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) type Bootstrap struct { diff --git a/internal/security/config/command/flags_common.go b/internal/security/config/command/flags_common.go index cf834514df..de7b43cb40 100644 --- a/internal/security/config/command/flags_common.go +++ b/internal/security/config/command/flags_common.go @@ -23,7 +23,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/flags" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/flags" ) // commonFlags is a custom implementation of flags.Common from go-mod-bootstrap diff --git a/internal/security/config/command/help/command.go b/internal/security/config/command/help/command.go index aa82fbb777..ce0d94d83e 100644 --- a/internal/security/config/command/help/command.go +++ b/internal/security/config/command/help/command.go @@ -14,7 +14,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/config/command" "github.com/edgexfoundry/edgex-go/internal/security/config/interfaces" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) const ( diff --git a/internal/security/config/command/help/command_test.go b/internal/security/config/command/help/command_test.go index fca48622fe..7566133842 100644 --- a/internal/security/config/command/help/command_test.go +++ b/internal/security/config/command/help/command_test.go @@ -11,7 +11,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/config/interfaces" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" "github.com/stretchr/testify/require" ) diff --git a/internal/security/config/command/proxy/adduser/command.go b/internal/security/config/command/proxy/adduser/command.go index de78f23d2e..6e1d32afbc 100644 --- a/internal/security/config/command/proxy/adduser/command.go +++ b/internal/security/config/command/proxy/adduser/command.go @@ -16,7 +16,8 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/config/interfaces" secretStoreConfig "github.com/edgexfoundry/edgex-go/internal/security/secretstore/config" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-secrets/v4/secrets" ) const ( @@ -37,7 +38,7 @@ type cmd struct { jwtTTL string } -// NewCommand add a new user to Vault, which can then authenticate through the gateway +// NewCommand add a new user to OpenBao, which can then authenticate through the gateway func NewCommand( lc logger.LoggingClient, configuration *secretStoreConfig.ConfigurationStruct, @@ -62,7 +63,7 @@ func NewCommand( return nil, err } if cmd.username == "" { - return nil, fmt.Errorf("%s vault adduser: argument --user is required", os.Args[0]) + return nil, fmt.Errorf("%s %s adduser: argument --user is required", os.Args[0], secrets.DefaultSecretStore) } cmd.proxyUserCommon, err = shared.NewProxyUserCommon(lc, configuration) diff --git a/internal/security/config/command/proxy/adduser/command_test.go b/internal/security/config/command/proxy/adduser/command_test.go index 21a60db922..04fc697e8a 100644 --- a/internal/security/config/command/proxy/adduser/command_test.go +++ b/internal/security/config/command/proxy/adduser/command_test.go @@ -16,7 +16,8 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/config/interfaces" "github.com/edgexfoundry/edgex-go/internal/security/secretstore/config" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-secrets/v4/secrets" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -108,7 +109,7 @@ func addUserWithArgs(t *testing.T, args []string) { p, _ := strconv.ParseInt(tsURL.Port(), 10, 32) config.SecretStore.Port = int(p) config.SecretStore.Protocol = "https" - config.SecretStore.Type = "vault" + config.SecretStore.Type = secrets.DefaultSecretStore config.SecretStore.TokenFolderPath = "testdata/" config.SecretStore.TokenFile = "token.json" diff --git a/internal/security/config/command/proxy/command.go b/internal/security/config/command/proxy/command.go index 0dcbfd6f66..dd04bdf65b 100644 --- a/internal/security/config/command/proxy/command.go +++ b/internal/security/config/command/proxy/command.go @@ -15,7 +15,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/config/interfaces" "github.com/edgexfoundry/edgex-go/internal/security/secretstore/config" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) const ( diff --git a/internal/security/config/command/proxy/deluser/command.go b/internal/security/config/command/proxy/deluser/command.go index 08a53ffd2c..70735cc829 100644 --- a/internal/security/config/command/proxy/deluser/command.go +++ b/internal/security/config/command/proxy/deluser/command.go @@ -16,7 +16,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/secretstore/config" secretStoreConfig "github.com/edgexfoundry/edgex-go/internal/security/secretstore/config" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) const ( diff --git a/internal/security/config/command/proxy/deluser/command_test.go b/internal/security/config/command/proxy/deluser/command_test.go index 027d82d8c5..24c3144b0b 100644 --- a/internal/security/config/command/proxy/deluser/command_test.go +++ b/internal/security/config/command/proxy/deluser/command_test.go @@ -15,8 +15,8 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/config/interfaces" "github.com/edgexfoundry/edgex-go/internal/security/secretstore/config" - - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-secrets/v4/secrets" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -79,7 +79,7 @@ func delUserWithArgs(t *testing.T, args []string) { p, _ := strconv.ParseInt(tsURL.Port(), 10, 32) config.SecretStore.Port = int(p) config.SecretStore.Protocol = "https" - config.SecretStore.Type = "vault" + config.SecretStore.Type = secrets.DefaultSecretStore config.SecretStore.TokenFolderPath = "testdata/" config.SecretStore.TokenFile = "token.json" diff --git a/internal/security/config/command/proxy/shared/proxyuser.go b/internal/security/config/command/proxy/shared/proxyuser.go index 78f7180b96..3aa937f4fd 100644 --- a/internal/security/config/command/proxy/shared/proxyuser.go +++ b/internal/security/config/command/proxy/shared/proxyuser.go @@ -18,12 +18,12 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/pipedhexreader" "github.com/edgexfoundry/edgex-go/internal/security/secretstore" secretStoreConfig "github.com/edgexfoundry/edgex-go/internal/security/secretstore/config" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/authtokenloader" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/fileioperformer" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/types" - "github.com/edgexfoundry/go-mod-secrets/v3/secrets" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/authtokenloader" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/fileioperformer" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/types" + "github.com/edgexfoundry/go-mod-secrets/v4/secrets" ) const ( @@ -45,7 +45,7 @@ type ProxyUserCommon struct { secretStoreClient secrets.SecretStoreClient } -// NewProxyUserCommon has common logic for adding and deleting users from Vault +// NewProxyUserCommon has common logic for adding and deleting users from OpenBao func NewProxyUserCommon( lc logger.LoggingClient, configuration *secretStoreConfig.ConfigurationStruct) (ProxyUserCommon, error) { @@ -92,7 +92,7 @@ func NewProxyUserCommon( return vb, err } -// LoadServiceToken loads a vault token from SecretStore.TokenFile (secrets-token.json) +// LoadServiceToken loads a token from SecretStore.TokenFile (secrets-token.json) func (vb *ProxyUserCommon) LoadServiceToken() (string, func(), error) { // This is not a root token; don't need to revoke when we're done with it @@ -112,7 +112,7 @@ func (vb *ProxyUserCommon) LoadServiceToken() (string, func(), error) { } -// LoadRootToken regenerates a temporary root token from Vault keyshares +// LoadRootToken regenerates a temporary root token from OpenBao keyshares func (vb *ProxyUserCommon) LoadRootToken() (string, func(), error) { pipedHexReader := pipedhexreader.NewPipedHexReader() keyDeriver := kdf.NewKdf(vb.fileOpener, vb.configuration.SecretStore.TokenFolderPath, sha256.New) @@ -123,12 +123,12 @@ func (vb *ProxyUserCommon) LoadRootToken() (string, func(), error) { err := vmkEncryption.LoadIKM(hook) defer vmkEncryption.WipeIKM() // Ensure IKM is wiped from memory if err != nil { - vb.loggingClient.Errorf("failed to setup vault master key encryption: %s", err.Error()) + vb.loggingClient.Errorf("failed to setup %s master key encryption: %s", secrets.DefaultSecretStore, err.Error()) return "", nil, err } - vb.loggingClient.Info("Enabled encryption of Vault master key") + vb.loggingClient.Infof("Enabled encryption of %s master key", secrets.DefaultSecretStore) } else { - vb.loggingClient.Info("vault master key encryption not enabled. EDGEX_IKM_HOOK not set.") + vb.loggingClient.Infof("%s master key encryption not enabled. EDGEX_IKM_HOOK not set.", secrets.DefaultSecretStore) } var initResponse types.InitResponse diff --git a/internal/security/config/command/proxy/tls/command.go b/internal/security/config/command/proxy/tls/command.go index 811585d85c..a3ecf5aac0 100644 --- a/internal/security/config/command/proxy/tls/command.go +++ b/internal/security/config/command/proxy/tls/command.go @@ -15,10 +15,10 @@ import ( "github.com/edgexfoundry/edgex-go/internal" "github.com/edgexfoundry/edgex-go/internal/security/config/interfaces" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/fileioperformer" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/fileioperformer" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) const ( diff --git a/internal/security/config/command/proxy/tls/command_test.go b/internal/security/config/command/proxy/tls/command_test.go index f2dec30ff8..5a727f55fb 100644 --- a/internal/security/config/command/proxy/tls/command_test.go +++ b/internal/security/config/command/proxy/tls/command_test.go @@ -13,8 +13,8 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/config/interfaces" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/fileioperformer/mocks" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/fileioperformer/mocks" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/security/config/main.go b/internal/security/config/main.go index 034b8f2303..1abbb527dd 100644 --- a/internal/security/config/main.go +++ b/internal/security/config/main.go @@ -18,21 +18,21 @@ import ( "context" "os" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" "github.com/edgexfoundry/edgex-go/internal/security/config/command" "github.com/edgexfoundry/edgex-go/internal/security/secretstore/config" "github.com/edgexfoundry/edgex-go/internal/security/secretstore/container" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/interfaces" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) const securitySecretsConfigServiceKey = "secrets-config" diff --git a/internal/security/fileprovider/config/config.go b/internal/security/fileprovider/config/config.go index bb8b40295a..914c035d6d 100644 --- a/internal/security/fileprovider/config/config.go +++ b/internal/security/fileprovider/config/config.go @@ -18,7 +18,7 @@ package config import ( secretstoreConfig "github.com/edgexfoundry/edgex-go/internal/security/secretstore/config" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" ) type ConfigurationStruct struct { diff --git a/internal/security/fileprovider/container/config.go b/internal/security/fileprovider/container/config.go index 79655ce240..e319cadc50 100644 --- a/internal/security/fileprovider/container/config.go +++ b/internal/security/fileprovider/container/config.go @@ -19,7 +19,7 @@ package container import ( "github.com/edgexfoundry/edgex-go/internal/security/fileprovider/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) // ConfigurationName contains the name of the config.ConfigurationStruct implementation in the DIC. diff --git a/internal/security/fileprovider/init.go b/internal/security/fileprovider/init.go index 58276a47b9..9c695e87bf 100644 --- a/internal/security/fileprovider/init.go +++ b/internal/security/fileprovider/init.go @@ -23,16 +23,16 @@ import ( "github.com/edgexfoundry/edgex-go/internal" "github.com/edgexfoundry/edgex-go/internal/security/fileprovider/container" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/types" - "github.com/edgexfoundry/go-mod-secrets/v3/secrets" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/types" + "github.com/edgexfoundry/go-mod-secrets/v4/secrets" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/authtokenloader" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/fileioperformer" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/authtokenloader" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/fileioperformer" ) type Bootstrap struct { @@ -65,7 +65,7 @@ func (b *Bootstrap) BootstrapHandler(_ context.Context, _ *sync.WaitGroup, _ sta } clientConfig := types.SecretConfig{ - Type: secrets.Vault, + Type: secrets.DefaultSecretStore, Host: cfg.SecretStore.Host, Port: cfg.SecretStore.Port, Protocol: cfg.SecretStore.Protocol, diff --git a/internal/security/fileprovider/main.go b/internal/security/fileprovider/main.go index 7673e04a0a..06bba26299 100644 --- a/internal/security/fileprovider/main.go +++ b/internal/security/fileprovider/main.go @@ -22,14 +22,14 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/fileprovider/config" "github.com/edgexfoundry/edgex-go/internal/security/fileprovider/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/flags" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/flags" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/interfaces" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" ) func Main(ctx context.Context, cancel context.CancelFunc) { diff --git a/internal/security/fileprovider/provider.go b/internal/security/fileprovider/provider.go index 1c6713a377..d6dff9b21f 100644 --- a/internal/security/fileprovider/provider.go +++ b/internal/security/fileprovider/provider.go @@ -28,12 +28,12 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/fileprovider/config" "github.com/edgexfoundry/edgex-go/internal/security/secretstore" secretstoreConfig "github.com/edgexfoundry/edgex-go/internal/security/secretstore/config" - "github.com/edgexfoundry/go-mod-secrets/v3/secrets" + "github.com/edgexfoundry/go-mod-secrets/v4/secrets" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/authtokenloader" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/fileioperformer" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/authtokenloader" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/fileioperformer" ) // permissionable is the subset of the File API that allows setting file permissions diff --git a/internal/security/fileprovider/provider_test.go b/internal/security/fileprovider/provider_test.go index aff2e07c10..9977edab7f 100644 --- a/internal/security/fileprovider/provider_test.go +++ b/internal/security/fileprovider/provider_test.go @@ -24,13 +24,13 @@ import ( "testing" secretstoreConfig "github.com/edgexfoundry/edgex-go/internal/security/secretstore/config" - loaderMock "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/authtokenloader/mocks" - fileMock "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/fileioperformer/mocks" - "github.com/edgexfoundry/go-mod-secrets/v3/secrets/mocks" + loaderMock "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/authtokenloader/mocks" + fileMock "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/fileioperformer/mocks" + "github.com/edgexfoundry/go-mod-secrets/v4/secrets/mocks" "github.com/edgexfoundry/edgex-go/internal/security/fileprovider/config" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/internal/security/fileprovider/tokenconfig.go b/internal/security/fileprovider/tokenconfig.go index a3d3d5585a..79b0cc0ee8 100644 --- a/internal/security/fileprovider/tokenconfig.go +++ b/internal/security/fileprovider/tokenconfig.go @@ -51,7 +51,7 @@ import ( "strings" "github.com/edgexfoundry/edgex-go/internal/security/secretstore" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/fileioperformer" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/fileioperformer" ) const ( diff --git a/internal/security/fileprovider/tokenconfig_test.go b/internal/security/fileprovider/tokenconfig_test.go index 11709c9ad1..6766731272 100644 --- a/internal/security/fileprovider/tokenconfig_test.go +++ b/internal/security/fileprovider/tokenconfig_test.go @@ -19,7 +19,7 @@ import ( "strings" "testing" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/fileioperformer/mocks" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/fileioperformer/mocks" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/security/kdf/methods.go b/internal/security/kdf/methods.go index 7d80968359..2050d36902 100644 --- a/internal/security/kdf/methods.go +++ b/internal/security/kdf/methods.go @@ -19,7 +19,7 @@ import ( "golang.org/x/crypto/hkdf" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/fileioperformer" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/fileioperformer" ) // The KDF salt adds additional randomness to the KDF input key diff --git a/internal/security/kdf/methods_test.go b/internal/security/kdf/methods_test.go index c5b3a1ad57..55065a7596 100644 --- a/internal/security/kdf/methods_test.go +++ b/internal/security/kdf/methods_test.go @@ -14,7 +14,7 @@ import ( "testing" "time" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/fileioperformer/mocks" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/fileioperformer/mocks" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/internal/security/proxyauth/config/config.go b/internal/security/proxyauth/config/config.go index a16d46ef29..eb486287fb 100644 --- a/internal/security/proxyauth/config/config.go +++ b/internal/security/proxyauth/config/config.go @@ -17,7 +17,7 @@ package config import ( - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" ) // ConfigurationStruct contains the configuration properties for the core-command service. diff --git a/internal/security/proxyauth/container/config.go b/internal/security/proxyauth/container/config.go index 6416c9aca9..d31620467c 100644 --- a/internal/security/proxyauth/container/config.go +++ b/internal/security/proxyauth/container/config.go @@ -18,7 +18,7 @@ package container import ( "github.com/edgexfoundry/edgex-go/internal/security/proxyauth/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) // ConfigurationName contains the name of command's config.ConfigurationStruct implementation in the DIC. diff --git a/internal/security/proxyauth/init.go b/internal/security/proxyauth/init.go index 134c9c500f..ababfbe83b 100644 --- a/internal/security/proxyauth/init.go +++ b/internal/security/proxyauth/init.go @@ -21,11 +21,11 @@ import ( "sync" "github.com/edgexfoundry/edgex-go" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/controller" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/handlers" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/controller" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/handlers" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" "github.com/labstack/echo/v4" ) @@ -51,7 +51,7 @@ func NewBootstrap(router *echo.Echo, serviceName string) *Bootstrap { func (b *Bootstrap) BootstrapHandler(ctx context.Context, wg *sync.WaitGroup, _ startup.Timer, dic *di.Container) bool { lc := container.LoggingClientFrom(dic.Get) secretProvider := container.SecretProviderExtFrom(dic.Get) - authenticationHook := handlers.VaultAuthenticationHandlerFunc(secretProvider, lc) + authenticationHook := handlers.SecretStoreAuthenticationHandlerFunc(secretProvider, lc) // Common _ = controller.NewCommonController(dic, b.router, b.serviceName, edgex.Version) diff --git a/internal/security/proxyauth/main.go b/internal/security/proxyauth/main.go index 6cc150d6a1..dbb5b00672 100644 --- a/internal/security/proxyauth/main.go +++ b/internal/security/proxyauth/main.go @@ -20,19 +20,19 @@ import ( "context" "os" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/flags" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/handlers" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/flags" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/handlers" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/interfaces" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" "github.com/edgexfoundry/edgex-go" "github.com/edgexfoundry/edgex-go/internal/security/proxyauth/config" "github.com/edgexfoundry/edgex-go/internal/security/proxyauth/container" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" "github.com/labstack/echo/v4" ) diff --git a/internal/security/secretstore/certs.go b/internal/security/secretstore/certs.go index d3627d8697..69b037c684 100644 --- a/internal/security/secretstore/certs.go +++ b/internal/security/secretstore/certs.go @@ -29,7 +29,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) type CertCollect struct { diff --git a/internal/security/secretstore/certs_test.go b/internal/security/secretstore/certs_test.go index 1f824d1d69..3a125f714a 100644 --- a/internal/security/secretstore/certs_test.go +++ b/internal/security/secretstore/certs_test.go @@ -30,9 +30,9 @@ import ( "github.com/stretchr/testify/require" "github.com/edgexfoundry/edgex-go/internal/security/secretstore/config" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) func TestRetrieve(t *testing.T) { diff --git a/internal/security/secretstore/config/config.go b/internal/security/secretstore/config/config.go index 8e21584233..4cf5db998d 100644 --- a/internal/security/secretstore/config/config.go +++ b/internal/security/secretstore/config/config.go @@ -20,7 +20,7 @@ package config import ( "fmt" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" ) type ConfigurationStruct struct { @@ -59,8 +59,8 @@ type SecretStoreInfo struct { KeyFilePath string TokenFolderPath string TokenFile string - VaultSecretShares int - VaultSecretThreshold int + SecretShares int + SecretThreshold int TokenProvider string TokenProviderArgs []string TokenProviderType string diff --git a/internal/security/secretstore/container/config.go b/internal/security/secretstore/container/config.go index 5dcc4ad46a..eb4c9d6f27 100644 --- a/internal/security/secretstore/container/config.go +++ b/internal/security/secretstore/container/config.go @@ -19,7 +19,7 @@ package container import ( "github.com/edgexfoundry/edgex-go/internal/security/secretstore/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) // ConfigurationName contains the name of the config.ConfigurationStruct implementation in the DIC. diff --git a/internal/security/secretstore/init.go b/internal/security/secretstore/init.go index 98a0ce09ae..c8a3f328ef 100644 --- a/internal/security/secretstore/init.go +++ b/internal/security/secretstore/init.go @@ -1,7 +1,7 @@ /******************************************************************************* * Copyright 2022-2023 Intel Corporation * Copyright 2019 Dell Inc. - * Copyright (C) 2024 IOTech Ltd + * Copyright 2024 IOTech Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -40,17 +40,17 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/secretstore/secretsengine" "github.com/edgexfoundry/edgex-go/internal/security/secretstore/tokenfilewriter" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/fileioperformer" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/types" - "github.com/edgexfoundry/go-mod-secrets/v3/secrets" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/fileioperformer" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/types" + "github.com/edgexfoundry/go-mod-secrets/v4/secrets" ) const ( @@ -69,16 +69,16 @@ const ( var errNotFound = errors.New("credential NOT found") type Bootstrap struct { - insecureSkipVerify bool - vaultInterval int - validKnownSecrets map[string]bool + insecureSkipVerify bool + secretStoreInterval int + validKnownSecrets map[string]bool } -func NewBootstrap(insecureSkipVerify bool, vaultInterval int) *Bootstrap { +func NewBootstrap(insecureSkipVerify bool, secretStoreInterval int) *Bootstrap { return &Bootstrap{ - insecureSkipVerify: insecureSkipVerify, - vaultInterval: vaultInterval, - validKnownSecrets: map[string]bool{redisSecretName: true, messagebusSecretName: true}, + insecureSkipVerify: insecureSkipVerify, + secretStoreInterval: secretStoreInterval, + validKnownSecrets: map[string]bool{redisSecretName: true, messagebusSecretName: true}, } } @@ -107,7 +107,7 @@ func (b *Bootstrap) BootstrapHandler(ctx context.Context, _ *sync.WaitGroup, _ s httpCaller = pkg.NewRequester(lc).Insecure() } - intervalDuration := time.Duration(b.vaultInterval) * time.Second + intervalDuration := time.Duration(b.secretStoreInterval) * time.Second clientConfig := types.SecretConfig{ Type: secretStoreConfig.Type, Protocol: secretStoreConfig.Protocol, @@ -131,17 +131,17 @@ func (b *Bootstrap) BootstrapHandler(ctx context.Context, _ *sync.WaitGroup, _ s err := vmkEncryption.LoadIKM(hook) defer vmkEncryption.WipeIKM() // Ensure IKM is wiped from memory if err != nil { - lc.Errorf("failed to setup vault master key encryption: %s", err.Error()) + lc.Errorf("failed to setup %s master key encryption: %s", secrets.DefaultSecretStore, err.Error()) return false } - lc.Info("Enabled encryption of Vault master key") + lc.Infof("Enabled encryption of %s master key", secrets.DefaultSecretStore) } else { - lc.Info("vault master key encryption not enabled. EDGEX_IKM_HOOK not set.") + lc.Infof("%s master key encryption not enabled. EDGEX_IKM_HOOK not set.", secrets.DefaultSecretStore) } var initResponse types.InitResponse // reused many places in below flow - //step 3: initialize and unseal Vault + //step 3: initialize and unseal secret store for shouldContinue := true; shouldContinue; { // Anonymous function used to prevent file handles from accumulating terminalFailure := func() bool { @@ -154,7 +154,7 @@ func (b *Bootstrap) BootstrapHandler(ctx context.Context, _ *sync.WaitGroup, _ s lc.Errorf("unable to load init response: %s", err.Error()) return true } - lc.Infof("vault is initialized and unsealed (status code: %d)", sCode) + lc.Infof("%s is initialized and unsealed (status code: %d)", secrets.DefaultSecretStore, sCode) shouldContinue = false case http.StatusTooManyRequests: @@ -162,10 +162,10 @@ func (b *Bootstrap) BootstrapHandler(ctx context.Context, _ *sync.WaitGroup, _ s shouldContinue = false case http.StatusNotImplemented: - lc.Infof("vault is not initialized (status code: %d). Starting initialization and unseal phases", sCode) - initResponse, err = client.Init(secretStoreConfig.VaultSecretThreshold, secretStoreConfig.VaultSecretShares) + lc.Infof("%s is not initialized (status code: %d). Starting initialization and unseal phases", secrets.DefaultSecretStore, sCode) + initResponse, err = client.Init(secretStoreConfig.SecretThreshold, secretStoreConfig.SecretShares) if err != nil { - lc.Errorf("Unable to Initialize Vault: %s. Will try again...", err.Error()) + lc.Errorf("Unable to Initialize %s: %s. Will try again...", secrets.DefaultSecretStore, err.Error()) // Not terminal failure, should continue and try again return false } @@ -178,14 +178,14 @@ func (b *Bootstrap) BootstrapHandler(ctx context.Context, _ *sync.WaitGroup, _ s err = client.Unseal(initResponse.KeysBase64) if err != nil { - lc.Errorf("Unable to unseal Vault: %s", err.Error()) + lc.Errorf("Unable to unseal %s: %s", secrets.DefaultSecretStore, err.Error()) return true } // We need the unencrypted initResponse in order to generate a temporary root token later // Make a copy and save the copy, possibly encrypted encryptedInitResponse := initResponse - // Optionally encrypt the vault init response based on whether encryption was enabled + // Optionally encrypt the secret store init response based on whether encryption was enabled if vmkEncryption.IsEncrypting() { if err := vmkEncryption.EncryptInitResponse(&encryptedInitResponse); err != nil { lc.Errorf("failed to encrypt init response from secret store: %s", err.Error()) @@ -198,12 +198,12 @@ func (b *Bootstrap) BootstrapHandler(ctx context.Context, _ *sync.WaitGroup, _ s } case http.StatusServiceUnavailable: - lc.Infof("vault is sealed (status code: %d). Starting unseal phase", sCode) + lc.Infof("%s is sealed (status code: %d). Starting unseal phase", secrets.DefaultSecretStore, sCode) if err := LoadInitResponse(lc, fileOpener, secretStoreConfig, &initResponse); err != nil { lc.Errorf("unable to load init response: %s", err.Error()) return true } - // Optionally decrypt the vault init response based on whether encryption was enabled + // Optionally decrypt the secret store init response based on whether encryption was enabled if vmkEncryption.IsEncrypting() { err = vmkEncryption.DecryptInitResponse(&initResponse) if err != nil { @@ -219,9 +219,9 @@ func (b *Bootstrap) BootstrapHandler(ctx context.Context, _ *sync.WaitGroup, _ s default: if sCode == 0 { - lc.Errorf("vault is in an unknown state. No Status code available") + lc.Errorf("%s is in an unknown state. No Status code available", secrets.DefaultSecretStore) } else { - lc.Errorf("vault is in an unknown state. Status code: %d", sCode) + lc.Errorf("%s is in an unknown state. Status code: %d", secrets.DefaultSecretStore, sCode) } } @@ -233,12 +233,12 @@ func (b *Bootstrap) BootstrapHandler(ctx context.Context, _ *sync.WaitGroup, _ s } if shouldContinue { - lc.Infof("trying Vault init/unseal again in %d seconds", b.vaultInterval) + lc.Infof("trying %s init/unseal again in %d seconds", secrets.DefaultSecretStore, b.secretStoreInterval) time.Sleep(intervalDuration) } } - /* After vault is initialized and unsealed, it takes a while to get ready to accept any request. During which period any request will get http 500 error. + /* After secret store is initialized and unsealed, it takes a while to get ready to accept any request. During which period any request will get http 500 error. We need to check the status constantly until it return http StatusOK. */ ticker := time.NewTicker(time.Second) @@ -329,7 +329,7 @@ func (b *Bootstrap) BootstrapHandler(ctx context.Context, _ *sync.WaitGroup, _ s lc.Errorf("failed to check if %s auth method enabled: %s", UserPassAuthEngine, err.Error()) return false } else if !upAuthEnabled { - // Enable userpass engine at /v1/auth/{eng.path} path (/v1 prefix supplied by Vault) + // Enable userpass engine at /v1/auth/{eng.path} path (/v1 prefix supplied by secret store) lc.Infof("Enabling userpass authentication for the first time...") if err := client.EnablePasswordAuth(rootToken, UPAuthMountPoint); err != nil { lc.Errorf("failed to enable userpass secrets engine: %s", err.Error()) @@ -389,7 +389,7 @@ func (b *Bootstrap) BootstrapHandler(ctx context.Context, _ *sync.WaitGroup, _ s // continue credential creation // A little note on why there are two secrets names. For each microservice, the redis - // username/password is uploaded to the vault on both /v1/secret/edgex/%s/redisdb and + // username/password is uploaded to the secret store on both /v1/secret/edgex/%s/redisdb and // /v1/secret/edgex/redisdb/%s). The go-mod-secrets client requires a SecretName property to prefix all // secrets. // So edgex/%s/redisdb is for the microservices (microservices are restricted to their specific @@ -590,24 +590,7 @@ func (b *Bootstrap) BootstrapHandler(ctx context.Context, _ *sync.WaitGroup, _ s lc.Info("proxy certificate pair upload was skipped because cert secretStore value(s) were blank") } - // create and save a Vault token to configure - // Consul secret engine access, role operations, and managing Consul agent tokens. - // Enable Consul secret engine - if err := secretsengine.New(secretsengine.ConsulSecretEngineMountPoint, secretsengine.Consul). - Enable(&rootToken, lc, client); err != nil { - lc.Errorf("failed to enable Consul secrets engine: %s", err.Error()) - return false - } - - // generate a management token for Consul secrets engine operations: - tokenFileWriter := tokenfilewriter.NewWriter(lc, client, fileOpener) - if _, err := tokenFileWriter.CreateAndWrite(rootToken, configuration.SecretStore.ConsulSecretsAdminTokenPath, - tokenFileWriter.CreateMgmtTokenForConsulSecretsEngine); err != nil { - lc.Errorf("failed to create and write the token for Consul secret management: %s", err.Error()) - return false - } - - lc.Info("Vault init done successfully") + lc.Infof("%s init done successfully", secrets.DefaultSecretStore) return true } diff --git a/internal/security/secretstore/init_test.go b/internal/security/secretstore/init_test.go index ca4a21de6d..c00c4efca5 100644 --- a/internal/security/secretstore/init_test.go +++ b/internal/security/secretstore/init_test.go @@ -14,9 +14,9 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/secretstore/config" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/fileioperformer/mocks" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/types" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/fileioperformer/mocks" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/security/secretstore/main.go b/internal/security/secretstore/main.go index c36c866b79..02a479d071 100644 --- a/internal/security/secretstore/main.go +++ b/internal/security/secretstore/main.go @@ -1,6 +1,7 @@ /******************************************************************************* * Copyright 2019 Dell Inc. * Copyright 2023 Intel Corporation + * Copyright 2024 IOTech Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -27,28 +28,28 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/secretstore/config" "github.com/edgexfoundry/edgex-go/internal/security/secretstore/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/flags" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/flags" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/interfaces" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" ) func Main(ctx context.Context, cancel context.CancelFunc) { startupTimer := startup.NewStartUpTimer(common.SecuritySecretStoreSetupServiceKey) var insecureSkipVerify bool - var vaultInterval int + var secretStoreInterval int // All common command-line flags have been moved to bootstrap. Service specific flags are add here, // but DO NOT call flag.Parse() as it is called by bootstrap.Run() below // Service specific used is passed below. f := flags.NewWithUsage( " --insecureSkipVerify=true/false Indicates if skipping the server side SSL cert verification, similar to -k of curl\n" + - " --vaultInterval= Indicates how long the program will pause between vault initialization attempts until it succeeds", + " --secretStoreInterval= Indicates how long the program will pause between the secret store initialization attempts until it succeeds", ) if len(os.Args) < 2 { @@ -56,7 +57,7 @@ func Main(ctx context.Context, cancel context.CancelFunc) { } f.FlagSet.BoolVar(&insecureSkipVerify, "insecureSkipVerify", false, "") - f.FlagSet.IntVar(&vaultInterval, "vaultInterval", 30, "") + f.FlagSet.IntVar(&secretStoreInterval, "secretStoreInterval", 30, "") f.Parse(os.Args[1:]) configuration := &config.ConfigurationStruct{} @@ -79,7 +80,7 @@ func Main(ctx context.Context, cancel context.CancelFunc) { false, bootstrapConfig.ServiceTypeOther, []interfaces.BootstrapHandler{ - NewBootstrap(insecureSkipVerify, vaultInterval).BootstrapHandler, + NewBootstrap(insecureSkipVerify, secretStoreInterval).BootstrapHandler, }, ) diff --git a/internal/security/secretstore/password.go b/internal/security/secretstore/password.go index 1dd1d905e3..447039a40c 100644 --- a/internal/security/secretstore/password.go +++ b/internal/security/secretstore/password.go @@ -27,7 +27,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) type passwordGenerator struct { diff --git a/internal/security/secretstore/password_linux_test.go b/internal/security/secretstore/password_linux_test.go index 081892db1f..a585fc0a85 100644 --- a/internal/security/secretstore/password_linux_test.go +++ b/internal/security/secretstore/password_linux_test.go @@ -14,7 +14,7 @@ import ( "net/http" "testing" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/security/secretstore/password_test.go b/internal/security/secretstore/password_test.go index 02e2e0b966..78a5262d00 100644 --- a/internal/security/secretstore/password_test.go +++ b/internal/security/secretstore/password_test.go @@ -25,9 +25,9 @@ import ( "testing" "github.com/edgexfoundry/edgex-go/internal/security/secretstore/config" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/security/secretstore/passwordprovider.go b/internal/security/secretstore/passwordprovider.go index 11279cc460..6e04fe0a71 100644 --- a/internal/security/secretstore/passwordprovider.go +++ b/internal/security/secretstore/passwordprovider.go @@ -14,7 +14,7 @@ import ( "strings" "syscall" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) type PasswordProvider struct { diff --git a/internal/security/secretstore/passwordprovider_test.go b/internal/security/secretstore/passwordprovider_test.go index 84aa0c5055..2bd00ac229 100644 --- a/internal/security/secretstore/passwordprovider_test.go +++ b/internal/security/secretstore/passwordprovider_test.go @@ -13,7 +13,7 @@ import ( "os/exec" "testing" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/internal/security/secretstore/secretsengine/enabler.go b/internal/security/secretstore/secretsengine/enabler.go index 281e1f3d6b..3f809f2be8 100644 --- a/internal/security/secretstore/secretsengine/enabler.go +++ b/internal/security/secretstore/secretsengine/enabler.go @@ -1,5 +1,6 @@ /******************************************************************************* * Copyright 2021-2023 Intel Corporation +* Copyright (C) 2024 IOTech Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -18,28 +19,20 @@ package secretsengine import ( "fmt" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-secrets/v3/secrets" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-secrets/v4/secrets" ) const ( - // KVSecretsEngineMountPoint is the name of the mount point base for Vault's key-value secrets engine + // KVSecretsEngineMountPoint is the name of the mount point base for OpenBao's key-value secrets engine KVSecretsEngineMountPoint = "secret" - // ConsulSecretEngineMountPoint is the name of the mount point base for Vault's Consul secrets engine - ConsulSecretEngineMountPoint = "consul" - // Vault's secrets engine type related constants + // OpenBao's secrets engine type related constants KeyValue = "kv" - Consul = "consul" // kvVersion is the version of key-value secret storage used - // currently we use version 1 from Vault + // currently we use version 1 from OpenBao kvVersion = "1" - - // defaultConsulTokenLeaseTtl is the default time-to-live value for consul token - // currently we don't set any lease time-to-live limit for Consul tokens - // this will be changed in future for phase 3 based on the ADR - defaultConsulTokenLeaseTtl = "0" ) // SecretsEngine is the metadata for secretstore secret engine enabler @@ -63,7 +56,7 @@ func (eng SecretsEngine) Enable(rootToken *string, return fmt.Errorf("rootToken is required") } - // the data returned from GET of check installed secrets engine API of Vault is + // the data returned from GET of check installed secrets engine API of OpenBao is // the mountPoint with trailing slash(/), eg. "secret/" for kv's mountPoint "secret" checkMountPoint := eng.mountPoint + "/" installed, err := client.CheckSecretEngineInstalled(*rootToken, checkMountPoint, eng.engineType) @@ -76,18 +69,11 @@ func (eng SecretsEngine) Enable(rootToken *string, lc.Infof("enabling %s secrets engine for the first time...", eng.engineType) switch eng.engineType { case KeyValue: - // Enable KV storage version 1 at /v1/{eng.path} path (/v1 prefix supplied by Vault) + // Enable KV storage version 1 at /v1/{eng.path} path (/v1 prefix supplied by OpenBao) if err := client.EnableKVSecretEngine(*rootToken, eng.mountPoint, kvVersion); err != nil { return fmt.Errorf("failed to enable KV version %s secrets engine: %w", kvVersion, err) } lc.Infof("KeyValue secrets engine with version %s enabled", kvVersion) - case Consul: - // Enable Consul secrets storage at /consul path - if err := client.EnableConsulSecretEngine(*rootToken, - eng.mountPoint, defaultConsulTokenLeaseTtl); err != nil { - return fmt.Errorf("failed to enable Consul secrets engine: %w", err) - } - lc.Infof("Consul secrets engine with config default_ttl = %s enabled", defaultConsulTokenLeaseTtl) default: return fmt.Errorf("Unsupported secrets engine type: %s", eng.engineType) } diff --git a/internal/security/secretstore/secretsengine/enabler_test.go b/internal/security/secretstore/secretsengine/enabler_test.go index c70e55c2a1..706baf3008 100644 --- a/internal/security/secretstore/secretsengine/enabler_test.go +++ b/internal/security/secretstore/secretsengine/enabler_test.go @@ -1,5 +1,6 @@ /******************************************************************************* * Copyright 2021-2023 Intel Corporation + * Copyright (C) 2024 IOTech Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -22,8 +23,8 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-secrets/v3/secrets/mocks" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-secrets/v4/secrets/mocks" ) func TestNewSecretsEngine(t *testing.T) { @@ -33,7 +34,6 @@ func TestNewSecretsEngine(t *testing.T) { engineType string }{ {"New kv type of secrets engine", "kv-1-test/", KeyValue}, - {"New consul type of secrets engine", "consul-test/", Consul}, } for _, tt := range tests { @@ -56,40 +56,25 @@ func TestEnableSecretsEngine(t *testing.T) { mountPoint string engineType string kvInstalled bool - consulInstalled bool clientCallFailed bool expectError bool }{ {"Ok:Enable kv secrets engine not installed yet with client call ok", &testToken, "kv-1-test", - KeyValue, false, false, false, false}, - {"Ok:Enable consul secrets engine not installed yet with client call ok", &testToken, "consul-test", - Consul, false, false, false, false}, + KeyValue, false, false, false}, {"Ok:Enable kv secrets engine already installed with client call ok (1)", &testToken, "kv-1-test", - KeyValue, true, false, false, false}, - {"Ok:Enable consul secrets engine already installed with client call ok (1)", &testToken, "consul-test", - Consul, false, true, false, false}, + KeyValue, true, false, false}, {"Ok:Enable kv secrets engine already installed with client call ok (2)", &testToken, "kv-1-test", - KeyValue, true, true, false, false}, - {"Ok:Enable consul secrets engine already installed with client call ok (2)", &testToken, "consul-test", - Consul, true, true, false, false}, + KeyValue, true, false, false}, {"Bad:Enable kv secrets engine not installed yet but client call failed", &testToken, "kv-1-test", - KeyValue, false, false, true, true}, - {"Bad:Enable consul secrets engine not installed yet but client call failed", &testToken, "consul-test", - Consul, false, false, true, true}, + KeyValue, false, true, true}, {"Bad:Enable kv secrets engine already installed but client call failed (1)", &testToken, "kv-1-test", - KeyValue, true, false, true, true}, - {"Bad:Enable consul secrets engine already installed but client call failed (1)", &testToken, "consul-test", - Consul, false, true, true, true}, + KeyValue, true, true, true}, {"Bad:Enable kv secrets engine already installed but client call failed (2)", &testToken, "kv-1-test", - KeyValue, true, true, true, true}, - {"Bad:Enable consul secrets engine already installed but client call failed (2)", &testToken, "consul-test", - Consul, true, true, true, true}, + KeyValue, true, true, true}, {"Bad:Enable kv secrets engine with nil token", nil, "kv-1-test", - KeyValue, false, true, false, true}, - {"Bad:Enable consul secrets engine with nil token", nil, "consul-test", - Consul, true, false, false, true}, + KeyValue, false, false, true}, {"Bad:Unsupported secrets engine type", &testToken, "whatever", - "unsupported", false, false, false, true}, + "unsupported", false, false, true}, } for _, test := range tests { @@ -111,18 +96,12 @@ func TestEnableSecretsEngine(t *testing.T) { mockClient := &mocks.SecretStoreClient{} mockClient.On("CheckSecretEngineInstalled", mock.Anything, mock.Anything, KeyValue). Return(localTest.kvInstalled, chkErr) - mockClient.On("CheckSecretEngineInstalled", mock.Anything, mock.Anything, Consul). - Return(localTest.consulInstalled, chkErr) mockClient.On("CheckSecretEngineInstalled", mock.Anything, mock.Anything, mock.Anything). Return(false, chkErr) mockClient.On("EnableKVSecretEngine", mock.Anything, localTest.mountPoint, kvVersion). Return(enableClientErr) mockClient.On("EnableKVSecretEngine", mock.Anything, mock.Anything, mock.Anything). Return(unsupportedEngTypeErr) - mockClient.On("EnableConsulSecretEngine", mock.Anything, localTest.mountPoint, defaultConsulTokenLeaseTtl). - Return(enableClientErr) - mockClient.On("EnableConsulSecretEngine", mock.Anything, mock.Anything, mock.Anything). - Return(unsupportedEngTypeErr) err := New(localTest.mountPoint, localTest.engineType). Enable(localTest.rootToken, lc, mockClient) diff --git a/internal/security/secretstore/secure-messagebus.go b/internal/security/secretstore/secure-messagebus.go index dae95ba9dd..efa862b2fa 100644 --- a/internal/security/secretstore/secure-messagebus.go +++ b/internal/security/secretstore/secure-messagebus.go @@ -21,7 +21,7 @@ import ( "os" "text/template" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" "github.com/edgexfoundry/edgex-go/internal/security/secretstore/config" ) diff --git a/internal/security/secretstore/secure-messagebus_test.go b/internal/security/secretstore/secure-messagebus_test.go index 3f0d011224..84e9dbe657 100644 --- a/internal/security/secretstore/secure-messagebus_test.go +++ b/internal/security/secretstore/secure-messagebus_test.go @@ -19,7 +19,7 @@ import ( "os" "testing" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/security/secretstore/tokenfilewriter/tokenfilewriter.go b/internal/security/secretstore/tokenfilewriter/tokenfilewriter.go index 48ea423789..21fb4ec91a 100644 --- a/internal/security/secretstore/tokenfilewriter/tokenfilewriter.go +++ b/internal/security/secretstore/tokenfilewriter/tokenfilewriter.go @@ -1,5 +1,6 @@ /******************************************************************************* * Copyright 2021 Intel Corporation + * Copyright (C) 2024 IOTech Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -24,16 +25,11 @@ import ( "runtime" "strings" - "github.com/edgexfoundry/edgex-go/internal/security/secretstore/secretsengine" "github.com/edgexfoundry/edgex-go/internal/security/secretstore/tokencreatable" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/fileioperformer" - "github.com/edgexfoundry/go-mod-secrets/v3/secrets" -) - -const ( - consulSecretsEngineOpsPolicyName = "consul_secrets_engine_management_policy" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/fileioperformer" + "github.com/edgexfoundry/go-mod-secrets/v4/secrets" ) // TokenFileWriter is a mechanism to generates a token and writes it into a file specified by configuration @@ -112,56 +108,6 @@ func (w TokenFileWriter) CreateAndWrite(rootToken string, tokenFilePath string, return revokeTokenFunc, nil } -// CreateMgmtTokenForConsulSecretsEngine creates a new Vault token that -// allows the Consul bootstrapper to operate on managing Vault's Consul secrets engine related APIs (see reference: -// https://www.vaultproject.io/api-docs/secret/consul). The created Vault token is meant for serving -// the purpose of Consul ACL's bootstrapping as part of securing Consul process. -// -// Requires a root token to create, and returns data/information containing the token, -// keeping the token without revoking it and hence always returning nil RevokeFunc in order to conform to the -// input type tokencreatable.CreateTokenFunc as its function argument; -// this function returns non-nil error if anything goes wrong during the creation. -// this function conforms to the signature of the tokencreatable.CreateTokenFunc type -// so that it can be passed to CreateAndWrite() -func (w TokenFileWriter) CreateMgmtTokenForConsulSecretsEngine(rootToken string) (map[string]interface{}, - tokencreatable.RevokeFunc, error) { - consulSecretsEngineOpsPolicyDocument := ` -# allow to configure the access information for Consul -path "` + secretsengine.ConsulSecretEngineMountPoint + `/config/access" { - capabilities = ["create", "update"] -} - -# allow to create, update, read, list, or delete the Consul role definition -path "` + secretsengine.ConsulSecretEngineMountPoint + `/roles/*" { - capabilities = ["create", "read", "update", "delete", "list"] -} -` - - if err := w.secretClient.InstallPolicy(rootToken, - consulSecretsEngineOpsPolicyName, - consulSecretsEngineOpsPolicyDocument); err != nil { - return nil, nil, fmt.Errorf("failed to install Consul secrets engine operations policy: %v", err) - } - - // setup new token's properties - tokenParams := make(map[string]interface{}) - tokenParams["type"] = "service" - // Vault prefixes "token" in front of display_name - tokenParams["display_name"] = "for Consul ACL bootstrap" - tokenParams["no_parent"] = true - tokenParams["period"] = "1h" - tokenParams["policies"] = []string{consulSecretsEngineOpsPolicyName} - tokenParams["meta"] = map[string]interface{}{ - "description": "Consul secrets engine management token", - } - response, err := w.secretClient.CreateToken(rootToken, tokenParams) - if err != nil { - return nil, nil, fmt.Errorf("failed to create token for Consul secrets engine operations: %v", err) - } - - return response, nil, nil -} - func getFunctionName(f interface{}) string { createTokenFuncName := runtime.FuncForPC(reflect.ValueOf(f).Pointer()).Name() // On runtime, this will get us something like: diff --git a/internal/security/secretstore/tokenfilewriter/tokenfilewriter_test.go b/internal/security/secretstore/tokenfilewriter/tokenfilewriter_test.go index 1950dc417b..94cbc7aa7f 100644 --- a/internal/security/secretstore/tokenfilewriter/tokenfilewriter_test.go +++ b/internal/security/secretstore/tokenfilewriter/tokenfilewriter_test.go @@ -16,20 +16,14 @@ package tokenfilewriter import ( - "errors" "os" - "os/user" - "path/filepath" - "strconv" "testing" - "time" - "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/fileioperformer" - "github.com/edgexfoundry/go-mod-secrets/v3/secrets/mocks" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/fileioperformer" + "github.com/edgexfoundry/go-mod-secrets/v4/secrets/mocks" ) var lc logger.LoggingClient @@ -46,138 +40,3 @@ func TestNewTokenFileWriter(t *testing.T) { tokenFileWriter := NewWriter(lc, sc, flOpener) require.NotEmpty(t, tokenFileWriter) } - -func TestCreateMgmtTokenForConsulSecretsEngine(t *testing.T) { - createTokenResult := getCreateTokenResultStub() - - testRootToken := "testRootToken" - testInstallPolicyErr := errors.New("install policy error") - testCreateTokenErr := errors.New("create token error") - - tests := []struct { - name string - installPolicyError error - createTokenError error - }{ - {"Ok:create token ok", nil, nil}, - {"Bad:install policy error", testInstallPolicyErr, nil}, - {"Bad:create token error", nil, testCreateTokenErr}, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - // setup mock secretclient and expected return values for this test - secretClient := &mocks.SecretStoreClient{} - - secretClient.On("InstallPolicy", testRootToken, - consulSecretsEngineOpsPolicyName, mock.Anything). - Return(test.installPolicyError).Once() - - secretClient.On("CreateToken", testRootToken, mock.Anything). - Return(createTokenResult, test.createTokenError).Once() - - token, _, err := NewWriter(lc, secretClient, flOpener). - CreateMgmtTokenForConsulSecretsEngine(testRootToken) - - if test.installPolicyError != nil || test.createTokenError != nil { - require.Error(t, err) - } else { - require.NoError(t, err) - require.Equal(t, "createdTestToken", token["auth"].(map[string]interface{})["client_token"]) - secretClient.AssertExpectations(t) - } - }) - } -} - -func TestCreateAndWriteForConsulSecretEngine(t *testing.T) { - createTokenResult := getCreateTokenResultStub() - - testInstallPolicyErr := errors.New("install policy error") - testCreateTokenErr := errors.New("create token error") - testTokenFileDir := "test" - testRootToken := "testRootToken" - - tests := []struct { - name string - rootToken string - installPolicyCallErr error - createTokenCallErr error - }{ - {"Ok:CreateAndWrite with client call ok", testRootToken, nil, nil}, - {"Bad:CreateAndWrite with empty token", "", nil, nil}, - {"Bad:CreateAndWrite with install policy call error", testRootToken, testInstallPolicyErr, nil}, - {"Bad:CreateAndWrite with create token call error", testRootToken, nil, testCreateTokenErr}, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - // setup mock secretclient and expected return values for this test - secretClient := &mocks.SecretStoreClient{} - - secretClient.On("InstallPolicy", testRootToken, - consulSecretsEngineOpsPolicyName, mock.Anything). - Return(test.installPolicyCallErr).Once() - - secretClient.On("CreateToken", testRootToken, mock.Anything). - Return(createTokenResult, test.createTokenCallErr).Once() - - testTokenFilePath := filepath.Join(testTokenFileDir, - "mgmt-token.json"+"_"+strconv.FormatInt(time.Now().UnixNano(), 10)) - fileWriter := NewWriter(lc, secretClient, flOpener) - _, err := fileWriter.CreateAndWrite(test.rootToken, testTokenFilePath, - fileWriter.CreateMgmtTokenForConsulSecretsEngine) - defer func() { - _ = os.RemoveAll(filepath.Dir(testTokenFilePath)) - }() - - expectError := test.installPolicyCallErr != nil || - test.createTokenCallErr != nil || - len(test.rootToken) == 0 - - if expectError { - require.Error(t, err) - } else { - require.NoError(t, err) - require.FileExists(t, testTokenFilePath) - } - }) - } -} - -func TestFileWriteErrorForConsulSecretEngine(t *testing.T) { - curUser, _ := user.Current() - if curUser != nil && curUser.Uid == "0" { - // it is root user then we skip this test as root can have permission to write everything - t.Log("Skipping this test as it is running as root user") - t.Skip() - } - - createTokenResult := getCreateTokenResultStub() - - secretClient := &mocks.SecretStoreClient{} - testRootToken := "testRootToken" - - secretClient.On("InstallPolicy", testRootToken, - consulSecretsEngineOpsPolicyName, mock.Anything). - Return(nil).Once() - - secretClient.On("CreateToken", testRootToken, mock.Anything). - Return(createTokenResult, nil).Once() - - // literally set to the /root/ directory so that there is no write permission - // as only the root user can perform this - testTokenFileDir := "/root/test" - testTokenFilePath := filepath.Join(testTokenFileDir, "mgmt-token.json") - fileWriter := NewWriter(lc, secretClient, flOpener) - _, err := fileWriter.CreateAndWrite(testRootToken, testTokenFilePath, - fileWriter.CreateMgmtTokenForConsulSecretsEngine) - require.Error(t, err) -} - -func getCreateTokenResultStub() map[string]interface{} { - createTokenResult := make(map[string]interface{}) - createTokenResult["auth"] = make(map[string]interface{}) - createTokenResult["auth"].(map[string]interface{})["client_token"] = "createdTestToken" - return createTokenResult -} diff --git a/internal/security/secretstore/tokenmaintenance.go b/internal/security/secretstore/tokenmaintenance.go index f6fed2c484..1372307310 100644 --- a/internal/security/secretstore/tokenmaintenance.go +++ b/internal/security/secretstore/tokenmaintenance.go @@ -36,9 +36,9 @@ For Fuji.DOT/Geneva, all root tokens will be revoked. import ( "github.com/edgexfoundry/edgex-go/internal/security/secretstore/tokencreatable" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" - "github.com/edgexfoundry/go-mod-secrets/v3/secrets" + "github.com/edgexfoundry/go-mod-secrets/v4/secrets" ) type TokenMaintenance struct { diff --git a/internal/security/secretstore/tokenmaintenance_test.go b/internal/security/secretstore/tokenmaintenance_test.go index 95ff599caf..6511cdcf79 100644 --- a/internal/security/secretstore/tokenmaintenance_test.go +++ b/internal/security/secretstore/tokenmaintenance_test.go @@ -17,14 +17,14 @@ package secretstore import ( "testing" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" "github.com/stretchr/testify/require" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/types" - "github.com/edgexfoundry/go-mod-secrets/v3/secrets/mocks" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/types" + "github.com/edgexfoundry/go-mod-secrets/v4/secrets/mocks" ) func TestCreateTokenIssuingToken(t *testing.T) { diff --git a/internal/security/secretstore/tokenprovider.go b/internal/security/secretstore/tokenprovider.go index 50790ac2fe..7349a7eacf 100644 --- a/internal/security/secretstore/tokenprovider.go +++ b/internal/security/secretstore/tokenprovider.go @@ -23,7 +23,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/secretstore/config" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" ) const OneShotProvider = "oneshot" diff --git a/internal/security/secretstore/tokenprovider_linux_test.go b/internal/security/secretstore/tokenprovider_linux_test.go index 85a5dd4918..13efab3fd8 100644 --- a/internal/security/secretstore/tokenprovider_linux_test.go +++ b/internal/security/secretstore/tokenprovider_linux_test.go @@ -26,7 +26,7 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/secretstore/config" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" "github.com/stretchr/testify/assert" ) diff --git a/internal/security/secretstore/tokenprovider_test.go b/internal/security/secretstore/tokenprovider_test.go index 62faa32717..bab07cb4e7 100644 --- a/internal/security/secretstore/tokenprovider_test.go +++ b/internal/security/secretstore/tokenprovider_test.go @@ -23,7 +23,7 @@ import ( "os/exec" "testing" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" "github.com/stretchr/testify/require" "github.com/stretchr/testify/mock" diff --git a/internal/security/secretstore/vmkencryption.go b/internal/security/secretstore/vmkencryption.go index 964b6c0e91..0df02540d5 100644 --- a/internal/security/secretstore/vmkencryption.go +++ b/internal/security/secretstore/vmkencryption.go @@ -18,8 +18,9 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/kdf" "github.com/edgexfoundry/edgex-go/internal/security/pipedhexreader" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/fileioperformer" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/types" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/fileioperformer" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/types" + "github.com/edgexfoundry/go-mod-secrets/v4/secrets" ) /* @@ -27,13 +28,13 @@ import ( THE FOLLOWING DISCLAIMER IS REQUIRED TO BE CARRIED WITH THE BELOW CODE DO NOT REMOVE EXCEPT BY PERMISSION OF THE AUTHOR -Vault Master Key Encryption Feature +OpenBao Master Key Encryption Feature -The purpose of this feature is to provide a secure way to unlock Vault -without requiring human intervention to supply the Vault Master Key. +The purpose of this feature is to provide a secure way to unlock OpenBao +without requiring human intervention to supply the OpenBao Master Key. This feature requires a sufficiently secure source of randomness in order -to unlock the Vault. This randomness should have at least 256 bits of entropy +to unlock the Openbao. This randomness should have at least 256 bits of entropy and be backed by hardware secure storage. If using a TPM, the secret should be bound to platform configuration registers to attest the system state. @@ -187,16 +188,16 @@ func (v *VMKEncryption) DecryptInitResponse(initResp *types.InitResponse) error // gcmEncryptKeyShare encrypts each key share with a unique key // from the key derivation function based on passing the info -// string vault0, vault1, ... et cetera to the KDF. +// string secretstore, secretstore, ... et cetera to the KDF. func (v *VMKEncryption) gcmEncryptKeyShare(keyShare []byte, counter int) ([]byte, []byte, error) { defer wipeKey(keyShare) // wipe original keyShare on exit - info := fmt.Sprintf("vault%d", counter) + info := fmt.Sprintf("secretstore%d", counter) key, err := v.kdf.DeriveKey(v.ikm, aesKeyLength, info) if err != nil { - return nil, nil, fmt.Errorf("failed to derive encryption key for vault master key share %w", err) + return nil, nil, fmt.Errorf("failed to derive encryption key for %s master key share %w", secrets.DefaultSecretStore, err) } defer wipeKey(key) // wipe encryption key on exit @@ -223,16 +224,16 @@ func (v *VMKEncryption) gcmEncryptKeyShare(keyShare []byte, counter int) ([]byte // gcmDecryptKeyShare decrypts each key share with a unique key // from the key derivation function based on passing the info -// string vault0, vault1, ... et cetera to the KDF. +// string secretstore0, secretstore1, ... et cetera to the KDF. func (v *VMKEncryption) gcmDecryptKeyShare(keyShare []byte, nonce []byte, counter int) ([]byte, error) { defer wipeKey(keyShare) // wipe original (encrypted) key share on exit (not technically needed) - info := fmt.Sprintf("vault%d", counter) + info := fmt.Sprintf("secretstore%d", counter) key, err := v.kdf.DeriveKey(v.ikm, aesKeyLength, info) if err != nil { - return nil, fmt.Errorf("failed to derive encryption key for vault master key share %w", err) + return nil, fmt.Errorf("failed to derive encryption key for %s master key share %w", secrets.DefaultSecretStore, err) } defer wipeKey(key) // wipe encryption key on exit diff --git a/internal/security/secretstore/vmkencryption_test.go b/internal/security/secretstore/vmkencryption_test.go index 7a3cb90972..1ad7f6c4fe 100644 --- a/internal/security/secretstore/vmkencryption_test.go +++ b/internal/security/secretstore/vmkencryption_test.go @@ -12,9 +12,9 @@ import ( . "github.com/edgexfoundry/edgex-go/internal/security/kdf/mocks" . "github.com/edgexfoundry/edgex-go/internal/security/pipedhexreader/mocks" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/types" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/types" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/fileioperformer/mocks" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/fileioperformer/mocks" "github.com/stretchr/testify/require" ) @@ -46,8 +46,8 @@ func TestVMKEncryption(t *testing.T) { pipedHexReader := &MockPipedHexReader{} pipedHexReader.On("ReadHexBytesFromExe", "/bin/myikm").Return(fakeIkm, nil) kdf := &MockKeyDeriver{} - kdf.On("DeriveKey", make([]byte, 512), uint(32), "vault0").Return(make([]byte, 32), nil) - kdf.On("DeriveKey", make([]byte, 512), uint(32), "vault1").Return(make([]byte, 32), nil) + kdf.On("DeriveKey", make([]byte, 512), uint(32), "secretstore0").Return(make([]byte, 32), nil) + kdf.On("DeriveKey", make([]byte, 512), uint(32), "secretstore1").Return(make([]byte, 32), nil) initialInitResp := types.InitResponse{ Keys: []string{"aabbcc", "ddeeff"}, KeysBase64: []string{"qrvM", "3e7/"}, diff --git a/internal/security/spiffetokenprovider/config/config.go b/internal/security/spiffetokenprovider/config/config.go index 507cad331e..cae47b4964 100644 --- a/internal/security/spiffetokenprovider/config/config.go +++ b/internal/security/spiffetokenprovider/config/config.go @@ -17,7 +17,7 @@ package config import ( fileProviderConfig "github.com/edgexfoundry/edgex-go/internal/security/fileprovider/config" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" ) // SpiffeInfo contains information for Spiffe configuration diff --git a/internal/security/spiffetokenprovider/container/config.go b/internal/security/spiffetokenprovider/container/config.go index 7de6e07cac..dcb0088663 100644 --- a/internal/security/spiffetokenprovider/container/config.go +++ b/internal/security/spiffetokenprovider/container/config.go @@ -19,7 +19,7 @@ package container import ( "github.com/edgexfoundry/edgex-go/internal/security/spiffetokenprovider/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) // ConfigurationName contains the name of the config.ConfigurationStruct implementation in the DIC. diff --git a/internal/security/spiffetokenprovider/init.go b/internal/security/spiffetokenprovider/init.go index 7960f568d0..a9f9d1d817 100644 --- a/internal/security/spiffetokenprovider/init.go +++ b/internal/security/spiffetokenprovider/init.go @@ -30,28 +30,28 @@ import ( "sync" "time" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/environment" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/secret" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/environment" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/secret" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" "github.com/spiffe/go-spiffe/v2/spiffeid" "github.com/spiffe/go-spiffe/v2/spiffetls/tlsconfig" "github.com/spiffe/go-spiffe/v2/workloadapi" "github.com/edgexfoundry/edgex-go/internal" "github.com/edgexfoundry/edgex-go/internal/security/spiffetokenprovider/container" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/authtokenloader" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/token/fileioperformer" - "github.com/edgexfoundry/go-mod-secrets/v3/pkg/types" - "github.com/edgexfoundry/go-mod-secrets/v3/secrets" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/authtokenloader" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/token/fileioperformer" + "github.com/edgexfoundry/go-mod-secrets/v4/pkg/types" + "github.com/edgexfoundry/go-mod-secrets/v4/secrets" ) const ( diff --git a/internal/security/spiffetokenprovider/main.go b/internal/security/spiffetokenprovider/main.go index c2408b6a42..13910e933e 100644 --- a/internal/security/spiffetokenprovider/main.go +++ b/internal/security/spiffetokenprovider/main.go @@ -21,14 +21,14 @@ import ( "github.com/edgexfoundry/edgex-go/internal/security/spiffetokenprovider/config" "github.com/edgexfoundry/edgex-go/internal/security/spiffetokenprovider/container" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/flags" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/flags" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/interfaces" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) func Main(ctx context.Context, cancel context.CancelFunc) { diff --git a/internal/security/spiffetokenprovider/maketoken.go b/internal/security/spiffetokenprovider/maketoken.go index a4f39ea18c..471543f96e 100644 --- a/internal/security/spiffetokenprovider/maketoken.go +++ b/internal/security/spiffetokenprovider/maketoken.go @@ -23,8 +23,8 @@ import ( securityCommon "github.com/edgexfoundry/edgex-go/internal/security/common" fileProviderConfig "github.com/edgexfoundry/edgex-go/internal/security/fileprovider/config" "github.com/edgexfoundry/edgex-go/internal/security/secretstore" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-secrets/v3/secrets" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-secrets/v4/secrets" ) func makeToken(serviceName string, diff --git a/internal/support/cronscheduler/application/action/devicecontrol.go b/internal/support/cronscheduler/application/action/devicecontrol.go index 03c4127724..532be8bcb6 100644 --- a/internal/support/cronscheduler/application/action/devicecontrol.go +++ b/internal/support/cronscheduler/application/action/devicecontrol.go @@ -9,10 +9,10 @@ import ( "context" "encoding/json" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) func issueSetCommand(dic *di.Container, action models.DeviceControlAction) (string, errors.EdgeX) { diff --git a/internal/support/cronscheduler/application/action/edgexmessagebus.go b/internal/support/cronscheduler/application/action/edgexmessagebus.go index 331c4f1281..b81d85e2e8 100644 --- a/internal/support/cronscheduler/application/action/edgexmessagebus.go +++ b/internal/support/cronscheduler/application/action/edgexmessagebus.go @@ -8,12 +8,12 @@ package action import ( "context" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" - "github.com/edgexfoundry/go-mod-messaging/v3/pkg/types" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" + "github.com/edgexfoundry/go-mod-messaging/v4/pkg/types" ) func publishEdgeXMessageBus(dic *di.Container, action models.EdgeXMessageBusAction) errors.EdgeX { diff --git a/internal/support/cronscheduler/application/action/gocron.go b/internal/support/cronscheduler/application/action/gocron.go index e62805e018..e9fa8ed4a7 100644 --- a/internal/support/cronscheduler/application/action/gocron.go +++ b/internal/support/cronscheduler/application/action/gocron.go @@ -11,14 +11,14 @@ import ( "github.com/go-co-op/gocron/v2" - bootstrapInterfaces "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/secret" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/interfaces" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapInterfaces "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/interfaces" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/secret" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/interfaces" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) func ToGocronJobDef(def models.ScheduleDef) (gocron.JobDefinition, errors.EdgeX) { diff --git a/internal/support/cronscheduler/application/action/rest.go b/internal/support/cronscheduler/application/action/rest.go index fc14f5d836..aa754809d3 100644 --- a/internal/support/cronscheduler/application/action/rest.go +++ b/internal/support/cronscheduler/application/action/rest.go @@ -11,11 +11,11 @@ import ( "net/http" "strconv" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/interfaces" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/interfaces" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" pkgUtils "github.com/edgexfoundry/edgex-go/internal/pkg/utils" ) diff --git a/internal/support/cronscheduler/application/scheduleactionrecord.go b/internal/support/cronscheduler/application/scheduleactionrecord.go index 045156fc28..89f4ca5653 100644 --- a/internal/support/cronscheduler/application/scheduleactionrecord.go +++ b/internal/support/cronscheduler/application/scheduleactionrecord.go @@ -14,12 +14,12 @@ import ( "github.com/robfig/cron/v3" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/edgexfoundry/edgex-go/internal/pkg/correlation" "github.com/edgexfoundry/edgex-go/internal/pkg/utils" diff --git a/internal/support/cronscheduler/application/scheduleactionrecord_test.go b/internal/support/cronscheduler/application/scheduleactionrecord_test.go index e51ede71b4..896b2a3f63 100644 --- a/internal/support/cronscheduler/application/scheduleactionrecord_test.go +++ b/internal/support/cronscheduler/application/scheduleactionrecord_test.go @@ -15,10 +15,10 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/edgexfoundry/edgex-go/internal/support/cronscheduler/config" "github.com/edgexfoundry/edgex-go/internal/support/cronscheduler/container" diff --git a/internal/support/cronscheduler/application/schedulejob.go b/internal/support/cronscheduler/application/schedulejob.go index b73ceae5df..a90eb2927c 100644 --- a/internal/support/cronscheduler/application/schedulejob.go +++ b/internal/support/cronscheduler/application/schedulejob.go @@ -11,12 +11,12 @@ import ( "github.com/edgexfoundry/edgex-go/internal/pkg/utils" "time" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/edgexfoundry/edgex-go/internal/pkg/correlation" "github.com/edgexfoundry/edgex-go/internal/support/cronscheduler/container" diff --git a/internal/support/cronscheduler/config/config.go b/internal/support/cronscheduler/config/config.go index 547da8f6bd..27c4dae0bc 100644 --- a/internal/support/cronscheduler/config/config.go +++ b/internal/support/cronscheduler/config/config.go @@ -6,7 +6,7 @@ package config import ( - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" ) // ConfigurationStruct contains the configuration properties for the Support Cron Scheduler Service diff --git a/internal/support/cronscheduler/container/config.go b/internal/support/cronscheduler/container/config.go index ba2595e54f..c8062cc7b3 100644 --- a/internal/support/cronscheduler/container/config.go +++ b/internal/support/cronscheduler/container/config.go @@ -6,7 +6,7 @@ package container import ( - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" "github.com/edgexfoundry/edgex-go/internal/support/cronscheduler/config" ) diff --git a/internal/support/cronscheduler/container/database.go b/internal/support/cronscheduler/container/database.go index 2e3320b095..21eb8eb333 100644 --- a/internal/support/cronscheduler/container/database.go +++ b/internal/support/cronscheduler/container/database.go @@ -8,7 +8,7 @@ package container import ( "github.com/edgexfoundry/edgex-go/internal/support/cronscheduler/infrastructure/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) // DBClientInterfaceName contains the name of the interfaces.DBClient implementation in the DIC. diff --git a/internal/support/cronscheduler/container/scheduler.go b/internal/support/cronscheduler/container/scheduler.go index bcb3109389..3f6ecfb370 100644 --- a/internal/support/cronscheduler/container/scheduler.go +++ b/internal/support/cronscheduler/container/scheduler.go @@ -6,7 +6,7 @@ package container import ( - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" "github.com/edgexfoundry/edgex-go/internal/support/cronscheduler/infrastructure/interfaces" ) diff --git a/internal/support/cronscheduler/controller/http/scheduleactionrecord.go b/internal/support/cronscheduler/controller/http/scheduleactionrecord.go index 4d710ba80a..c85743e60a 100644 --- a/internal/support/cronscheduler/controller/http/scheduleactionrecord.go +++ b/internal/support/cronscheduler/controller/http/scheduleactionrecord.go @@ -11,10 +11,10 @@ import ( "github.com/labstack/echo/v4" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" "github.com/edgexfoundry/edgex-go/internal/io" "github.com/edgexfoundry/edgex-go/internal/pkg" diff --git a/internal/support/cronscheduler/controller/http/scheduleactionrecord_test.go b/internal/support/cronscheduler/controller/http/scheduleactionrecord_test.go index 6435912d99..657ab53438 100644 --- a/internal/support/cronscheduler/controller/http/scheduleactionrecord_test.go +++ b/internal/support/cronscheduler/controller/http/scheduleactionrecord_test.go @@ -18,13 +18,13 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/edgexfoundry/edgex-go/internal/support/cronscheduler/container" csMock "github.com/edgexfoundry/edgex-go/internal/support/cronscheduler/infrastructure/interfaces/mocks" diff --git a/internal/support/cronscheduler/controller/http/schedulejob.go b/internal/support/cronscheduler/controller/http/schedulejob.go index 1027f80955..bc9e280533 100644 --- a/internal/support/cronscheduler/controller/http/schedulejob.go +++ b/internal/support/cronscheduler/controller/http/schedulejob.go @@ -11,14 +11,14 @@ import ( "github.com/labstack/echo/v4" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - requestDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + requestDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/edgexfoundry/edgex-go/internal/io" "github.com/edgexfoundry/edgex-go/internal/pkg" diff --git a/internal/support/cronscheduler/controller/http/schedulejob_test.go b/internal/support/cronscheduler/controller/http/schedulejob_test.go index 552934c9ee..8270f0c9b0 100644 --- a/internal/support/cronscheduler/controller/http/schedulejob_test.go +++ b/internal/support/cronscheduler/controller/http/schedulejob_test.go @@ -19,17 +19,17 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/edgexfoundry/edgex-go/internal/support/cronscheduler/config" "github.com/edgexfoundry/edgex-go/internal/support/cronscheduler/container" diff --git a/internal/support/cronscheduler/controller/http/utils_test.go b/internal/support/cronscheduler/controller/http/utils_test.go index 51d03a20c7..32606a9897 100644 --- a/internal/support/cronscheduler/controller/http/utils_test.go +++ b/internal/support/cronscheduler/controller/http/utils_test.go @@ -8,8 +8,8 @@ package http import ( "net/http" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" ) const ( diff --git a/internal/support/cronscheduler/infrastructure/interfaces/SchedulerManager.go b/internal/support/cronscheduler/infrastructure/interfaces/SchedulerManager.go index 733c041b89..bafc12e12c 100644 --- a/internal/support/cronscheduler/infrastructure/interfaces/SchedulerManager.go +++ b/internal/support/cronscheduler/infrastructure/interfaces/SchedulerManager.go @@ -6,8 +6,8 @@ package interfaces import ( - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) type SchedulerManager interface { diff --git a/internal/support/cronscheduler/infrastructure/interfaces/db.go b/internal/support/cronscheduler/infrastructure/interfaces/db.go index bbb5b22095..7b7c045d51 100644 --- a/internal/support/cronscheduler/infrastructure/interfaces/db.go +++ b/internal/support/cronscheduler/infrastructure/interfaces/db.go @@ -8,8 +8,8 @@ package interfaces import ( "context" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - model "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + model "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) type DBClient interface { diff --git a/internal/support/cronscheduler/infrastructure/interfaces/mocks/DBClient.go b/internal/support/cronscheduler/infrastructure/interfaces/mocks/DBClient.go index 3a10e342f5..ab23e83c86 100644 --- a/internal/support/cronscheduler/infrastructure/interfaces/mocks/DBClient.go +++ b/internal/support/cronscheduler/infrastructure/interfaces/mocks/DBClient.go @@ -5,11 +5,11 @@ package mocks import ( context "context" - errors "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + errors "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" mock "github.com/stretchr/testify/mock" - models "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + models "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) // DBClient is an autogenerated mock type for the DBClient type diff --git a/internal/support/cronscheduler/infrastructure/interfaces/mocks/SchedulerManager.go b/internal/support/cronscheduler/infrastructure/interfaces/mocks/SchedulerManager.go index 84ecb02bb4..287e642617 100644 --- a/internal/support/cronscheduler/infrastructure/interfaces/mocks/SchedulerManager.go +++ b/internal/support/cronscheduler/infrastructure/interfaces/mocks/SchedulerManager.go @@ -3,11 +3,11 @@ package mocks import ( - errors "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + errors "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" mock "github.com/stretchr/testify/mock" - models "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + models "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) // SchedulerManager is an autogenerated mock type for the SchedulerManager type diff --git a/internal/support/cronscheduler/infrastructure/manager.go b/internal/support/cronscheduler/infrastructure/manager.go index 0a5dc3c401..c40cfce1ec 100644 --- a/internal/support/cronscheduler/infrastructure/manager.go +++ b/internal/support/cronscheduler/infrastructure/manager.go @@ -14,12 +14,12 @@ import ( "github.com/go-co-op/gocron/v2" "github.com/google/uuid" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - bootstrapInterfaces "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + bootstrapInterfaces "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/interfaces" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/edgexfoundry/edgex-go/internal/pkg/correlation" "github.com/edgexfoundry/edgex-go/internal/support/cronscheduler/application/action" diff --git a/internal/support/cronscheduler/infrastructure/manager_test.go b/internal/support/cronscheduler/infrastructure/manager_test.go index ce2db170fb..1f725f037c 100644 --- a/internal/support/cronscheduler/infrastructure/manager_test.go +++ b/internal/support/cronscheduler/infrastructure/manager_test.go @@ -9,12 +9,12 @@ import ( "github.com/stretchr/testify/assert" "testing" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/edgexfoundry/edgex-go/internal/support/cronscheduler/config" "github.com/edgexfoundry/edgex-go/internal/support/cronscheduler/container" diff --git a/internal/support/cronscheduler/init.go b/internal/support/cronscheduler/init.go index 11760f84e9..b700e01ee3 100644 --- a/internal/support/cronscheduler/init.go +++ b/internal/support/cronscheduler/init.go @@ -21,9 +21,9 @@ import ( "github.com/labstack/echo/v4" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" "github.com/edgexfoundry/edgex-go/internal/support/cronscheduler/application" "github.com/edgexfoundry/edgex-go/internal/support/cronscheduler/container" diff --git a/internal/support/cronscheduler/main.go b/internal/support/cronscheduler/main.go index db22664973..b41f96c384 100644 --- a/internal/support/cronscheduler/main.go +++ b/internal/support/cronscheduler/main.go @@ -20,14 +20,14 @@ import ( "github.com/labstack/echo/v4" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/flags" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/handlers" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/flags" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/handlers" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/interfaces" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" "github.com/edgexfoundry/edgex-go" pkgHandlers "github.com/edgexfoundry/edgex-go/internal/pkg/bootstrap/handlers" diff --git a/internal/support/cronscheduler/router.go b/internal/support/cronscheduler/router.go index b2f0f4b176..0e315d4a5b 100644 --- a/internal/support/cronscheduler/router.go +++ b/internal/support/cronscheduler/router.go @@ -8,11 +8,11 @@ package cronscheduler import ( "github.com/labstack/echo/v4" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/controller" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/handlers" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/controller" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/handlers" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" "github.com/edgexfoundry/edgex-go" schedulerController "github.com/edgexfoundry/edgex-go/internal/support/cronscheduler/controller/http" diff --git a/internal/support/notifications/application/channel/container.go b/internal/support/notifications/application/channel/container.go index c811c70b3e..47848dc5f2 100644 --- a/internal/support/notifications/application/channel/container.go +++ b/internal/support/notifications/application/channel/container.go @@ -6,7 +6,7 @@ package channel import ( - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) // RESTSenderName contains the name of the channel.RESTSender implementation in the DIC. diff --git a/internal/support/notifications/application/channel/email.go b/internal/support/notifications/application/channel/email.go index f6893061e4..ac1d6b13a1 100644 --- a/internal/support/notifications/application/channel/email.go +++ b/internal/support/notifications/application/channel/email.go @@ -16,9 +16,9 @@ import ( "github.com/edgexfoundry/edgex-go/internal/support/notifications/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" ) const ( diff --git a/internal/support/notifications/application/channel/mocks/Sender.go b/internal/support/notifications/application/channel/mocks/Sender.go index 83b70c6376..7603102f93 100644 --- a/internal/support/notifications/application/channel/mocks/Sender.go +++ b/internal/support/notifications/application/channel/mocks/Sender.go @@ -3,10 +3,10 @@ package mocks import ( - errors "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + errors "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" mock "github.com/stretchr/testify/mock" - models "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + models "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) // Sender is an autogenerated mock type for the Sender type diff --git a/internal/support/notifications/application/channel/sender.go b/internal/support/notifications/application/channel/sender.go index 9d1bb5ba84..dff8686629 100644 --- a/internal/support/notifications/application/channel/sender.go +++ b/internal/support/notifications/application/channel/sender.go @@ -9,14 +9,14 @@ import ( "github.com/edgexfoundry/edgex-go/internal/pkg/utils" notificationContainer "github.com/edgexfoundry/edgex-go/internal/support/notifications/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - bootstrapInterfaces "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/secret" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/interfaces" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + bootstrapInterfaces "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/interfaces" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/secret" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/interfaces" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) // Sender abstracts the notification sending via specified channel diff --git a/internal/support/notifications/application/distributioncoordinator.go b/internal/support/notifications/application/distributioncoordinator.go index f95bcf1774..6c5ec91389 100644 --- a/internal/support/notifications/application/distributioncoordinator.go +++ b/internal/support/notifications/application/distributioncoordinator.go @@ -7,11 +7,11 @@ package application import ( "github.com/edgexfoundry/edgex-go/internal/support/notifications/container" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) // distribute distributes notification to associate subscriptions diff --git a/internal/support/notifications/application/notification.go b/internal/support/notifications/application/notification.go index 73f09cc693..26e15c8760 100644 --- a/internal/support/notifications/application/notification.go +++ b/internal/support/notifications/application/notification.go @@ -15,11 +15,11 @@ import ( "github.com/edgexfoundry/edgex-go/internal/pkg/utils" "github.com/edgexfoundry/edgex-go/internal/support/notifications/container" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/google/uuid" ) diff --git a/internal/support/notifications/application/notification_test.go b/internal/support/notifications/application/notification_test.go index 557ad08a07..632365cef1 100644 --- a/internal/support/notifications/application/notification_test.go +++ b/internal/support/notifications/application/notification_test.go @@ -14,10 +14,10 @@ import ( "github.com/edgexfoundry/edgex-go/internal/support/notifications/config" "github.com/edgexfoundry/edgex-go/internal/support/notifications/container" dbMock "github.com/edgexfoundry/edgex-go/internal/support/notifications/infrastructure/interfaces/mocks" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) func TestPurgeNotification(t *testing.T) { diff --git a/internal/support/notifications/application/send.go b/internal/support/notifications/application/send.go index a6ef112a0e..8ab999a9b9 100644 --- a/internal/support/notifications/application/send.go +++ b/internal/support/notifications/application/send.go @@ -14,11 +14,11 @@ import ( "github.com/edgexfoundry/edgex-go/internal/support/notifications/config" "github.com/edgexfoundry/edgex-go/internal/support/notifications/container" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) // firstSend sends the notification and return the transmission diff --git a/internal/support/notifications/application/send_test.go b/internal/support/notifications/application/send_test.go index e02ef20a04..d009d7c4da 100644 --- a/internal/support/notifications/application/send_test.go +++ b/internal/support/notifications/application/send_test.go @@ -15,10 +15,10 @@ import ( notificationContainer "github.com/edgexfoundry/edgex-go/internal/support/notifications/container" dbMock "github.com/edgexfoundry/edgex-go/internal/support/notifications/infrastructure/interfaces/mocks" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/internal/support/notifications/application/subscription.go b/internal/support/notifications/application/subscription.go index aa02805719..e58b5784a5 100644 --- a/internal/support/notifications/application/subscription.go +++ b/internal/support/notifications/application/subscription.go @@ -14,13 +14,13 @@ import ( "github.com/edgexfoundry/edgex-go/internal/support/notifications/container" "github.com/edgexfoundry/edgex-go/internal/support/notifications/infrastructure/interfaces" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) // The AddSubscription function accepts the new Subscription model from the controller function diff --git a/internal/support/notifications/application/subscription_test.go b/internal/support/notifications/application/subscription_test.go index 6d745c9107..e622d3cdce 100644 --- a/internal/support/notifications/application/subscription_test.go +++ b/internal/support/notifications/application/subscription_test.go @@ -14,13 +14,13 @@ import ( "github.com/edgexfoundry/edgex-go/internal/support/notifications/container" dbMock "github.com/edgexfoundry/edgex-go/internal/support/notifications/infrastructure/interfaces/mocks" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/support/notifications/application/transmission.go b/internal/support/notifications/application/transmission.go index 320ccb2187..418ad7dc85 100644 --- a/internal/support/notifications/application/transmission.go +++ b/internal/support/notifications/application/transmission.go @@ -9,9 +9,9 @@ import ( "github.com/edgexfoundry/edgex-go/internal/pkg/utils" "github.com/edgexfoundry/edgex-go/internal/support/notifications/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" "github.com/google/uuid" ) diff --git a/internal/support/notifications/config/config.go b/internal/support/notifications/config/config.go index 6d9a3c5b3a..dafc2ef62a 100644 --- a/internal/support/notifications/config/config.go +++ b/internal/support/notifications/config/config.go @@ -17,7 +17,7 @@ package config import ( - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" ) type ConfigurationStruct struct { diff --git a/internal/support/notifications/container/config.go b/internal/support/notifications/container/config.go index 543c1d83f2..c7f255ac79 100644 --- a/internal/support/notifications/container/config.go +++ b/internal/support/notifications/container/config.go @@ -19,7 +19,7 @@ package container import ( "github.com/edgexfoundry/edgex-go/internal/support/notifications/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) // ConfigurationName contains the name of the config.ConfigurationStruct implementation in the DIC. diff --git a/internal/support/notifications/container/database.go b/internal/support/notifications/container/database.go index d56776fb16..0e607273e1 100644 --- a/internal/support/notifications/container/database.go +++ b/internal/support/notifications/container/database.go @@ -8,7 +8,7 @@ package container import ( "github.com/edgexfoundry/edgex-go/internal/support/notifications/infrastructure/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" ) // DBClientInterfaceName contains the name of the interfaces.DBClient implementation in the DIC. diff --git a/internal/support/notifications/controller/http/notification.go b/internal/support/notifications/controller/http/notification.go index 5744bd01ed..9606798492 100644 --- a/internal/support/notifications/controller/http/notification.go +++ b/internal/support/notifications/controller/http/notification.go @@ -17,14 +17,14 @@ import ( "github.com/edgexfoundry/edgex-go/internal/support/notifications/application" notificationContainer "github.com/edgexfoundry/edgex-go/internal/support/notifications/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - requestDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + requestDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" "github.com/labstack/echo/v4" ) diff --git a/internal/support/notifications/controller/http/notification_test.go b/internal/support/notifications/controller/http/notification_test.go index 30488ea33e..c7350d558a 100644 --- a/internal/support/notifications/controller/http/notification_test.go +++ b/internal/support/notifications/controller/http/notification_test.go @@ -16,15 +16,15 @@ import ( "github.com/edgexfoundry/edgex-go/internal/support/notifications/container" dbMock "github.com/edgexfoundry/edgex-go/internal/support/notifications/infrastructure/interfaces/mocks" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/labstack/echo/v4" "github.com/stretchr/testify/assert" diff --git a/internal/support/notifications/controller/http/subscription.go b/internal/support/notifications/controller/http/subscription.go index e0e33ce12c..c6394b40e7 100644 --- a/internal/support/notifications/controller/http/subscription.go +++ b/internal/support/notifications/controller/http/subscription.go @@ -16,13 +16,13 @@ import ( "github.com/edgexfoundry/edgex-go/internal/support/notifications/application" notificationContainer "github.com/edgexfoundry/edgex-go/internal/support/notifications/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - requestDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + requestDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" "github.com/labstack/echo/v4" ) diff --git a/internal/support/notifications/controller/http/subscription_test.go b/internal/support/notifications/controller/http/subscription_test.go index e29c990cc8..a255a4946b 100644 --- a/internal/support/notifications/controller/http/subscription_test.go +++ b/internal/support/notifications/controller/http/subscription_test.go @@ -17,18 +17,18 @@ import ( "github.com/edgexfoundry/edgex-go/internal/support/notifications/container" dbMock "github.com/edgexfoundry/edgex-go/internal/support/notifications/infrastructure/interfaces/mocks" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v3/config" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - - "github.com/edgexfoundry/go-mod-core-contracts/v3/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v4/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + + "github.com/edgexfoundry/go-mod-core-contracts/v4/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/requests" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/labstack/echo/v4" "github.com/stretchr/testify/assert" diff --git a/internal/support/notifications/controller/http/transmission.go b/internal/support/notifications/controller/http/transmission.go index c825ca9d25..2c57a0278d 100644 --- a/internal/support/notifications/controller/http/transmission.go +++ b/internal/support/notifications/controller/http/transmission.go @@ -15,12 +15,12 @@ import ( "github.com/edgexfoundry/edgex-go/internal/support/notifications/application" notificationContainer "github.com/edgexfoundry/edgex-go/internal/support/notifications/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" "github.com/labstack/echo/v4" ) diff --git a/internal/support/notifications/controller/http/transmission_test.go b/internal/support/notifications/controller/http/transmission_test.go index 7fd329d714..162e1f825d 100644 --- a/internal/support/notifications/controller/http/transmission_test.go +++ b/internal/support/notifications/controller/http/transmission_test.go @@ -15,13 +15,13 @@ import ( "github.com/edgexfoundry/edgex-go/internal/support/notifications/container" dbMock "github.com/edgexfoundry/edgex-go/internal/support/notifications/infrastructure/interfaces/mocks" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" - commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common" - responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses" - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" + commonDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/common" + responseDTO "github.com/edgexfoundry/go-mod-core-contracts/v4/dtos/responses" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" "github.com/labstack/echo/v4" "github.com/stretchr/testify/assert" diff --git a/internal/support/notifications/infrastructure/interfaces/db.go b/internal/support/notifications/infrastructure/interfaces/db.go index f43796206f..8b177947dc 100644 --- a/internal/support/notifications/infrastructure/interfaces/db.go +++ b/internal/support/notifications/infrastructure/interfaces/db.go @@ -6,8 +6,8 @@ package interfaces import ( - "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" - "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" + "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) type DBClient interface { diff --git a/internal/support/notifications/infrastructure/interfaces/mocks/DBClient.go b/internal/support/notifications/infrastructure/interfaces/mocks/DBClient.go index e5efd838ef..6290a9d1eb 100644 --- a/internal/support/notifications/infrastructure/interfaces/mocks/DBClient.go +++ b/internal/support/notifications/infrastructure/interfaces/mocks/DBClient.go @@ -3,11 +3,11 @@ package mocks import ( - errors "github.com/edgexfoundry/go-mod-core-contracts/v3/errors" + errors "github.com/edgexfoundry/go-mod-core-contracts/v4/errors" mock "github.com/stretchr/testify/mock" - models "github.com/edgexfoundry/go-mod-core-contracts/v3/models" + models "github.com/edgexfoundry/go-mod-core-contracts/v4/models" ) // DBClient is an autogenerated mock type for the DBClient type diff --git a/internal/support/notifications/init.go b/internal/support/notifications/init.go index 54506a9520..81e8721376 100644 --- a/internal/support/notifications/init.go +++ b/internal/support/notifications/init.go @@ -25,9 +25,9 @@ import ( "github.com/edgexfoundry/edgex-go/internal/support/notifications/application/channel" "github.com/edgexfoundry/edgex-go/internal/support/notifications/container" - bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" + bootstrapContainer "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" "github.com/labstack/echo/v4" ) diff --git a/internal/support/notifications/main.go b/internal/support/notifications/main.go index a9418de3a0..3ce887d36f 100644 --- a/internal/support/notifications/main.go +++ b/internal/support/notifications/main.go @@ -26,20 +26,20 @@ import ( "context" "os" - "github.com/edgexfoundry/go-mod-bootstrap/v3/config" + "github.com/edgexfoundry/go-mod-bootstrap/v4/config" "github.com/edgexfoundry/edgex-go" pkgHandlers "github.com/edgexfoundry/edgex-go/internal/pkg/bootstrap/handlers" notificationsConfig "github.com/edgexfoundry/edgex-go/internal/support/notifications/config" "github.com/edgexfoundry/edgex-go/internal/support/notifications/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/flags" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/handlers" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/interfaces" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/startup" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/flags" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/handlers" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/interfaces" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/startup" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" "github.com/labstack/echo/v4" ) diff --git a/internal/support/notifications/router.go b/internal/support/notifications/router.go index c00f8a6887..bdc5390c91 100644 --- a/internal/support/notifications/router.go +++ b/internal/support/notifications/router.go @@ -7,11 +7,11 @@ package notifications import ( "github.com/edgexfoundry/edgex-go" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/container" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/controller" - "github.com/edgexfoundry/go-mod-bootstrap/v3/bootstrap/handlers" - "github.com/edgexfoundry/go-mod-bootstrap/v3/di" - "github.com/edgexfoundry/go-mod-core-contracts/v3/common" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/container" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/controller" + "github.com/edgexfoundry/go-mod-bootstrap/v4/bootstrap/handlers" + "github.com/edgexfoundry/go-mod-bootstrap/v4/di" + "github.com/edgexfoundry/go-mod-core-contracts/v4/common" notificationsController "github.com/edgexfoundry/edgex-go/internal/support/notifications/controller/http" diff --git a/openapi/core-data.yaml b/openapi/core-data.yaml index 93daa20322..8f618a19b5 100644 --- a/openapi/core-data.yaml +++ b/openapi/core-data.yaml @@ -1887,13 +1887,13 @@ paths: MaxResultCount: 50000 Timeout: "5s" SecretStore: - Host: "edgex-vault" + Host: "edgex-secret-store" Port: 8200 Path: "v1/secret/edgex/core-data/" Protocol: "http" Namespace: "" RootCaCertPath: "" - ServerName: "edgex-vault" + ServerName: "edgex-secret-store" Authentication: AuthType: "X-Vault-Token" AuthToken: "" diff --git a/openapi/core-keeper.yaml b/openapi/core-keeper.yaml index 3202676ca8..ed3aaada56 100644 --- a/openapi/core-keeper.yaml +++ b/openapi/core-keeper.yaml @@ -860,13 +860,13 @@ paths: MaxResultCount: 50000 Timeout: 5000 SecretStore: - Host: "edgex-vault" + Host: "edgex-secret-store" Port: 8200 Path: "v1/secret/edgex/core-metadata/" Protocol: "http" Namespace: "" RootCaCertPath: "" - ServerName: "edgex-vault" + ServerName: "edgex-secret-store" Authentication: AuthType: "X-Vault-Token" AuthToken: "" diff --git a/openapi/core-metadata.yaml b/openapi/core-metadata.yaml index eb7db62f2e..99d50c1dc3 100644 --- a/openapi/core-metadata.yaml +++ b/openapi/core-metadata.yaml @@ -4231,13 +4231,13 @@ paths: MaxResultCount: 50000 Timeout: "5s" SecretStore: - Host: "edgex-vault" + Host: "edgex-secret-store" Port: 8200 Path: "v1/secret/edgex/core-metadata/" Protocol: "http" Namespace: "" RootCaCertPath: "" - ServerName: "edgex-vault" + ServerName: "edgex-secret-store" Authentication: AuthType: "X-Vault-Token" AuthToken: ""