diff --git a/.circleci/config.yml b/.circleci/config.yml index 13db096d3..54e711bdd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,13 +8,14 @@ jobs: test-sql-13-alpine: machine: image: ubuntu-2004:202107-02 + resource_class: medium + working_directory: ~/boundary steps: - checkout - run: command: | make test-sql POSTGRES_DOCKER_IMAGE_BASE=docker.mirror.hashicorp.services/postgres PG_DOCKER_TAG=13-alpine name: Run SQL PgTap Tests - working_directory: ~/boundary bundle-releases: docker: - image: docker.mirror.hashicorp.services/circleci/buildpack-deps @@ -29,49 +30,49 @@ jobs: command: mkdir -p .buildcache && echo "*" > .buildcache/.gitignore name: Ignore .buildcache - restore_cache: - key: package-ddd70200153c0e65302afe88a629b4440e8eebfa-{{checksum ".buildcache/cache-keys/package-ddd70200153c0e65302afe88a629b4440e8eebfa"}} + key: package-2bb9488232c945d6800cc3a4a461d9b17503bccc-{{checksum ".buildcache/cache-keys/package-2bb9488232c945d6800cc3a4a461d9b17503bccc"}} name: Restore package cache - restore_cache: - key: package-dca0ba02c8e7351c77442c86523f121a8c83039e-{{checksum ".buildcache/cache-keys/package-dca0ba02c8e7351c77442c86523f121a8c83039e"}} + key: package-e9f9d34c2c14f59f68c31469b7bfa994074a48c2-{{checksum ".buildcache/cache-keys/package-e9f9d34c2c14f59f68c31469b7bfa994074a48c2"}} name: Restore package cache - restore_cache: - key: package-72b242aa7004a2a706bd894df71c002671e8e425-{{checksum ".buildcache/cache-keys/package-72b242aa7004a2a706bd894df71c002671e8e425"}} + key: package-3e2a1075872eae7608bf8be4b74f7291ca88d5b5-{{checksum ".buildcache/cache-keys/package-3e2a1075872eae7608bf8be4b74f7291ca88d5b5"}} name: Restore package cache - restore_cache: - key: package-2409a41c5c5a434b5dbf77d29deb31a24c825dea-{{checksum ".buildcache/cache-keys/package-2409a41c5c5a434b5dbf77d29deb31a24c825dea"}} + key: package-822b1aa9954becb7a9cb480784ff9f99783a8d23-{{checksum ".buildcache/cache-keys/package-822b1aa9954becb7a9cb480784ff9f99783a8d23"}} name: Restore package cache - restore_cache: - key: package-1439f62f659d115a6675bef8de63d7a576370da6-{{checksum ".buildcache/cache-keys/package-1439f62f659d115a6675bef8de63d7a576370da6"}} + key: package-7fd6bd8ba41907a8ad8d09a9ed3c43fb94801f2a-{{checksum ".buildcache/cache-keys/package-7fd6bd8ba41907a8ad8d09a9ed3c43fb94801f2a"}} name: Restore package cache - restore_cache: - key: package-192814968c68e1c819d216b95925afb4099aaa07-{{checksum ".buildcache/cache-keys/package-192814968c68e1c819d216b95925afb4099aaa07"}} + key: package-03d32b4b7349ceac506ca889be4772fe8239ecd8-{{checksum ".buildcache/cache-keys/package-03d32b4b7349ceac506ca889be4772fe8239ecd8"}} name: Restore package cache - restore_cache: - key: package-b734ede0c13f22ffc1835626300d3b3226acaf53-{{checksum ".buildcache/cache-keys/package-b734ede0c13f22ffc1835626300d3b3226acaf53"}} + key: package-ab3b6922ce2bd0fab200dddd6127544427b89fef-{{checksum ".buildcache/cache-keys/package-ab3b6922ce2bd0fab200dddd6127544427b89fef"}} name: Restore package cache - restore_cache: - key: package-a1ae7292c28d5e629eea144b2fafb6f234ca4ffa-{{checksum ".buildcache/cache-keys/package-a1ae7292c28d5e629eea144b2fafb6f234ca4ffa"}} + key: package-7f1216479517d6c6122fd8928ff44c046eb3a377-{{checksum ".buildcache/cache-keys/package-7f1216479517d6c6122fd8928ff44c046eb3a377"}} name: Restore package cache - restore_cache: - key: package-b9d9cc299dc96f89f71285c520b4cd244879207a-{{checksum ".buildcache/cache-keys/package-b9d9cc299dc96f89f71285c520b4cd244879207a"}} + key: package-7fae91402a49def23c2453fe147c262f1377eac3-{{checksum ".buildcache/cache-keys/package-7fae91402a49def23c2453fe147c262f1377eac3"}} name: Restore package cache - restore_cache: - key: package-744fe90a3f2bd01206fbf95ad9d8a8db6b66d84d-{{checksum ".buildcache/cache-keys/package-744fe90a3f2bd01206fbf95ad9d8a8db6b66d84d"}} + key: package-c9b8b9c5b6a1ab2f53599efe3792f7ebbd43a6b8-{{checksum ".buildcache/cache-keys/package-c9b8b9c5b6a1ab2f53599efe3792f7ebbd43a6b8"}} name: Restore package cache - restore_cache: - key: package-489303d43b63583b456fef92eeef9806a25ef98d-{{checksum ".buildcache/cache-keys/package-489303d43b63583b456fef92eeef9806a25ef98d"}} + key: package-b0201f2d2d1b04f519e0d091fbe23997252c5f70-{{checksum ".buildcache/cache-keys/package-b0201f2d2d1b04f519e0d091fbe23997252c5f70"}} name: Restore package cache - restore_cache: - key: package-394f426443d3ce6446a86a2982253a2637c061e0-{{checksum ".buildcache/cache-keys/package-394f426443d3ce6446a86a2982253a2637c061e0"}} + key: package-51ea70d1d613481fac829f239f1f081c5ad6c88b-{{checksum ".buildcache/cache-keys/package-51ea70d1d613481fac829f239f1f081c5ad6c88b"}} name: Restore package cache - restore_cache: - key: package-e13e5614c5583baf504ebe29fbf99c21f9447926-{{checksum ".buildcache/cache-keys/package-e13e5614c5583baf504ebe29fbf99c21f9447926"}} + key: package-19efae459acdaea98d804c26c554640ab3544553-{{checksum ".buildcache/cache-keys/package-19efae459acdaea98d804c26c554640ab3544553"}} name: Restore package cache - restore_cache: - key: package-3fc99d62bf311ae70f4e4d9fd3f2a063691f00b9-{{checksum ".buildcache/cache-keys/package-3fc99d62bf311ae70f4e4d9fd3f2a063691f00b9"}} + key: package-44f600485ac3823fa4e0dbba45763d932187225a-{{checksum ".buildcache/cache-keys/package-44f600485ac3823fa4e0dbba45763d932187225a"}} name: Restore package cache - restore_cache: - key: package-7f7bcfc7f39c7e62aeba7d94b345a3ebdf2ab7f8-{{checksum ".buildcache/cache-keys/package-7f7bcfc7f39c7e62aeba7d94b345a3ebdf2ab7f8"}} + key: package-d10bc84044e1ad705f48cd51591b05ee5e1e7dd5-{{checksum ".buildcache/cache-keys/package-d10bc84044e1ad705f48cd51591b05ee5e1e7dd5"}} name: Restore package cache - run: command: make package-meta-all @@ -83,20 +84,20 @@ jobs: command: ls -lahR .buildcache name: List Build Cache - run: - command: cp packages*.lock/pkgs.yml lockfile-fd66eb9f99de501d.yml + command: cp packages*.lock/pkgs.yml lockfile-645fb387fb0a87de.yml name: Update Lockfile Name - run: - command: tar -czf packages-fd66eb9f99de501d.tar.gz .buildcache/packages lockfile-fd66eb9f99de501d.yml + command: tar -czf packages-645fb387fb0a87de.tar.gz .buildcache/packages lockfile-645fb387fb0a87de.yml name: Create Raw Package Tarball - run: - command: tar -czf meta-fd66eb9f99de501d.tar.gz .buildcache/packages/store/*.json lockfile-fd66eb9f99de501d.yml + command: tar -czf meta-645fb387fb0a87de.tar.gz .buildcache/packages/store/*.json lockfile-645fb387fb0a87de.yml name: Create Metadata Tarball - store_artifacts: - path: lockfile-fd66eb9f99de501d.yml + path: lockfile-645fb387fb0a87de.yml - store_artifacts: - path: packages-fd66eb9f99de501d.tar.gz + path: packages-645fb387fb0a87de.tar.gz - store_artifacts: - path: meta-fd66eb9f99de501d.tar.gz + path: meta-645fb387fb0a87de.tar.gz - store_artifacts: path: .buildcache/packages environment: @@ -111,7 +112,7 @@ jobs: - AUTO_INSTALL_TOOLS: 'YES' - BUILDKIT_PROGRESS: plain - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: ddd70200153c0e65302afe88a629b4440e8eebfa + - PACKAGE_SPEC_ID: 2bb9488232c945d6800cc3a4a461d9b17503bccc steps: - setup_remote_docker: docker_layer_caching: false @@ -125,7 +126,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-ddd70200153c0e65302afe88a629b4440e8eebfa-{{checksum ".buildcache/cache-keys/package-ddd70200153c0e65302afe88a629b4440e8eebfa"}} + key: package-2bb9488232c945d6800cc3a4a461d9b17503bccc-{{checksum ".buildcache/cache-keys/package-2bb9488232c945d6800cc3a4a461d9b17503bccc"}} name: Restore package cache - run: command: |2 @@ -141,11 +142,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -171,7 +172,7 @@ jobs: command: ls -lahR .buildcache/packages name: List packages - save_cache: - key: package-ddd70200153c0e65302afe88a629b4440e8eebfa-{{checksum ".buildcache/cache-keys/package-ddd70200153c0e65302afe88a629b4440e8eebfa"}} + key: package-2bb9488232c945d6800cc3a4a461d9b17503bccc-{{checksum ".buildcache/cache-keys/package-2bb9488232c945d6800cc3a4a461d9b17503bccc"}} name: Save package cache paths: - .buildcache/packages/store @@ -183,7 +184,7 @@ jobs: - AUTO_INSTALL_TOOLS: 'YES' - BUILDKIT_PROGRESS: plain - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: 3fc99d62bf311ae70f4e4d9fd3f2a063691f00b9 + - PACKAGE_SPEC_ID: 44f600485ac3823fa4e0dbba45763d932187225a steps: - setup_remote_docker: docker_layer_caching: false @@ -197,7 +198,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-3fc99d62bf311ae70f4e4d9fd3f2a063691f00b9-{{checksum ".buildcache/cache-keys/package-3fc99d62bf311ae70f4e4d9fd3f2a063691f00b9"}} + key: package-44f600485ac3823fa4e0dbba45763d932187225a-{{checksum ".buildcache/cache-keys/package-44f600485ac3823fa4e0dbba45763d932187225a"}} name: Restore package cache - run: command: |2 @@ -213,11 +214,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -243,20 +244,21 @@ jobs: command: ls -lahR .buildcache/packages name: List packages - save_cache: - key: package-3fc99d62bf311ae70f4e4d9fd3f2a063691f00b9-{{checksum ".buildcache/cache-keys/package-3fc99d62bf311ae70f4e4d9fd3f2a063691f00b9"}} + key: package-44f600485ac3823fa4e0dbba45763d932187225a-{{checksum ".buildcache/cache-keys/package-44f600485ac3823fa4e0dbba45763d932187225a"}} name: Save package cache paths: - .buildcache/packages/store test-sql-11-alpine: machine: image: ubuntu-2004:202107-02 + resource_class: medium + working_directory: ~/boundary steps: - checkout - run: command: | make test-sql POSTGRES_DOCKER_IMAGE_BASE=docker.mirror.hashicorp.services/postgres PG_DOCKER_TAG=11-alpine name: Run SQL PgTap Tests - working_directory: ~/boundary build-common-layers: machine: image: ubuntu-1604:202007-01 @@ -272,14 +274,14 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Layer Cache: copy-source' - run: - command: LAYER_SPEC_ID=03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1 make -C packages*.lock load-builder-cache + command: LAYER_SPEC_ID=03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7 make -C packages*.lock load-builder-cache name: Load whatever builder cache we have (if any) into the Docker daemon - run: command: |2- @@ -295,7 +297,7 @@ jobs: echo " attempts to directly clone private repositories." fi - make -f packages*.lock/layer.mk 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16-image + make -f packages*.lock/layer.mk 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c-image name: Build base layer - run: command: |2- @@ -311,7 +313,7 @@ jobs: echo " attempts to directly clone private repositories." fi - make -f packages*.lock/layer.mk 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a-image + make -f packages*.lock/layer.mk 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1-image name: Build ui layer - run: command: |2- @@ -327,7 +329,7 @@ jobs: echo " attempts to directly clone private repositories." fi - make -f packages*.lock/layer.mk 02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3-image + make -f packages*.lock/layer.mk 02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e-image name: Build go-modules layer - run: command: |2- @@ -343,7 +345,7 @@ jobs: echo " attempts to directly clone private repositories." fi - make -f packages*.lock/layer.mk 03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1-image + make -f packages*.lock/layer.mk 03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7-image name: Build copy-source layer - run: command: |2- @@ -359,13 +361,13 @@ jobs: echo " attempts to directly clone private repositories." fi - make -f packages*.lock/layer.mk 03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1-save + make -f packages*.lock/layer.mk 03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7-save name: Build copy-source layer - save_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} name: 'Save Layer Cache: copy-source' paths: - - .buildcache/archives/03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1.tar.gz + - .buildcache/archives/03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7.tar.gz environment: - AUTO_INSTALL_TOOLS: 'YES' - BUILDKIT_PROGRESS: plain @@ -378,7 +380,7 @@ jobs: - AUTO_INSTALL_TOOLS: 'YES' - BUILDKIT_PROGRESS: plain - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: a1ae7292c28d5e629eea144b2fafb6f234ca4ffa + - PACKAGE_SPEC_ID: 7f1216479517d6c6122fd8928ff44c046eb3a377 steps: - setup_remote_docker: docker_layer_caching: false @@ -392,7 +394,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-a1ae7292c28d5e629eea144b2fafb6f234ca4ffa-{{checksum ".buildcache/cache-keys/package-a1ae7292c28d5e629eea144b2fafb6f234ca4ffa"}} + key: package-7f1216479517d6c6122fd8928ff44c046eb3a377-{{checksum ".buildcache/cache-keys/package-7f1216479517d6c6122fd8928ff44c046eb3a377"}} name: Restore package cache - run: command: |2 @@ -408,11 +410,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -438,7 +440,7 @@ jobs: command: ls -lahR .buildcache/packages name: List packages - save_cache: - key: package-a1ae7292c28d5e629eea144b2fafb6f234ca4ffa-{{checksum ".buildcache/cache-keys/package-a1ae7292c28d5e629eea144b2fafb6f234ca4ffa"}} + key: package-7f1216479517d6c6122fd8928ff44c046eb3a377-{{checksum ".buildcache/cache-keys/package-7f1216479517d6c6122fd8928ff44c046eb3a377"}} name: Save package cache paths: - .buildcache/packages/store @@ -450,7 +452,7 @@ jobs: - AUTO_INSTALL_TOOLS: 'YES' - BUILDKIT_PROGRESS: plain - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: b734ede0c13f22ffc1835626300d3b3226acaf53 + - PACKAGE_SPEC_ID: ab3b6922ce2bd0fab200dddd6127544427b89fef steps: - setup_remote_docker: docker_layer_caching: false @@ -464,7 +466,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-b734ede0c13f22ffc1835626300d3b3226acaf53-{{checksum ".buildcache/cache-keys/package-b734ede0c13f22ffc1835626300d3b3226acaf53"}} + key: package-ab3b6922ce2bd0fab200dddd6127544427b89fef-{{checksum ".buildcache/cache-keys/package-ab3b6922ce2bd0fab200dddd6127544427b89fef"}} name: Restore package cache - run: command: |2 @@ -480,11 +482,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -510,7 +512,7 @@ jobs: command: ls -lahR .buildcache/packages name: List packages - save_cache: - key: package-b734ede0c13f22ffc1835626300d3b3226acaf53-{{checksum ".buildcache/cache-keys/package-b734ede0c13f22ffc1835626300d3b3226acaf53"}} + key: package-ab3b6922ce2bd0fab200dddd6127544427b89fef-{{checksum ".buildcache/cache-keys/package-ab3b6922ce2bd0fab200dddd6127544427b89fef"}} name: Save package cache paths: - .buildcache/packages/store @@ -533,7 +535,7 @@ jobs: - AUTO_INSTALL_TOOLS: 'YES' - BUILDKIT_PROGRESS: plain - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: 1439f62f659d115a6675bef8de63d7a576370da6 + - PACKAGE_SPEC_ID: 7fd6bd8ba41907a8ad8d09a9ed3c43fb94801f2a steps: - setup_remote_docker: docker_layer_caching: false @@ -547,7 +549,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-1439f62f659d115a6675bef8de63d7a576370da6-{{checksum ".buildcache/cache-keys/package-1439f62f659d115a6675bef8de63d7a576370da6"}} + key: package-7fd6bd8ba41907a8ad8d09a9ed3c43fb94801f2a-{{checksum ".buildcache/cache-keys/package-7fd6bd8ba41907a8ad8d09a9ed3c43fb94801f2a"}} name: Restore package cache - run: command: |2 @@ -563,11 +565,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -593,7 +595,7 @@ jobs: command: ls -lahR .buildcache/packages name: List packages - save_cache: - key: package-1439f62f659d115a6675bef8de63d7a576370da6-{{checksum ".buildcache/cache-keys/package-1439f62f659d115a6675bef8de63d7a576370da6"}} + key: package-7fd6bd8ba41907a8ad8d09a9ed3c43fb94801f2a-{{checksum ".buildcache/cache-keys/package-7fd6bd8ba41907a8ad8d09a9ed3c43fb94801f2a"}} name: Save package cache paths: - .buildcache/packages/store @@ -605,7 +607,7 @@ jobs: - AUTO_INSTALL_TOOLS: 'YES' - BUILDKIT_PROGRESS: plain - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: dca0ba02c8e7351c77442c86523f121a8c83039e + - PACKAGE_SPEC_ID: e9f9d34c2c14f59f68c31469b7bfa994074a48c2 steps: - setup_remote_docker: docker_layer_caching: false @@ -619,7 +621,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-dca0ba02c8e7351c77442c86523f121a8c83039e-{{checksum ".buildcache/cache-keys/package-dca0ba02c8e7351c77442c86523f121a8c83039e"}} + key: package-e9f9d34c2c14f59f68c31469b7bfa994074a48c2-{{checksum ".buildcache/cache-keys/package-e9f9d34c2c14f59f68c31469b7bfa994074a48c2"}} name: Restore package cache - run: command: |2 @@ -635,11 +637,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -665,7 +667,7 @@ jobs: command: ls -lahR .buildcache/packages name: List packages - save_cache: - key: package-dca0ba02c8e7351c77442c86523f121a8c83039e-{{checksum ".buildcache/cache-keys/package-dca0ba02c8e7351c77442c86523f121a8c83039e"}} + key: package-e9f9d34c2c14f59f68c31469b7bfa994074a48c2-{{checksum ".buildcache/cache-keys/package-e9f9d34c2c14f59f68c31469b7bfa994074a48c2"}} name: Save package cache paths: - .buildcache/packages/store @@ -677,7 +679,7 @@ jobs: - AUTO_INSTALL_TOOLS: 'YES' - BUILDKIT_PROGRESS: plain - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: 72b242aa7004a2a706bd894df71c002671e8e425 + - PACKAGE_SPEC_ID: 3e2a1075872eae7608bf8be4b74f7291ca88d5b5 steps: - setup_remote_docker: docker_layer_caching: false @@ -691,7 +693,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-72b242aa7004a2a706bd894df71c002671e8e425-{{checksum ".buildcache/cache-keys/package-72b242aa7004a2a706bd894df71c002671e8e425"}} + key: package-3e2a1075872eae7608bf8be4b74f7291ca88d5b5-{{checksum ".buildcache/cache-keys/package-3e2a1075872eae7608bf8be4b74f7291ca88d5b5"}} name: Restore package cache - run: command: |2 @@ -707,11 +709,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -737,7 +739,7 @@ jobs: command: ls -lahR .buildcache/packages name: List packages - save_cache: - key: package-72b242aa7004a2a706bd894df71c002671e8e425-{{checksum ".buildcache/cache-keys/package-72b242aa7004a2a706bd894df71c002671e8e425"}} + key: package-3e2a1075872eae7608bf8be4b74f7291ca88d5b5-{{checksum ".buildcache/cache-keys/package-3e2a1075872eae7608bf8be4b74f7291ca88d5b5"}} name: Save package cache paths: - .buildcache/packages/store @@ -749,7 +751,7 @@ jobs: - AUTO_INSTALL_TOOLS: 'YES' - BUILDKIT_PROGRESS: plain - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: 489303d43b63583b456fef92eeef9806a25ef98d + - PACKAGE_SPEC_ID: b0201f2d2d1b04f519e0d091fbe23997252c5f70 steps: - setup_remote_docker: docker_layer_caching: false @@ -763,7 +765,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-489303d43b63583b456fef92eeef9806a25ef98d-{{checksum ".buildcache/cache-keys/package-489303d43b63583b456fef92eeef9806a25ef98d"}} + key: package-b0201f2d2d1b04f519e0d091fbe23997252c5f70-{{checksum ".buildcache/cache-keys/package-b0201f2d2d1b04f519e0d091fbe23997252c5f70"}} name: Restore package cache - run: command: |2 @@ -779,11 +781,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -809,7 +811,7 @@ jobs: command: ls -lahR .buildcache/packages name: List packages - save_cache: - key: package-489303d43b63583b456fef92eeef9806a25ef98d-{{checksum ".buildcache/cache-keys/package-489303d43b63583b456fef92eeef9806a25ef98d"}} + key: package-b0201f2d2d1b04f519e0d091fbe23997252c5f70-{{checksum ".buildcache/cache-keys/package-b0201f2d2d1b04f519e0d091fbe23997252c5f70"}} name: Save package cache paths: - .buildcache/packages/store @@ -821,7 +823,7 @@ jobs: - AUTO_INSTALL_TOOLS: 'YES' - BUILDKIT_PROGRESS: plain - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: 192814968c68e1c819d216b95925afb4099aaa07 + - PACKAGE_SPEC_ID: 03d32b4b7349ceac506ca889be4772fe8239ecd8 steps: - setup_remote_docker: docker_layer_caching: false @@ -835,7 +837,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-192814968c68e1c819d216b95925afb4099aaa07-{{checksum ".buildcache/cache-keys/package-192814968c68e1c819d216b95925afb4099aaa07"}} + key: package-03d32b4b7349ceac506ca889be4772fe8239ecd8-{{checksum ".buildcache/cache-keys/package-03d32b4b7349ceac506ca889be4772fe8239ecd8"}} name: Restore package cache - run: command: |2 @@ -851,11 +853,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -881,20 +883,21 @@ jobs: command: ls -lahR .buildcache/packages name: List packages - save_cache: - key: package-192814968c68e1c819d216b95925afb4099aaa07-{{checksum ".buildcache/cache-keys/package-192814968c68e1c819d216b95925afb4099aaa07"}} + key: package-03d32b4b7349ceac506ca889be4772fe8239ecd8-{{checksum ".buildcache/cache-keys/package-03d32b4b7349ceac506ca889be4772fe8239ecd8"}} name: Save package cache paths: - .buildcache/packages/store test-sql-12-alpine: machine: image: ubuntu-2004:202107-02 + resource_class: medium + working_directory: ~/boundary steps: - checkout - run: command: | make test-sql POSTGRES_DOCKER_IMAGE_BASE=docker.mirror.hashicorp.services/postgres PG_DOCKER_TAG=12-alpine name: Run SQL PgTap Tests - working_directory: ~/boundary solaris_amd64_package: docker: - image: docker.mirror.hashicorp.services/circleci/buildpack-deps @@ -903,7 +906,7 @@ jobs: - AUTO_INSTALL_TOOLS: 'YES' - BUILDKIT_PROGRESS: plain - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: e13e5614c5583baf504ebe29fbf99c21f9447926 + - PACKAGE_SPEC_ID: 19efae459acdaea98d804c26c554640ab3544553 steps: - setup_remote_docker: docker_layer_caching: false @@ -917,7 +920,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-e13e5614c5583baf504ebe29fbf99c21f9447926-{{checksum ".buildcache/cache-keys/package-e13e5614c5583baf504ebe29fbf99c21f9447926"}} + key: package-19efae459acdaea98d804c26c554640ab3544553-{{checksum ".buildcache/cache-keys/package-19efae459acdaea98d804c26c554640ab3544553"}} name: Restore package cache - run: command: |2 @@ -933,11 +936,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -963,7 +966,7 @@ jobs: command: ls -lahR .buildcache/packages name: List packages - save_cache: - key: package-e13e5614c5583baf504ebe29fbf99c21f9447926-{{checksum ".buildcache/cache-keys/package-e13e5614c5583baf504ebe29fbf99c21f9447926"}} + key: package-19efae459acdaea98d804c26c554640ab3544553-{{checksum ".buildcache/cache-keys/package-19efae459acdaea98d804c26c554640ab3544553"}} name: Save package cache paths: - .buildcache/packages/store @@ -971,6 +974,7 @@ jobs: machine: image: ubuntu-2004:202107-02 resource_class: large + working_directory: ~/boundary steps: - checkout - run: @@ -1116,7 +1120,6 @@ jobs: name: Slack - Sending Status Alert shell: /bin/bash when: always - working_directory: ~/boundary netbsd_amd64_package: docker: - image: docker.mirror.hashicorp.services/circleci/buildpack-deps @@ -1125,7 +1128,7 @@ jobs: - AUTO_INSTALL_TOOLS: 'YES' - BUILDKIT_PROGRESS: plain - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: 744fe90a3f2bd01206fbf95ad9d8a8db6b66d84d + - PACKAGE_SPEC_ID: c9b8b9c5b6a1ab2f53599efe3792f7ebbd43a6b8 steps: - setup_remote_docker: docker_layer_caching: false @@ -1139,7 +1142,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-744fe90a3f2bd01206fbf95ad9d8a8db6b66d84d-{{checksum ".buildcache/cache-keys/package-744fe90a3f2bd01206fbf95ad9d8a8db6b66d84d"}} + key: package-c9b8b9c5b6a1ab2f53599efe3792f7ebbd43a6b8-{{checksum ".buildcache/cache-keys/package-c9b8b9c5b6a1ab2f53599efe3792f7ebbd43a6b8"}} name: Restore package cache - run: command: |2 @@ -1155,11 +1158,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -1185,7 +1188,7 @@ jobs: command: ls -lahR .buildcache/packages name: List packages - save_cache: - key: package-744fe90a3f2bd01206fbf95ad9d8a8db6b66d84d-{{checksum ".buildcache/cache-keys/package-744fe90a3f2bd01206fbf95ad9d8a8db6b66d84d"}} + key: package-c9b8b9c5b6a1ab2f53599efe3792f7ebbd43a6b8-{{checksum ".buildcache/cache-keys/package-c9b8b9c5b6a1ab2f53599efe3792f7ebbd43a6b8"}} name: Save package cache paths: - .buildcache/packages/store @@ -1197,7 +1200,7 @@ jobs: - AUTO_INSTALL_TOOLS: 'YES' - BUILDKIT_PROGRESS: plain - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: 394f426443d3ce6446a86a2982253a2637c061e0 + - PACKAGE_SPEC_ID: 51ea70d1d613481fac829f239f1f081c5ad6c88b steps: - setup_remote_docker: docker_layer_caching: false @@ -1211,7 +1214,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-394f426443d3ce6446a86a2982253a2637c061e0-{{checksum ".buildcache/cache-keys/package-394f426443d3ce6446a86a2982253a2637c061e0"}} + key: package-51ea70d1d613481fac829f239f1f081c5ad6c88b-{{checksum ".buildcache/cache-keys/package-51ea70d1d613481fac829f239f1f081c5ad6c88b"}} name: Restore package cache - run: command: |2 @@ -1227,11 +1230,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -1257,7 +1260,7 @@ jobs: command: ls -lahR .buildcache/packages name: List packages - save_cache: - key: package-394f426443d3ce6446a86a2982253a2637c061e0-{{checksum ".buildcache/cache-keys/package-394f426443d3ce6446a86a2982253a2637c061e0"}} + key: package-51ea70d1d613481fac829f239f1f081c5ad6c88b-{{checksum ".buildcache/cache-keys/package-51ea70d1d613481fac829f239f1f081c5ad6c88b"}} name: Save package cache paths: - .buildcache/packages/store @@ -1269,7 +1272,7 @@ jobs: - AUTO_INSTALL_TOOLS: 'YES' - BUILDKIT_PROGRESS: plain - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: b9d9cc299dc96f89f71285c520b4cd244879207a + - PACKAGE_SPEC_ID: 7fae91402a49def23c2453fe147c262f1377eac3 steps: - setup_remote_docker: docker_layer_caching: false @@ -1283,7 +1286,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-b9d9cc299dc96f89f71285c520b4cd244879207a-{{checksum ".buildcache/cache-keys/package-b9d9cc299dc96f89f71285c520b4cd244879207a"}} + key: package-7fae91402a49def23c2453fe147c262f1377eac3-{{checksum ".buildcache/cache-keys/package-7fae91402a49def23c2453fe147c262f1377eac3"}} name: Restore package cache - run: command: |2 @@ -1299,11 +1302,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -1329,7 +1332,7 @@ jobs: command: ls -lahR .buildcache/packages name: List packages - save_cache: - key: package-b9d9cc299dc96f89f71285c520b4cd244879207a-{{checksum ".buildcache/cache-keys/package-b9d9cc299dc96f89f71285c520b4cd244879207a"}} + key: package-7fae91402a49def23c2453fe147c262f1377eac3-{{checksum ".buildcache/cache-keys/package-7fae91402a49def23c2453fe147c262f1377eac3"}} name: Save package cache paths: - .buildcache/packages/store @@ -1341,7 +1344,7 @@ jobs: - AUTO_INSTALL_TOOLS: 'YES' - BUILDKIT_PROGRESS: plain - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: 2409a41c5c5a434b5dbf77d29deb31a24c825dea + - PACKAGE_SPEC_ID: 822b1aa9954becb7a9cb480784ff9f99783a8d23 steps: - setup_remote_docker: docker_layer_caching: false @@ -1355,7 +1358,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-2409a41c5c5a434b5dbf77d29deb31a24c825dea-{{checksum ".buildcache/cache-keys/package-2409a41c5c5a434b5dbf77d29deb31a24c825dea"}} + key: package-822b1aa9954becb7a9cb480784ff9f99783a8d23-{{checksum ".buildcache/cache-keys/package-822b1aa9954becb7a9cb480784ff9f99783a8d23"}} name: Restore package cache - run: command: |2 @@ -1371,11 +1374,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -1401,7 +1404,7 @@ jobs: command: ls -lahR .buildcache/packages name: List packages - save_cache: - key: package-2409a41c5c5a434b5dbf77d29deb31a24c825dea-{{checksum ".buildcache/cache-keys/package-2409a41c5c5a434b5dbf77d29deb31a24c825dea"}} + key: package-822b1aa9954becb7a9cb480784ff9f99783a8d23-{{checksum ".buildcache/cache-keys/package-822b1aa9954becb7a9cb480784ff9f99783a8d23"}} name: Save package cache paths: - .buildcache/packages/store @@ -1413,7 +1416,7 @@ jobs: - AUTO_INSTALL_TOOLS: 'YES' - BUILDKIT_PROGRESS: plain - PRODUCT_REVISION: '' - - PACKAGE_SPEC_ID: 7f7bcfc7f39c7e62aeba7d94b345a3ebdf2ab7f8 + - PACKAGE_SPEC_ID: d10bc84044e1ad705f48cd51591b05ee5e1e7dd5 steps: - setup_remote_docker: docker_layer_caching: false @@ -1427,7 +1430,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-7f7bcfc7f39c7e62aeba7d94b345a3ebdf2ab7f8-{{checksum ".buildcache/cache-keys/package-7f7bcfc7f39c7e62aeba7d94b345a3ebdf2ab7f8"}} + key: package-d10bc84044e1ad705f48cd51591b05ee5e1e7dd5-{{checksum ".buildcache/cache-keys/package-d10bc84044e1ad705f48cd51591b05ee5e1e7dd5"}} name: Restore package cache - run: command: |2 @@ -1443,11 +1446,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -1473,22 +1476,23 @@ jobs: command: ls -lahR .buildcache/packages name: List packages - save_cache: - key: package-7f7bcfc7f39c7e62aeba7d94b345a3ebdf2ab7f8-{{checksum ".buildcache/cache-keys/package-7f7bcfc7f39c7e62aeba7d94b345a3ebdf2ab7f8"}} + key: package-d10bc84044e1ad705f48cd51591b05ee5e1e7dd5-{{checksum ".buildcache/cache-keys/package-d10bc84044e1ad705f48cd51591b05ee5e1e7dd5"}} name: Save package cache paths: - .buildcache/packages/store test-sql-latest: machine: image: ubuntu-2004:202107-02 + resource_class: medium + working_directory: ~/boundary steps: - checkout - run: command: | make test-sql POSTGRES_DOCKER_IMAGE_BASE=docker.mirror.hashicorp.services/postgres PG_DOCKER_TAG=latest name: Run SQL PgTap Tests - working_directory: ~/boundary workflows: - build-fd66eb9f99de501d: + build-645fb387fb0a87de: jobs: - build-common-layers - darwin_amd64_package: @@ -1553,7 +1557,7 @@ workflows: - windows_amd64_package: requires: - build-common-layers - default: + ci: jobs: - build - test-sql-latest diff --git a/.circleci/config/@build-release.yml b/.circleci/config/@build-release.yml index 2464aff7a..7432efd84 100644 --- a/.circleci/config/@build-release.yml +++ b/.circleci/config/@build-release.yml @@ -30,14 +30,14 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Layer Cache: copy-source' - run: - command: LAYER_SPEC_ID=03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1 make -C packages*.lock load-builder-cache + command: LAYER_SPEC_ID=03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7 make -C packages*.lock load-builder-cache name: Load whatever builder cache we have (if any) into the Docker daemon - run: command: |2- @@ -53,7 +53,7 @@ jobs: echo " attempts to directly clone private repositories." fi - make -f packages*.lock/layer.mk 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16-image + make -f packages*.lock/layer.mk 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c-image name: Build base layer - run: command: |2- @@ -69,7 +69,7 @@ jobs: echo " attempts to directly clone private repositories." fi - make -f packages*.lock/layer.mk 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a-image + make -f packages*.lock/layer.mk 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1-image name: Build ui layer - run: command: |2- @@ -85,7 +85,7 @@ jobs: echo " attempts to directly clone private repositories." fi - make -f packages*.lock/layer.mk 02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3-image + make -f packages*.lock/layer.mk 02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e-image name: Build go-modules layer - run: command: |2- @@ -101,7 +101,7 @@ jobs: echo " attempts to directly clone private repositories." fi - make -f packages*.lock/layer.mk 03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1-image + make -f packages*.lock/layer.mk 03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7-image name: Build copy-source layer - run: command: |2- @@ -117,12 +117,12 @@ jobs: echo " attempts to directly clone private repositories." fi - make -f packages*.lock/layer.mk 03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1-save + make -f packages*.lock/layer.mk 03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7-save name: Build copy-source layer - save_cache: paths: - - .buildcache/archives/03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1.tar.gz - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + - .buildcache/archives/03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7.tar.gz + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} name: 'Save Layer Cache: copy-source' bundle-releases: executor: builder @@ -136,49 +136,49 @@ jobs: command: mkdir -p .buildcache && echo "*" > .buildcache/.gitignore name: Ignore .buildcache - restore_cache: - key: package-ddd70200153c0e65302afe88a629b4440e8eebfa-{{checksum ".buildcache/cache-keys/package-ddd70200153c0e65302afe88a629b4440e8eebfa"}} + key: package-2bb9488232c945d6800cc3a4a461d9b17503bccc-{{checksum ".buildcache/cache-keys/package-2bb9488232c945d6800cc3a4a461d9b17503bccc"}} name: Restore package cache - restore_cache: - key: package-dca0ba02c8e7351c77442c86523f121a8c83039e-{{checksum ".buildcache/cache-keys/package-dca0ba02c8e7351c77442c86523f121a8c83039e"}} + key: package-e9f9d34c2c14f59f68c31469b7bfa994074a48c2-{{checksum ".buildcache/cache-keys/package-e9f9d34c2c14f59f68c31469b7bfa994074a48c2"}} name: Restore package cache - restore_cache: - key: package-72b242aa7004a2a706bd894df71c002671e8e425-{{checksum ".buildcache/cache-keys/package-72b242aa7004a2a706bd894df71c002671e8e425"}} + key: package-3e2a1075872eae7608bf8be4b74f7291ca88d5b5-{{checksum ".buildcache/cache-keys/package-3e2a1075872eae7608bf8be4b74f7291ca88d5b5"}} name: Restore package cache - restore_cache: - key: package-2409a41c5c5a434b5dbf77d29deb31a24c825dea-{{checksum ".buildcache/cache-keys/package-2409a41c5c5a434b5dbf77d29deb31a24c825dea"}} + key: package-822b1aa9954becb7a9cb480784ff9f99783a8d23-{{checksum ".buildcache/cache-keys/package-822b1aa9954becb7a9cb480784ff9f99783a8d23"}} name: Restore package cache - restore_cache: - key: package-1439f62f659d115a6675bef8de63d7a576370da6-{{checksum ".buildcache/cache-keys/package-1439f62f659d115a6675bef8de63d7a576370da6"}} + key: package-7fd6bd8ba41907a8ad8d09a9ed3c43fb94801f2a-{{checksum ".buildcache/cache-keys/package-7fd6bd8ba41907a8ad8d09a9ed3c43fb94801f2a"}} name: Restore package cache - restore_cache: - key: package-192814968c68e1c819d216b95925afb4099aaa07-{{checksum ".buildcache/cache-keys/package-192814968c68e1c819d216b95925afb4099aaa07"}} + key: package-03d32b4b7349ceac506ca889be4772fe8239ecd8-{{checksum ".buildcache/cache-keys/package-03d32b4b7349ceac506ca889be4772fe8239ecd8"}} name: Restore package cache - restore_cache: - key: package-b734ede0c13f22ffc1835626300d3b3226acaf53-{{checksum ".buildcache/cache-keys/package-b734ede0c13f22ffc1835626300d3b3226acaf53"}} + key: package-ab3b6922ce2bd0fab200dddd6127544427b89fef-{{checksum ".buildcache/cache-keys/package-ab3b6922ce2bd0fab200dddd6127544427b89fef"}} name: Restore package cache - restore_cache: - key: package-a1ae7292c28d5e629eea144b2fafb6f234ca4ffa-{{checksum ".buildcache/cache-keys/package-a1ae7292c28d5e629eea144b2fafb6f234ca4ffa"}} + key: package-7f1216479517d6c6122fd8928ff44c046eb3a377-{{checksum ".buildcache/cache-keys/package-7f1216479517d6c6122fd8928ff44c046eb3a377"}} name: Restore package cache - restore_cache: - key: package-b9d9cc299dc96f89f71285c520b4cd244879207a-{{checksum ".buildcache/cache-keys/package-b9d9cc299dc96f89f71285c520b4cd244879207a"}} + key: package-7fae91402a49def23c2453fe147c262f1377eac3-{{checksum ".buildcache/cache-keys/package-7fae91402a49def23c2453fe147c262f1377eac3"}} name: Restore package cache - restore_cache: - key: package-744fe90a3f2bd01206fbf95ad9d8a8db6b66d84d-{{checksum ".buildcache/cache-keys/package-744fe90a3f2bd01206fbf95ad9d8a8db6b66d84d"}} + key: package-c9b8b9c5b6a1ab2f53599efe3792f7ebbd43a6b8-{{checksum ".buildcache/cache-keys/package-c9b8b9c5b6a1ab2f53599efe3792f7ebbd43a6b8"}} name: Restore package cache - restore_cache: - key: package-489303d43b63583b456fef92eeef9806a25ef98d-{{checksum ".buildcache/cache-keys/package-489303d43b63583b456fef92eeef9806a25ef98d"}} + key: package-b0201f2d2d1b04f519e0d091fbe23997252c5f70-{{checksum ".buildcache/cache-keys/package-b0201f2d2d1b04f519e0d091fbe23997252c5f70"}} name: Restore package cache - restore_cache: - key: package-394f426443d3ce6446a86a2982253a2637c061e0-{{checksum ".buildcache/cache-keys/package-394f426443d3ce6446a86a2982253a2637c061e0"}} + key: package-51ea70d1d613481fac829f239f1f081c5ad6c88b-{{checksum ".buildcache/cache-keys/package-51ea70d1d613481fac829f239f1f081c5ad6c88b"}} name: Restore package cache - restore_cache: - key: package-e13e5614c5583baf504ebe29fbf99c21f9447926-{{checksum ".buildcache/cache-keys/package-e13e5614c5583baf504ebe29fbf99c21f9447926"}} + key: package-19efae459acdaea98d804c26c554640ab3544553-{{checksum ".buildcache/cache-keys/package-19efae459acdaea98d804c26c554640ab3544553"}} name: Restore package cache - restore_cache: - key: package-3fc99d62bf311ae70f4e4d9fd3f2a063691f00b9-{{checksum ".buildcache/cache-keys/package-3fc99d62bf311ae70f4e4d9fd3f2a063691f00b9"}} + key: package-44f600485ac3823fa4e0dbba45763d932187225a-{{checksum ".buildcache/cache-keys/package-44f600485ac3823fa4e0dbba45763d932187225a"}} name: Restore package cache - restore_cache: - key: package-7f7bcfc7f39c7e62aeba7d94b345a3ebdf2ab7f8-{{checksum ".buildcache/cache-keys/package-7f7bcfc7f39c7e62aeba7d94b345a3ebdf2ab7f8"}} + key: package-d10bc84044e1ad705f48cd51591b05ee5e1e7dd5-{{checksum ".buildcache/cache-keys/package-d10bc84044e1ad705f48cd51591b05ee5e1e7dd5"}} name: Restore package cache - run: command: make package-meta-all @@ -190,20 +190,20 @@ jobs: command: ls -lahR .buildcache name: List Build Cache - run: - command: cp packages*.lock/pkgs.yml lockfile-fd66eb9f99de501d.yml + command: cp packages*.lock/pkgs.yml lockfile-645fb387fb0a87de.yml name: Update Lockfile Name - run: - command: tar -czf packages-fd66eb9f99de501d.tar.gz .buildcache/packages lockfile-fd66eb9f99de501d.yml + command: tar -czf packages-645fb387fb0a87de.tar.gz .buildcache/packages lockfile-645fb387fb0a87de.yml name: Create Raw Package Tarball - run: - command: tar -czf meta-fd66eb9f99de501d.tar.gz .buildcache/packages/store/*.json lockfile-fd66eb9f99de501d.yml + command: tar -czf meta-645fb387fb0a87de.tar.gz .buildcache/packages/store/*.json lockfile-645fb387fb0a87de.yml name: Create Metadata Tarball - store_artifacts: - path: lockfile-fd66eb9f99de501d.yml + path: lockfile-645fb387fb0a87de.yml - store_artifacts: - path: packages-fd66eb9f99de501d.tar.gz + path: packages-645fb387fb0a87de.tar.gz - store_artifacts: - path: meta-fd66eb9f99de501d.tar.gz + path: meta-645fb387fb0a87de.tar.gz - store_artifacts: path: .buildcache/packages darwin_amd64_package: @@ -221,7 +221,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-ddd70200153c0e65302afe88a629b4440e8eebfa-{{checksum ".buildcache/cache-keys/package-ddd70200153c0e65302afe88a629b4440e8eebfa"}} + key: package-2bb9488232c945d6800cc3a4a461d9b17503bccc-{{checksum ".buildcache/cache-keys/package-2bb9488232c945d6800cc3a4a461d9b17503bccc"}} name: Restore package cache - run: command: |2 @@ -237,11 +237,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -269,10 +269,10 @@ jobs: - save_cache: paths: - .buildcache/packages/store - key: package-ddd70200153c0e65302afe88a629b4440e8eebfa-{{checksum ".buildcache/cache-keys/package-ddd70200153c0e65302afe88a629b4440e8eebfa"}} + key: package-2bb9488232c945d6800cc3a4a461d9b17503bccc-{{checksum ".buildcache/cache-keys/package-2bb9488232c945d6800cc3a4a461d9b17503bccc"}} name: Save package cache environment: - PACKAGE_SPEC_ID: ddd70200153c0e65302afe88a629b4440e8eebfa + PACKAGE_SPEC_ID: 2bb9488232c945d6800cc3a4a461d9b17503bccc freebsd_386_package: executor: builder steps: @@ -288,7 +288,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-dca0ba02c8e7351c77442c86523f121a8c83039e-{{checksum ".buildcache/cache-keys/package-dca0ba02c8e7351c77442c86523f121a8c83039e"}} + key: package-e9f9d34c2c14f59f68c31469b7bfa994074a48c2-{{checksum ".buildcache/cache-keys/package-e9f9d34c2c14f59f68c31469b7bfa994074a48c2"}} name: Restore package cache - run: command: |2 @@ -304,11 +304,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -336,10 +336,10 @@ jobs: - save_cache: paths: - .buildcache/packages/store - key: package-dca0ba02c8e7351c77442c86523f121a8c83039e-{{checksum ".buildcache/cache-keys/package-dca0ba02c8e7351c77442c86523f121a8c83039e"}} + key: package-e9f9d34c2c14f59f68c31469b7bfa994074a48c2-{{checksum ".buildcache/cache-keys/package-e9f9d34c2c14f59f68c31469b7bfa994074a48c2"}} name: Save package cache environment: - PACKAGE_SPEC_ID: dca0ba02c8e7351c77442c86523f121a8c83039e + PACKAGE_SPEC_ID: e9f9d34c2c14f59f68c31469b7bfa994074a48c2 freebsd_amd64_package: executor: builder steps: @@ -355,7 +355,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-72b242aa7004a2a706bd894df71c002671e8e425-{{checksum ".buildcache/cache-keys/package-72b242aa7004a2a706bd894df71c002671e8e425"}} + key: package-3e2a1075872eae7608bf8be4b74f7291ca88d5b5-{{checksum ".buildcache/cache-keys/package-3e2a1075872eae7608bf8be4b74f7291ca88d5b5"}} name: Restore package cache - run: command: |2 @@ -371,11 +371,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -403,10 +403,10 @@ jobs: - save_cache: paths: - .buildcache/packages/store - key: package-72b242aa7004a2a706bd894df71c002671e8e425-{{checksum ".buildcache/cache-keys/package-72b242aa7004a2a706bd894df71c002671e8e425"}} + key: package-3e2a1075872eae7608bf8be4b74f7291ca88d5b5-{{checksum ".buildcache/cache-keys/package-3e2a1075872eae7608bf8be4b74f7291ca88d5b5"}} name: Save package cache environment: - PACKAGE_SPEC_ID: 72b242aa7004a2a706bd894df71c002671e8e425 + PACKAGE_SPEC_ID: 3e2a1075872eae7608bf8be4b74f7291ca88d5b5 freebsd_arm_package: executor: builder steps: @@ -422,7 +422,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-2409a41c5c5a434b5dbf77d29deb31a24c825dea-{{checksum ".buildcache/cache-keys/package-2409a41c5c5a434b5dbf77d29deb31a24c825dea"}} + key: package-822b1aa9954becb7a9cb480784ff9f99783a8d23-{{checksum ".buildcache/cache-keys/package-822b1aa9954becb7a9cb480784ff9f99783a8d23"}} name: Restore package cache - run: command: |2 @@ -438,11 +438,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -470,10 +470,10 @@ jobs: - save_cache: paths: - .buildcache/packages/store - key: package-2409a41c5c5a434b5dbf77d29deb31a24c825dea-{{checksum ".buildcache/cache-keys/package-2409a41c5c5a434b5dbf77d29deb31a24c825dea"}} + key: package-822b1aa9954becb7a9cb480784ff9f99783a8d23-{{checksum ".buildcache/cache-keys/package-822b1aa9954becb7a9cb480784ff9f99783a8d23"}} name: Save package cache environment: - PACKAGE_SPEC_ID: 2409a41c5c5a434b5dbf77d29deb31a24c825dea + PACKAGE_SPEC_ID: 822b1aa9954becb7a9cb480784ff9f99783a8d23 linux_386_package: executor: builder steps: @@ -489,7 +489,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-1439f62f659d115a6675bef8de63d7a576370da6-{{checksum ".buildcache/cache-keys/package-1439f62f659d115a6675bef8de63d7a576370da6"}} + key: package-7fd6bd8ba41907a8ad8d09a9ed3c43fb94801f2a-{{checksum ".buildcache/cache-keys/package-7fd6bd8ba41907a8ad8d09a9ed3c43fb94801f2a"}} name: Restore package cache - run: command: |2 @@ -505,11 +505,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -537,10 +537,10 @@ jobs: - save_cache: paths: - .buildcache/packages/store - key: package-1439f62f659d115a6675bef8de63d7a576370da6-{{checksum ".buildcache/cache-keys/package-1439f62f659d115a6675bef8de63d7a576370da6"}} + key: package-7fd6bd8ba41907a8ad8d09a9ed3c43fb94801f2a-{{checksum ".buildcache/cache-keys/package-7fd6bd8ba41907a8ad8d09a9ed3c43fb94801f2a"}} name: Save package cache environment: - PACKAGE_SPEC_ID: 1439f62f659d115a6675bef8de63d7a576370da6 + PACKAGE_SPEC_ID: 7fd6bd8ba41907a8ad8d09a9ed3c43fb94801f2a linux_amd64_package: executor: builder steps: @@ -556,7 +556,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-192814968c68e1c819d216b95925afb4099aaa07-{{checksum ".buildcache/cache-keys/package-192814968c68e1c819d216b95925afb4099aaa07"}} + key: package-03d32b4b7349ceac506ca889be4772fe8239ecd8-{{checksum ".buildcache/cache-keys/package-03d32b4b7349ceac506ca889be4772fe8239ecd8"}} name: Restore package cache - run: command: |2 @@ -572,11 +572,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -604,10 +604,10 @@ jobs: - save_cache: paths: - .buildcache/packages/store - key: package-192814968c68e1c819d216b95925afb4099aaa07-{{checksum ".buildcache/cache-keys/package-192814968c68e1c819d216b95925afb4099aaa07"}} + key: package-03d32b4b7349ceac506ca889be4772fe8239ecd8-{{checksum ".buildcache/cache-keys/package-03d32b4b7349ceac506ca889be4772fe8239ecd8"}} name: Save package cache environment: - PACKAGE_SPEC_ID: 192814968c68e1c819d216b95925afb4099aaa07 + PACKAGE_SPEC_ID: 03d32b4b7349ceac506ca889be4772fe8239ecd8 linux_arm_package: executor: builder steps: @@ -623,7 +623,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-b734ede0c13f22ffc1835626300d3b3226acaf53-{{checksum ".buildcache/cache-keys/package-b734ede0c13f22ffc1835626300d3b3226acaf53"}} + key: package-ab3b6922ce2bd0fab200dddd6127544427b89fef-{{checksum ".buildcache/cache-keys/package-ab3b6922ce2bd0fab200dddd6127544427b89fef"}} name: Restore package cache - run: command: |2 @@ -639,11 +639,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -671,10 +671,10 @@ jobs: - save_cache: paths: - .buildcache/packages/store - key: package-b734ede0c13f22ffc1835626300d3b3226acaf53-{{checksum ".buildcache/cache-keys/package-b734ede0c13f22ffc1835626300d3b3226acaf53"}} + key: package-ab3b6922ce2bd0fab200dddd6127544427b89fef-{{checksum ".buildcache/cache-keys/package-ab3b6922ce2bd0fab200dddd6127544427b89fef"}} name: Save package cache environment: - PACKAGE_SPEC_ID: b734ede0c13f22ffc1835626300d3b3226acaf53 + PACKAGE_SPEC_ID: ab3b6922ce2bd0fab200dddd6127544427b89fef linux_arm64_package: executor: builder steps: @@ -690,7 +690,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-a1ae7292c28d5e629eea144b2fafb6f234ca4ffa-{{checksum ".buildcache/cache-keys/package-a1ae7292c28d5e629eea144b2fafb6f234ca4ffa"}} + key: package-7f1216479517d6c6122fd8928ff44c046eb3a377-{{checksum ".buildcache/cache-keys/package-7f1216479517d6c6122fd8928ff44c046eb3a377"}} name: Restore package cache - run: command: |2 @@ -706,11 +706,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -738,10 +738,10 @@ jobs: - save_cache: paths: - .buildcache/packages/store - key: package-a1ae7292c28d5e629eea144b2fafb6f234ca4ffa-{{checksum ".buildcache/cache-keys/package-a1ae7292c28d5e629eea144b2fafb6f234ca4ffa"}} + key: package-7f1216479517d6c6122fd8928ff44c046eb3a377-{{checksum ".buildcache/cache-keys/package-7f1216479517d6c6122fd8928ff44c046eb3a377"}} name: Save package cache environment: - PACKAGE_SPEC_ID: a1ae7292c28d5e629eea144b2fafb6f234ca4ffa + PACKAGE_SPEC_ID: 7f1216479517d6c6122fd8928ff44c046eb3a377 netbsd_386_package: executor: builder steps: @@ -757,7 +757,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-b9d9cc299dc96f89f71285c520b4cd244879207a-{{checksum ".buildcache/cache-keys/package-b9d9cc299dc96f89f71285c520b4cd244879207a"}} + key: package-7fae91402a49def23c2453fe147c262f1377eac3-{{checksum ".buildcache/cache-keys/package-7fae91402a49def23c2453fe147c262f1377eac3"}} name: Restore package cache - run: command: |2 @@ -773,11 +773,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -805,10 +805,10 @@ jobs: - save_cache: paths: - .buildcache/packages/store - key: package-b9d9cc299dc96f89f71285c520b4cd244879207a-{{checksum ".buildcache/cache-keys/package-b9d9cc299dc96f89f71285c520b4cd244879207a"}} + key: package-7fae91402a49def23c2453fe147c262f1377eac3-{{checksum ".buildcache/cache-keys/package-7fae91402a49def23c2453fe147c262f1377eac3"}} name: Save package cache environment: - PACKAGE_SPEC_ID: b9d9cc299dc96f89f71285c520b4cd244879207a + PACKAGE_SPEC_ID: 7fae91402a49def23c2453fe147c262f1377eac3 netbsd_amd64_package: executor: builder steps: @@ -824,7 +824,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-744fe90a3f2bd01206fbf95ad9d8a8db6b66d84d-{{checksum ".buildcache/cache-keys/package-744fe90a3f2bd01206fbf95ad9d8a8db6b66d84d"}} + key: package-c9b8b9c5b6a1ab2f53599efe3792f7ebbd43a6b8-{{checksum ".buildcache/cache-keys/package-c9b8b9c5b6a1ab2f53599efe3792f7ebbd43a6b8"}} name: Restore package cache - run: command: |2 @@ -840,11 +840,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -872,10 +872,10 @@ jobs: - save_cache: paths: - .buildcache/packages/store - key: package-744fe90a3f2bd01206fbf95ad9d8a8db6b66d84d-{{checksum ".buildcache/cache-keys/package-744fe90a3f2bd01206fbf95ad9d8a8db6b66d84d"}} + key: package-c9b8b9c5b6a1ab2f53599efe3792f7ebbd43a6b8-{{checksum ".buildcache/cache-keys/package-c9b8b9c5b6a1ab2f53599efe3792f7ebbd43a6b8"}} name: Save package cache environment: - PACKAGE_SPEC_ID: 744fe90a3f2bd01206fbf95ad9d8a8db6b66d84d + PACKAGE_SPEC_ID: c9b8b9c5b6a1ab2f53599efe3792f7ebbd43a6b8 openbsd_386_package: executor: builder steps: @@ -891,7 +891,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-489303d43b63583b456fef92eeef9806a25ef98d-{{checksum ".buildcache/cache-keys/package-489303d43b63583b456fef92eeef9806a25ef98d"}} + key: package-b0201f2d2d1b04f519e0d091fbe23997252c5f70-{{checksum ".buildcache/cache-keys/package-b0201f2d2d1b04f519e0d091fbe23997252c5f70"}} name: Restore package cache - run: command: |2 @@ -907,11 +907,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -939,10 +939,10 @@ jobs: - save_cache: paths: - .buildcache/packages/store - key: package-489303d43b63583b456fef92eeef9806a25ef98d-{{checksum ".buildcache/cache-keys/package-489303d43b63583b456fef92eeef9806a25ef98d"}} + key: package-b0201f2d2d1b04f519e0d091fbe23997252c5f70-{{checksum ".buildcache/cache-keys/package-b0201f2d2d1b04f519e0d091fbe23997252c5f70"}} name: Save package cache environment: - PACKAGE_SPEC_ID: 489303d43b63583b456fef92eeef9806a25ef98d + PACKAGE_SPEC_ID: b0201f2d2d1b04f519e0d091fbe23997252c5f70 openbsd_amd64_package: executor: builder steps: @@ -958,7 +958,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-394f426443d3ce6446a86a2982253a2637c061e0-{{checksum ".buildcache/cache-keys/package-394f426443d3ce6446a86a2982253a2637c061e0"}} + key: package-51ea70d1d613481fac829f239f1f081c5ad6c88b-{{checksum ".buildcache/cache-keys/package-51ea70d1d613481fac829f239f1f081c5ad6c88b"}} name: Restore package cache - run: command: |2 @@ -974,11 +974,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -1006,10 +1006,10 @@ jobs: - save_cache: paths: - .buildcache/packages/store - key: package-394f426443d3ce6446a86a2982253a2637c061e0-{{checksum ".buildcache/cache-keys/package-394f426443d3ce6446a86a2982253a2637c061e0"}} + key: package-51ea70d1d613481fac829f239f1f081c5ad6c88b-{{checksum ".buildcache/cache-keys/package-51ea70d1d613481fac829f239f1f081c5ad6c88b"}} name: Save package cache environment: - PACKAGE_SPEC_ID: 394f426443d3ce6446a86a2982253a2637c061e0 + PACKAGE_SPEC_ID: 51ea70d1d613481fac829f239f1f081c5ad6c88b solaris_amd64_package: executor: builder steps: @@ -1025,7 +1025,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-e13e5614c5583baf504ebe29fbf99c21f9447926-{{checksum ".buildcache/cache-keys/package-e13e5614c5583baf504ebe29fbf99c21f9447926"}} + key: package-19efae459acdaea98d804c26c554640ab3544553-{{checksum ".buildcache/cache-keys/package-19efae459acdaea98d804c26c554640ab3544553"}} name: Restore package cache - run: command: |2 @@ -1041,11 +1041,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -1073,10 +1073,10 @@ jobs: - save_cache: paths: - .buildcache/packages/store - key: package-e13e5614c5583baf504ebe29fbf99c21f9447926-{{checksum ".buildcache/cache-keys/package-e13e5614c5583baf504ebe29fbf99c21f9447926"}} + key: package-19efae459acdaea98d804c26c554640ab3544553-{{checksum ".buildcache/cache-keys/package-19efae459acdaea98d804c26c554640ab3544553"}} name: Save package cache environment: - PACKAGE_SPEC_ID: e13e5614c5583baf504ebe29fbf99c21f9447926 + PACKAGE_SPEC_ID: 19efae459acdaea98d804c26c554640ab3544553 windows_386_package: executor: builder steps: @@ -1092,7 +1092,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-3fc99d62bf311ae70f4e4d9fd3f2a063691f00b9-{{checksum ".buildcache/cache-keys/package-3fc99d62bf311ae70f4e4d9fd3f2a063691f00b9"}} + key: package-44f600485ac3823fa4e0dbba45763d932187225a-{{checksum ".buildcache/cache-keys/package-44f600485ac3823fa4e0dbba45763d932187225a"}} name: Restore package cache - run: command: |2 @@ -1108,11 +1108,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -1140,10 +1140,10 @@ jobs: - save_cache: paths: - .buildcache/packages/store - key: package-3fc99d62bf311ae70f4e4d9fd3f2a063691f00b9-{{checksum ".buildcache/cache-keys/package-3fc99d62bf311ae70f4e4d9fd3f2a063691f00b9"}} + key: package-44f600485ac3823fa4e0dbba45763d932187225a-{{checksum ".buildcache/cache-keys/package-44f600485ac3823fa4e0dbba45763d932187225a"}} name: Save package cache environment: - PACKAGE_SPEC_ID: 3fc99d62bf311ae70f4e4d9fd3f2a063691f00b9 + PACKAGE_SPEC_ID: 44f600485ac3823fa4e0dbba45763d932187225a windows_amd64_package: executor: builder steps: @@ -1159,7 +1159,7 @@ jobs: command: make -C packages*.lock write-package-cache-key name: Write package cache key - restore_cache: - key: package-7f7bcfc7f39c7e62aeba7d94b345a3ebdf2ab7f8-{{checksum ".buildcache/cache-keys/package-7f7bcfc7f39c7e62aeba7d94b345a3ebdf2ab7f8"}} + key: package-d10bc84044e1ad705f48cd51591b05ee5e1e7dd5-{{checksum ".buildcache/cache-keys/package-d10bc84044e1ad705f48cd51591b05ee5e1e7dd5"}} name: Restore package cache - run: command: |2 @@ -1175,11 +1175,11 @@ jobs: command: make -C packages*.lock write-builder-cache-keys name: Write builder layer cache keys - restore_cache: - key: copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} + key: copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} keys: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} name: 'Restore Builder Image Cache: copy-source' - run: command: make -C packages*.lock load-builder-cache @@ -1207,12 +1207,12 @@ jobs: - save_cache: paths: - .buildcache/packages/store - key: package-7f7bcfc7f39c7e62aeba7d94b345a3ebdf2ab7f8-{{checksum ".buildcache/cache-keys/package-7f7bcfc7f39c7e62aeba7d94b345a3ebdf2ab7f8"}} + key: package-d10bc84044e1ad705f48cd51591b05ee5e1e7dd5-{{checksum ".buildcache/cache-keys/package-d10bc84044e1ad705f48cd51591b05ee5e1e7dd5"}} name: Save package cache environment: - PACKAGE_SPEC_ID: 7f7bcfc7f39c7e62aeba7d94b345a3ebdf2ab7f8 + PACKAGE_SPEC_ID: d10bc84044e1ad705f48cd51591b05ee5e1e7dd5 workflows: - build-fd66eb9f99de501d: + build-645fb387fb0a87de: jobs: - build-common-layers: {} - darwin_amd64_package: diff --git a/.circleci/config/executors/@executors.yml b/.circleci/config/executors/@executors.yml new file mode 100644 index 000000000..7e95bd3c5 --- /dev/null +++ b/.circleci/config/executors/@executors.yml @@ -0,0 +1,10 @@ +go-machine: + machine: + image: 'ubuntu-2004:202107-02' + resource_class: large + working_directory: ~/boundary +go-machine-medium: + machine: + image: 'ubuntu-2004:202107-02' + resource_class: medium + working_directory: ~/boundary diff --git a/.circleci/config/jobs/build.yml b/.circleci/config/jobs/build.yml index 87a76947a..9efbe0e0c 100644 --- a/.circleci/config/jobs/build.yml +++ b/.circleci/config/jobs/build.yml @@ -1,7 +1,4 @@ -resource_class: large -machine: - image: 'ubuntu-2004:202107-02' -working_directory: ~/boundary +executor: go-machine steps: - checkout - run: diff --git a/.circleci/config/jobs/test-sql.yml b/.circleci/config/jobs/test-sql.yml index f82933aa1..671be2394 100644 --- a/.circleci/config/jobs/test-sql.yml +++ b/.circleci/config/jobs/test-sql.yml @@ -1,6 +1,4 @@ -machine: - image: 'ubuntu-2004:202107-02' -working_directory: ~/boundary +executor: go-machine-medium parameters: postgres-version: type: string diff --git a/.circleci/config/workflows/default.yml b/.circleci/config/workflows/ci.yml similarity index 100% rename from .circleci/config/workflows/default.yml rename to .circleci/config/workflows/ci.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index fb5dfe30a..d6b8de7b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,18 @@ Canonical reference for changes, improvements, and bugfixes for Boundary. ## Next +## 0.6.2 (2021/09/27) + ### Deprecations/Changes +* permissions: Fix bug in _Host Sets_ service that authenticated requests + againist incorrect grant actions. This bug affects the _SetHosts_, _AddHosts_ + and _RemoveHosts_ paths that do not have wildcard (`*`) action grants. + If affected, please update grant actions as follows: +* * `set-host-sets` -> `set-hosts` +* * `add-host-sets` -> `add-hosts` +* * `remove-host-sets` -> `remove-hosts` + ([PR](https://github.com/hashicorp/boundary/pull/1549)). * Removes support for the `auth-methods/:authenticate:login` action that was deprecated in [Boundary 0.2.0](#020-20210414), please use `auth-methods/:authenticate` instead. diff --git a/Makefile b/Makefile index 48b4efa1c..1176bbd69 100644 --- a/Makefile +++ b/Makefile @@ -139,6 +139,13 @@ protobuild: @protoc-go-inject-tag -input=./internal/scheduler/job/store/job.pb.go @protoc-go-inject-tag -input=./internal/credential/store/credential.pb.go @protoc-go-inject-tag -input=./internal/credential/vault/store/vault.pb.go + @protoc-go-inject-tag -input=./internal/servers/servers.pb.go + + # inject classification tags (see: https://github.com/hashicorp/go-eventlogger/tree/main/filters/encrypt) + @protoc-go-inject-tag -input=./internal/gen/controller/api/services/auth_method_service.pb.go + @protoc-go-inject-tag -input=./sdk/pbs/controller/api/resources/authmethods/auth_method.pb.go + @protoc-go-inject-tag -input=./sdk/pbs/controller/api/resources/scopes/scope.pb.go + # these protos, services and openapi artifacts are purely for testing purposes @protoc-go-inject-tag -input=./internal/gen/testing/event/event.pb.go @@ -181,7 +188,7 @@ install-go: # Docker build and publish variables and targets REGISTRY_NAME?=docker.io/hashicorp IMAGE_NAME=boundary -VERSION?=0.6.1 +VERSION?=0.6.2 IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):$(VERSION) IMAGE_TAG_DEV=$(REGISTRY_NAME)/$(IMAGE_NAME):latest-$(shell git rev-parse --short HEAD) DOCKER_DIR=./docker diff --git a/api/go.mod b/api/go.mod index 0474b4ee1..83b9febd2 100644 --- a/api/go.mod +++ b/api/go.mod @@ -5,7 +5,7 @@ go 1.15 require ( github.com/fatih/structs v1.1.0 github.com/hashicorp/go-cleanhttp v0.5.2 - github.com/hashicorp/go-kms-wrapping v0.6.5 + github.com/hashicorp/go-kms-wrapping v0.6.6 github.com/hashicorp/go-retryablehttp v0.6.8 github.com/hashicorp/go-rootcerts v1.0.2 github.com/hashicorp/go-secure-stdlib/parseutil v0.1.1 diff --git a/api/go.sum b/api/go.sum index 36e924555..590577ce9 100644 --- a/api/go.sum +++ b/api/go.sum @@ -191,8 +191,8 @@ github.com/hashicorp/go-hclog v0.16.2 h1:K4ev2ib4LdQETX5cSZBG0DVLk1jwGqSPXBjdah3 github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.1.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-kms-wrapping v0.6.5 h1:iKcwiqpm2dvkMLymEyJQpbazwR70l7XINUPFduLdbAs= -github.com/hashicorp/go-kms-wrapping v0.6.5/go.mod h1:9aLqFi2fqK1WMCyTe9bVjB0X6XxCxD+oINL1ovxpgJE= +github.com/hashicorp/go-kms-wrapping v0.6.6 h1:S2lw/8CFAw5kcztPD9iABG8ekjOs5san9C2oZrY6Syw= +github.com/hashicorp/go-kms-wrapping v0.6.6/go.mod h1:9aLqFi2fqK1WMCyTe9bVjB0X6XxCxD+oINL1ovxpgJE= github.com/hashicorp/go-kms-wrapping/entropy v0.1.0/go.mod h1:d1g9WGtAunDNpek8jUIEJnBlbgKS1N2Q61QkHiZyR1g= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= diff --git a/ci/goinstall.sh b/ci/goinstall.sh index 1a4281d7a..41fe00c30 100755 --- a/ci/goinstall.sh +++ b/ci/goinstall.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -VERSION="1.16.7" +VERSION="1.17.1" [ -z "$GOROOT" ] && GOROOT="$HOME/.go" [ -z "$GOPATH" ] && GOPATH="$HOME/go" diff --git a/depowners.md b/depowners.md index de75af9e1..089092798 100644 --- a/depowners.md +++ b/depowners.md @@ -86,6 +86,9 @@ the first place. * github.com/kr/pretty * Jeff * github.com/lib/pq + * Jim + * Mike +* github.com/jackc/pgx * Jim * Mike * github.com/mattn/go-colorable diff --git a/docker/Release.dockerfile b/docker/Release.dockerfile index 2a52c965f..5213ea63a 100644 --- a/docker/Release.dockerfile +++ b/docker/Release.dockerfile @@ -1,6 +1,6 @@ FROM docker.mirror.hashicorp.services/alpine:3.13.6 -ARG VERSION=0.6.1 +ARG VERSION=0.6.2 LABEL name="Boundary" \ maintainer="HashiCorp Boundary Team " \ diff --git a/go.mod b/go.mod index b32a39b0b..86e8fc1dd 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,10 @@ replace github.com/hashicorp/boundary/api => ./api replace github.com/hashicorp/boundary/sdk => ./sdk +// tmp use of local clone as we understand any required upstream PRs to +// compatibility. +replace gorm.io/gorm => github.com/hashicorp/gorm v0.0.2 + require ( github.com/armon/go-metrics v0.3.9 github.com/bufbuild/buf v0.37.0 @@ -20,13 +24,13 @@ require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.6.0 github.com/hashicorp/boundary-plugin-host-aws v0.0.0-20210928175609-6345faccf578 github.com/hashicorp/boundary-plugin-host-azure v0.0.0-20210930043837-3542fae64d2e - github.com/hashicorp/boundary/api v0.0.18 + github.com/hashicorp/boundary/api v0.0.19 github.com/hashicorp/boundary/sdk v0.0.11-0.20210928201932-8b1ca4b0b8b9 github.com/hashicorp/cap v0.1.1 github.com/hashicorp/dawdle v0.4.0 github.com/hashicorp/dbassert v0.0.0-20210708202608-ecf920cf1ed8 github.com/hashicorp/eventlogger v0.1.0 - github.com/hashicorp/eventlogger/filters/encrypt v0.1.3 + github.com/hashicorp/eventlogger/filters/encrypt v0.1.4-0.20210928205053-80364fba97eb github.com/hashicorp/go-bexpr v0.1.10 github.com/hashicorp/go-cleanhttp v0.5.2 github.com/hashicorp/go-hclog v0.16.2 @@ -47,14 +51,14 @@ require ( github.com/hashicorp/go-uuid v1.0.2 github.com/hashicorp/hcl v1.0.0 github.com/hashicorp/vault/api v1.1.1 + github.com/hashicorp/vault/sdk v0.2.1 github.com/iancoleman/strcase v0.2.0 + github.com/jackc/pgconn v1.10.0 + github.com/jackc/pgx/v4 v4.11.0 github.com/jefferai/keyring v1.1.7-0.20210105022822-8749b3d9ce79 - github.com/jinzhu/gorm v1.9.16 - github.com/jinzhu/now v1.1.1 // indirect - github.com/json-iterator/go v1.1.10 // indirect + github.com/jinzhu/gorm v1.9.12 github.com/kr/pretty v0.3.0 github.com/kr/text v0.2.0 - github.com/lib/pq v1.10.3 github.com/mattn/go-colorable v0.1.8 github.com/mitchellh/cli v1.1.2 github.com/mitchellh/copystructure v1.2.0 @@ -82,6 +86,8 @@ require ( google.golang.org/grpc v1.40.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 google.golang.org/protobuf v1.27.1 + gorm.io/driver/postgres v1.1.0 + gorm.io/gorm v1.21.14 mvdan.cc/gofumpt v0.1.1 nhooyr.io/websocket v1.8.7 ) diff --git a/go.sum b/go.sum index 227e7245c..89441b03a 100644 --- a/go.sum +++ b/go.sum @@ -93,12 +93,14 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ClickHouse/clickhouse-go v1.3.12/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/semver/v3 v3.0.3 h1:znjIyLfpXEDQjOIEWh+ehwpTU14UzUPub3c3sm36u14= github.com/Masterminds/semver/v3 v3.0.3/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= +github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= @@ -111,7 +113,10 @@ github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61 github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -120,9 +125,10 @@ github.com/alexbrainman/sspi v0.0.0-20180613141037-e580b900e9f5/go.mod h1:976q2E github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190620160927-9418d7b0cd0f h1:oRD16bhpKNAanfcDDVU+J0NXqsgHIvGbbe/sy+r6Rs0= github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190620160927-9418d7b0cd0f/go.mod h1:myCDvQSzCW+wB1WAlocEru4wMGJxy+vlxHdhegi1CDQ= github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190307165228-86c17b95fcd5/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= -github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/arrow/go/arrow v0.0.0-20200601151325-b2287a20f230/go.mod h1:QNYViu/X0HXDHw7m3KXzWSVXIbfUvJqBFe6Gj8/pYA0= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apex/log v1.9.0 h1:FHtw/xuaM8AgmvDDTI9fiwoAL25Sq2cxojnZICUU8l0= github.com/apex/log v1.9.0/go.mod h1:m82fZlWIuiWzWP04XCTXmnX0xRkYYbCdYn8jbJeLBEA= github.com/apex/logs v1.0.0/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo= @@ -138,12 +144,16 @@ github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4 github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.17.7/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.30.27/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.40.44 h1:kECaYybTWYZY5IKHvQMxbE6Wi5Qrb+7hbkV7zQV3Sg8= github.com/aws/aws-sdk-go v1.40.44/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -160,6 +170,9 @@ github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dR github.com/bufbuild/buf v0.37.0 h1:11zJVA0D4uJVGOC9h+oOVHrKKoBgMYIqJJ0d1Xt6oeQ= github.com/bufbuild/buf v0.37.0/go.mod h1:lQ1m2HkIaGOFba6w/aC3KYBHhKEOESP3gaAEpS3dAFM= github.com/c2h5oh/datasize v0.0.0-20200112174442-28bbd4740fee/go.mod h1:S/7n9copUssQ56c7aAgHqftWO4LTf4xY6CGWt8Bc+3M= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v3 v3.0.0 h1:ske+9nBpD9qZsTBoF41nW5L+AIuFBKMeze18XQ3eG1c= github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= github.com/cenkalti/backoff/v4 v4.0.2/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg= @@ -173,13 +186,17 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/cockroach-go v0.0.0-20190925194419-606b3d062051/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= @@ -201,9 +218,12 @@ github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkE github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-oidc/v3 v3.0.0 h1:/mAA0XMgYJw2Uqm7WKGCsKnjitE/+A0FFbOmiRJm7LQ= github.com/coreos/go-oidc/v3 v3.0.0/go.mod h1:rEJ/idjfUyfkBit1eI1fvyr+64/g9dcKpAm8MJMesvo= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= @@ -246,7 +266,12 @@ github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b h1:HBah4D48ypg3J7Np4N+HY/ZR76fx3HEUGxDU6Uk39oQ= github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -266,6 +291,8 @@ github.com/favadi/protoc-go-inject-tag v1.3.0 h1:JPrmsmc/uBShG85uY5xGZIa5WJ0IaNZ github.com/favadi/protoc-go-inject-tag v1.3.0/go.mod h1:SSkUBgfqw2IJ2p7NPNKWk0Idwxt/qIt2LQgFPUgRGtc= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.10.0 h1:Gfh+GAJZOAoKZsIZeZbdn2JF10kN1XHNvjsvQK8gVkE= github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -282,11 +309,13 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= github.com/go-ldap/ldap/v3 v3.1.3/go.mod h1:3rbOH3jRS2u6jg2rJnKAMLE/xQyCKIveG2Sa/Cohzb8= github.com/go-ldap/ldap/v3 v3.1.10/go.mod h1:5Zun81jBTabRaI8lzN7E1JjyEl1g6zI6u9pd8luAK4Q= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= @@ -317,9 +346,12 @@ github.com/godbus/dbus/v5 v5.0.3 h1:ZqHaoEF7TBzh4jzPmqVhE/5A1z9of6orkAe5uHoAeME= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.8.0 h1:MSdYClljsF3PbENUUEx85nkWfJSGfzYI9yEBZOJz6CY= github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -332,6 +364,7 @@ github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2V github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -364,6 +397,7 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -396,6 +430,7 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -412,12 +447,15 @@ github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2z github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.0/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.6.0 h1:rgxjzoDmDXw5q8HONgyHhBas4to0/XWRo/gPpJhsUNQ= @@ -430,7 +468,9 @@ github.com/hashicorp/boundary-plugin-host-azure v0.0.0-20210930043837-3542fae64d github.com/hashicorp/cap v0.1.1 h1:GjO4+9+H0wv/89YoEsxeVc2jIizL19r5v5l2lpaH8Kg= github.com/hashicorp/cap v0.1.1/go.mod h1:VfBvK2ULRyqsuqAnjgZl7HJ7/CGMC7ro4H5eXiZuun8= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/dawdle v0.4.0 h1:nAE+aCoAmVulgCPPPrp6oGOykjPhxEe4VUNms/mTKeA= github.com/hashicorp/dawdle v0.4.0/go.mod h1:gOBY8rFXpW4Rw39up1FIacw/1pG/fO779LfchCY3KUw= github.com/hashicorp/dbassert v0.0.0-20210708202608-ecf920cf1ed8 h1:/3iubtqEdLgdXB6ue+WAKvbcpn313jjL5mQvU5ByymE= @@ -440,8 +480,9 @@ github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/eventlogger v0.1.0 h1:S6xc4gZVzewuDUP4R4Ngko419h/CGDuV/b4ADL3XLik= github.com/hashicorp/eventlogger v0.1.0/go.mod h1:a3IXf1aEJfpCPzseTOrwKj4fVW/Qn3oEmpQeaIznzH0= -github.com/hashicorp/eventlogger/filters/encrypt v0.1.3 h1:RKYUGplnpDoE/Cj2vupQqUJS/wWBVvmpxEYeEpGL88s= github.com/hashicorp/eventlogger/filters/encrypt v0.1.3/go.mod h1:8rcez7Kw1zanB0/074qnOuGu7zxmNh9Xr2ZI+K4xVIA= +github.com/hashicorp/eventlogger/filters/encrypt v0.1.4-0.20210928205053-80364fba97eb h1:AhprXfDoXGI8hP5fUCyCB29jpfd01Ck996ErqG0nVGk= +github.com/hashicorp/eventlogger/filters/encrypt v0.1.4-0.20210928205053-80364fba97eb/go.mod h1:8rcez7Kw1zanB0/074qnOuGu7zxmNh9Xr2ZI+K4xVIA= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= @@ -524,6 +565,8 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.3 h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8Bppgk= github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/gorm v0.0.2 h1:yxEp0og8mswtQVSEnxEsU+d3QIvYDqU+P5ABAm0B9n4= +github.com/hashicorp/gorm v0.0.2/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -547,6 +590,7 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huaweicloud/golangsdk v0.0.0-20200304081349-45ec0797f2a4/go.mod h1:WQBcHRNX9shz3928lWEvstQJtAtYI7ks6XlgtRT9Tcw= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -555,30 +599,66 @@ github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= +github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA= github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE= github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s= github.com/jackc/pgconn v1.3.2/go.mod h1:LvCquS3HbBKwgl7KbX9KyqEIumJAbm1UMcTvGaIf3bM= +github.com/jackc/pgconn v1.4.0/go.mod h1:Y2O3ZDF0q4mMacyWV3AstPJpeHXWGEetiFttmq5lahk= +github.com/jackc/pgconn v1.5.0/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= +github.com/jackc/pgconn v1.5.1-0.20200601181101-fa742c524853/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= +github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= +github.com/jackc/pgconn v1.8.1/go.mod h1:JV6m6b6jhjdmzchES0drzCcYcAHS1OPD5xu3OZ/lE2g= +github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= +github.com/jackc/pgconn v1.10.0 h1:4EYhlDVEMsJ30nNj0mmgwIUXoq7e9sMJrVC2ED6QlCU= +github.com/jackc/pgconn v1.10.0/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= +github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= +github.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c= +github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 h1:DadwsjnMwFjfWc9y5Wi/+Zz7xoE5ALHsRQlOctkOiHc= +github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak= +github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= +github.com/jackc/pgproto3 v1.1.0 h1:FYYE4yRw+AgI8wXIinMlNjBbp/UitDJwfj5LqqewP1A= github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78= github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA= github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg= github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= github.com/jackc/pgproto3/v2 v2.0.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgproto3/v2 v2.1.1 h1:7PQ/4gLoqnl87ZxL7xjO0DR5gYuviDCZxQJsUlFW1eI= +github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= +github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= +github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= +github.com/jackc/pgtype v1.2.0/go.mod h1:5m2OfMh1wTK7x+Fk952IDmI4nw3nPrvtQdM0ZT4WpC0= +github.com/jackc/pgtype v1.3.1-0.20200510190516-8cd94a14c75a/go.mod h1:vaogEUkALtxZMCH411K+tKzNpwzCKU+AnPzBKZ+I+Po= +github.com/jackc/pgtype v1.3.1-0.20200606141011-f6355165a91c/go.mod h1:cvk9Bgu/VzJ9/lxTO5R5sf80p0DiucVtN7ZxvaC4GmQ= +github.com/jackc/pgtype v1.7.0 h1:6f4kVsW01QftE38ufBYxKciO6gyioXSC0ABIRLcZrGs= +github.com/jackc/pgtype v1.7.0/go.mod h1:ZnHF+rMePVqDKaOfJVI4Q8IVvAQMryDlDkZnKOI75BE= github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= +github.com/jackc/pgx/v4 v4.5.0/go.mod h1:EpAKPLdnTorwmPUUsqrPxy5fphV18j9q3wrfRXgo+kA= +github.com/jackc/pgx/v4 v4.6.1-0.20200510190926-94ba730bb1e9/go.mod h1:t3/cdRQl6fOLDxqtlyhe9UWgfIi9R8+8v8GKV5TRA/o= +github.com/jackc/pgx/v4 v4.6.1-0.20200606145419-4e5062306904/go.mod h1:ZDaNWkt9sW1JMiNn0kdYBaLelIhw7Pg4qd+Vk6tw7Hg= +github.com/jackc/pgx/v4 v4.11.0 h1:J86tSWd3Y7nKjwT/43xZBvpi04keQWx8gNC2YkdJhZI= +github.com/jackc/pgx/v4 v4.11.0/go.mod h1:i62xJgdrtVDsnL3U8ekyrQXEwGNTRoG7/8r+CIdYfcc= github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v1.1.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v1.1.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM= github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= @@ -593,14 +673,13 @@ github.com/jefferai/keyring v1.1.7-0.20210105022822-8749b3d9ce79 h1:7opZgeTbZEBf github.com/jefferai/keyring v1.1.7-0.20210105022822-8749b3d9ce79/go.mod h1:Y6M+VPkRv4aOcVNvvSWma4aMRLY+xvPhzZX3tDmPoPY= github.com/jhump/protoreflect v1.8.1 h1:z7Ciiz3Bz37zSd485fbiTW8ABafIasyOWZI0N9EUUdo= github.com/jhump/protoreflect v1.8.1/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= +github.com/jinzhu/gorm v1.9.12 h1:Drgk1clyWT9t9ERbzHza6Mj/8FY/CqMyVzOiHviMo6Q= github.com/jinzhu/gorm v1.9.12/go.mod h1:vhTjlKSJUTWNtcbQtrMBFCxy7eXTzeCAzfL5fBZT/Qs= -github.com/jinzhu/gorm v1.9.16 h1:+IyIjPEABKRpsu/F8OvDPy9fyQlgsg2luMV2ZIH5i5o= -github.com/jinzhu/gorm v1.9.16/go.mod h1:G3LB3wezTOWM2ITLzPxEXgSkOXAntiLHS7UdBefADcs= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= -github.com/jinzhu/now v1.1.1 h1:g39TucaRWyV3dwDO++eEc6qf8TVIQ/Da48WmqjZ3i7E= -github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/jinzhu/now v1.1.2 h1:eVKgfIdy9b6zbWBMgFpfDPoAMifwSZagU9HmEU6zgiI= +github.com/jinzhu/now v1.1.2/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= @@ -612,6 +691,8 @@ github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22 github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0= github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -642,6 +723,7 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -660,10 +742,13 @@ github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.6.0/go.mod h1:4vXEAYvW1fRQ2/FhZ78H73A60MHw1geSm145z2mdY1g= +github.com/lib/pq v1.8.0 h1:9xohqzkUwzR4Ga4ivdTcawVS89YSDVxXMa3xJX3cGzg= github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lib/pq v1.10.3 h1:v9QZf2Sn6AmjXtQeFpdoq/eaNtYP6IN+7lcrygsIAtg= -github.com/lib/pq v1.10.3/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/manicminer/hamilton v0.30.0 h1:n7og9/Xh4d/JX0XG0uG1rv2vlkIkz8jwynCWoQszZvA= github.com/manicminer/hamilton v0.30.0/go.mod h1:QryxpD/4+cdKuXNi0UjLDvgxYdP0LLmYz7dYU7DAX4U= @@ -676,17 +761,19 @@ github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1yA= github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus= github.com/mattn/go-sqlite3 v2.0.1+incompatible h1:xQ15muvnzGBHpIpdrNi1DA5x0+TcBZzsIDwmw9uTHzw= github.com/mattn/go-sqlite3 v2.0.1+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -741,19 +828,31 @@ github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ib github.com/mutecomm/go-sqlcipher/v4 v4.4.0/go.mod h1:PyN04SaWalavxRGH9E8ZftG6Ju7rsPrGmQRjrEaVpiY= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8/go.mod h1:86wM1zFnC6/uDBfZGNwB65O+pR2OFi5q/YQaEUid1qA= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/neo4j/neo4j-go-driver v1.8.1-0.20200803113522-b626aa943eba/go.mod h1:ncO5VaFWh0Nrt+4KT4mOZboaczBZcLuHrG+/sUeP8gI= github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/oligot/go-mod-upgrade v0.6.1 h1:AZnCiEAOxOMxpKZWjFWFNm/i6QjZVBozuKjuB8EzRCk= github.com/oligot/go-mod-upgrade v0.6.1/go.mod h1:5Gyau3jUXqXrGhYxGkGqrxxgR90Lzd1yt/9YQp9sn1w= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -765,17 +864,29 @@ github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59P github.com/opencontainers/runc v1.0.0-rc9 h1:/k06BMULKF5hidyoZymkoDCzdJzltZpz/UU4LguQVtc= github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/oracle/oci-go-sdk v12.5.0+incompatible h1:pr08ECoaDKHWO9tnzJB1YqClEs7ZK1CFOez2DQocH14= github.com/oracle/oci-go-sdk v12.5.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888= github.com/ory/dockertest/v3 v3.6.0/go.mod h1:4ZOpj8qBUmh8fcBSVzkH2bws2s91JdGvHUqan4GHEuQ= github.com/ory/dockertest/v3 v3.7.0 h1:Bijzonc69Ont3OU0a3TWKJ1Rzlh3TsDXP1JrTAkSmsM= github.com/ory/dockertest/v3 v3.7.0/go.mod h1:PvCCgnP7AfBZeVrzwiUTjZx/IUXlGLC1zQlUQrLIlUE= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.5.2+incompatible h1:WCjObylUIOlKy/+7Abdn34TLIkXiA4UWUMhxq9m9ZXI= github.com/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= @@ -787,6 +898,7 @@ github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/profile v1.5.0 h1:042Buzk+NhDI+DeSAA62RwJL8VAuZUMQZUjCsRz1Mug= github.com/pkg/profile v1.5.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -796,25 +908,33 @@ github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXq github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -832,11 +952,14 @@ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= +github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc h1:jUIKcSPO9MoMJBbEoyE/RJoE8vz7Mb8AjvifMMwSyvY= +github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= @@ -857,19 +980,25 @@ github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4S github.com/snowflakedb/glog v0.0.0-20180824191149-f5055e6f21ce/go.mod h1:EB/w24pR5VKI60ecFnKqXzxX3dOorz1rnVicQTQrGM0= github.com/snowflakedb/gosnowflake v1.3.5/go.mod h1:13Ky+lxzIm3VqNDZJdyvu9MCGy+WgRdYFdXp96UcLZU= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.0.1-0.20201006035406-b97b5ead31f7/go.mod h1:yk5b0mALVusDL5fMM6Rd1wgnoO5jUPhwsQ6LQAJTidQ= github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= @@ -894,6 +1023,7 @@ github.com/tj/go-buffer v1.1.0/go.mod h1:iyiJpfFcR2B9sXu7KvjbT9fpM4mOelRSDTbntVj github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0= github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao= github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/twitchtv/twirp v7.1.0+incompatible h1:3fNSDoSPyq+fTrifIvGue9XM/tptzuhiGY83rxPVNUg= @@ -902,8 +1032,10 @@ github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5 h1:MCfT24H3f//U5+UCrZp1/riVO3B50BovxtDiNn0XKkk= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.3.0 h1:qph92Y649prgesehzOrQjdWyxFOp/QVM+6imKHad91M= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= @@ -933,7 +1065,11 @@ github.com/zclconf/go-cty v1.2.1/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= gitlab.com/nyarla/go-crypt v0.0.0-20160106005555-d9a5dc2b789b/go.mod h1:T3BPAOm2cqquPa0MKWeNkmOM5RQsRhkrwMWonFMN7fE= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.mongodb.org/mongo-driver v1.1.0/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -944,6 +1080,7 @@ go.opencensus.io v0.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= @@ -951,12 +1088,14 @@ go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.0.0 h1:qsup4IcBdlmsnGfqyLl4Ntn3C2XCCuKAE7DwHpScyUo= go.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.16.0 h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -972,18 +1111,23 @@ golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210915214749-c084706c2272 h1:3erb+vDS8lU1sxfDHF4/hhWyaXnhIaO+7RgL4fDZORA= golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -1033,6 +1177,7 @@ golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190225153610-fe579d43d832/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -1084,6 +1229,7 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f h1:Qmd2pbz05z7z6lm0DrgQVVPuBm92jqujBKMHMOlOQEw= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= @@ -1105,6 +1251,7 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1121,12 +1268,14 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1159,6 +1308,7 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210917161153-d61c044b1678 h1:J27LZFQBFoihqXoegpscI10HpjZ7B5WQLLKL2FZXQKw= golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210916214954-140adaaadfaf h1:Ihq/mm/suC88gF8WFcVwk+OV6Tq+wyA1O0E5UEvDglI= golang.org/x/term v0.0.0-20210916214954-140adaaadfaf/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1168,9 +1318,11 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1178,6 +1330,7 @@ golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjToGsyY4j24pTs2ScHnX7s= golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1209,6 +1362,7 @@ golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1236,6 +1390,7 @@ golang.org/x/tools v0.0.0-20200818005847-188abfa75333/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210101214203-2dba1e4ea05c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6 h1:SIasE1FVIQOWz2GEAHFOmoW7xchJcqlucjSULTL0Ag4= golang.org/x/tools v0.1.6/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= @@ -1246,6 +1401,7 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -1265,6 +1421,7 @@ google.golang.org/api v0.30.0 h1:yfrXXP61wVuLb0vBcG6qaOoIoqYEzOQS8jum51jkv2w= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/appengine v1.0.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1279,6 +1436,7 @@ google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= @@ -1310,13 +1468,18 @@ google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200911024640-645f7a48b24f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201030142918-24207fddd1c3/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210207032614-bba0dbe2a9ea/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83 h1:3V2dxSZpz4zozWWUq36vUxXEKnSYitEH2LdsAx+RUmg= google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -1360,9 +1523,11 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= @@ -1379,6 +1544,7 @@ gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76 gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w= gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1394,10 +1560,13 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gorm.io/driver/postgres v1.1.0 h1:afBljg7PtJ5lA6YUWluV2+xovIPhS+YiInuL3kUjrbk= +gorm.io/driver/postgres v1.1.0/go.mod h1:hXQIwafeRjJvUm+OMxcFWyswJ/vevcpPLlGocwAwuqw= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2 h1:kG1BFyqVHuQoVQiR1bWGnfz/fmHvvuiSPIV7rvl360E= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1425,3 +1594,5 @@ nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0 rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/internal/auth/db_test.go b/internal/auth/db_test.go index ad20ca967..3a63e1491 100644 --- a/internal/auth/db_test.go +++ b/internal/auth/db_test.go @@ -2,6 +2,7 @@ package auth import ( "context" + "database/sql" "testing" "github.com/hashicorp/boundary/internal/db" @@ -23,7 +24,7 @@ create table if not exists test_auth_method ( insert into test_auth_method (public_id, scope_id) values - ($1, $2); + (@public_id, @scoped_id); ` addTriggers = ` create trigger @@ -33,10 +34,10 @@ insert on test_auth_method for each row execute procedure insert_auth_method_subtype(); ` baseTableQuery = ` -select count(*) from auth_method where public_id = $1; +select count(*) from auth_method where public_id = @public_id ` testTableQuery = ` -select count(*) from test_auth_method where public_id = $1; +select count(*) from test_auth_method where public_id = @public_id ` ) @@ -55,7 +56,7 @@ select count(*) from test_auth_method where public_id = $1; org, _ := iam.TestScopes(t, iam.TestRepo(t, conn, wrapper)) id := "l1Ocw0TpHn800CekIxIXlmQqRDgFDfYl" - inserted, err := rw.Exec(ctx, insert, []interface{}{id, org.GetPublicId()}) + inserted, err := rw.Exec(ctx, insert, []interface{}{sql.Named("public_id", id), sql.Named("scoped_id", org.GetPublicId())}) require.NoError(err) require.Equal(1, inserted) @@ -63,7 +64,7 @@ select count(*) from test_auth_method where public_id = $1; Count int } var count c - rows, err := rw.Query(ctx, baseTableQuery, []interface{}{id}) + rows, err := rw.Query(ctx, baseTableQuery, []interface{}{sql.Named("public_id", id)}) require.NoError(err) defer rows.Close() for rows.Next() { @@ -73,7 +74,7 @@ select count(*) from test_auth_method where public_id = $1; assert.Equal(1, count.Count) count.Count = 0 - rows, err = rw.Query(ctx, testTableQuery, []interface{}{id}) + rows, err = rw.Query(ctx, testTableQuery, []interface{}{sql.Named("public_id", id)}) require.NoError(err) defer rows.Close() for rows.Next() { @@ -96,7 +97,7 @@ create table if not exists test_auth_account ( insert into test_auth_account (public_id, auth_method_id) values - ($1, $2); + (?, ?); ` addTriggers = ` create trigger @@ -106,16 +107,16 @@ insert on test_auth_account for each row execute procedure insert_auth_account_subtype(); ` baseTableQuery = ` -select count(*) from auth_account where public_id = $1; +select count(*) from auth_account where public_id = ?; ` testTableQuery = ` -select count(*) from test_auth_account where public_id = $1; +select count(*) from test_auth_account where public_id = ?; ` insertAuthMethod = ` insert into auth_method (public_id, scope_id) values - ($1, $2); + (?, ?); ` ) diff --git a/internal/auth/oidc/repository_account_test.go b/internal/auth/oidc/repository_account_test.go index 443462d33..62dc111da 100644 --- a/internal/auth/oidc/repository_account_test.go +++ b/internal/auth/oidc/repository_account_test.go @@ -1160,7 +1160,9 @@ func TestRepository_UpdateAccount(t *testing.T) { assert.Equal(tt.wantCount, gotCount, "row count") assert.NotSame(tt.orig, got) assert.Equal(tt.orig.AuthMethodId, got.AuthMethodId) - dbassert := dbassert.New(t, conn.DB()) + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(err) + dbassert := dbassert.New(t, underlyingDB) if tt.want.Name == "" { dbassert.IsNull(got, "name") return diff --git a/internal/auth/oidc/repository_auth_method.go b/internal/auth/oidc/repository_auth_method.go index 3b3e3e879..da8dbb569 100644 --- a/internal/auth/oidc/repository_auth_method.go +++ b/internal/auth/oidc/repository_auth_method.go @@ -2,6 +2,7 @@ package oidc import ( "context" + "database/sql" "encoding/json" "fmt" "net/url" @@ -73,7 +74,12 @@ func (r *Repository) upsertAccount(ctx context.Context, am *AuthMethod, IdTokenC } columns := []string{"public_id", "auth_method_id", "issuer", "subject"} - values := []interface{}{pubId, am.PublicId, iss, sub} + values := []interface{}{ + sql.Named("1", pubId), + sql.Named("2", am.PublicId), + sql.Named("3", iss), + sql.Named("4", sub), + } var conflictClauses, fieldMasks, nullMasks []string { @@ -81,8 +87,8 @@ func (r *Repository) upsertAccount(ctx context.Context, am *AuthMethod, IdTokenC if err != nil { return nil, errors.Wrap(ctx, err, op) } - columns, values = append(columns, "token_claims"), append(values, string(marshaledTokenClaims)) - conflictClauses = append(conflictClauses, fmt.Sprintf("token_claims = $%d", len(values))) + columns, values = append(columns, "token_claims"), append(values, sql.Named(fmt.Sprintf("%d", len(values)+1), string(marshaledTokenClaims))) + conflictClauses = append(conflictClauses, fmt.Sprintf("token_claims = @%d", len(values))) fieldMasks = append(fieldMasks, TokenClaimsField) } { @@ -90,8 +96,8 @@ func (r *Repository) upsertAccount(ctx context.Context, am *AuthMethod, IdTokenC if err != nil { return nil, errors.Wrap(ctx, err, op) } - columns, values = append(columns, "userinfo_claims"), append(values, string(marshaledAccessTokenClaims)) - conflictClauses = append(conflictClauses, fmt.Sprintf("userinfo_claims = $%d", len(values))) + columns, values = append(columns, "userinfo_claims"), append(values, sql.Named(fmt.Sprintf("%d", len(values)+1), string(marshaledAccessTokenClaims))) + conflictClauses = append(conflictClauses, fmt.Sprintf("userinfo_claims = @%d", len(values))) fieldMasks = append(fieldMasks, UserinfoClaimsField) } @@ -108,14 +114,14 @@ func (r *Repository) upsertAccount(ctx context.Context, am *AuthMethod, IdTokenC switch { case AccessTokenClaims[fromName] != nil: foundName = AccessTokenClaims[fromName] - columns, values = append(columns, "full_name"), append(values, foundName) + columns, values = append(columns, "full_name"), append(values, sql.Named(fmt.Sprintf("%d", len(values)+1), foundName)) case IdTokenClaims[fromName] != nil: foundName = IdTokenClaims[fromName] - columns, values = append(columns, "full_name"), append(values, foundName) + columns, values = append(columns, "full_name"), append(values, sql.Named(fmt.Sprintf("%d", len(values)+1), foundName)) } if foundName != nil { acctForOplog.FullName = foundName.(string) - conflictClauses = append(conflictClauses, fmt.Sprintf("full_name = $%d", len(values))) + conflictClauses = append(conflictClauses, fmt.Sprintf("full_name = @%d", len(values))) fieldMasks = append(fieldMasks, NameField) } else { conflictClauses = append(conflictClauses, "full_name = NULL") @@ -126,14 +132,14 @@ func (r *Repository) upsertAccount(ctx context.Context, am *AuthMethod, IdTokenC switch { case AccessTokenClaims[fromEmail] != nil: foundEmail = AccessTokenClaims[fromEmail] - columns, values = append(columns, "email"), append(values, foundEmail) + columns, values = append(columns, "email"), append(values, sql.Named(fmt.Sprintf("%d", len(values)+1), foundEmail)) case IdTokenClaims[fromEmail] != nil: foundEmail = IdTokenClaims[fromEmail] - columns, values = append(columns, "email"), append(values, foundEmail) + columns, values = append(columns, "email"), append(values, sql.Named(fmt.Sprintf("%d", len(values)+1), foundEmail)) } if foundEmail != nil { acctForOplog.Email = foundEmail.(string) - conflictClauses = append(conflictClauses, fmt.Sprintf("email = $%d", len(values))) + conflictClauses = append(conflictClauses, fmt.Sprintf("email = @%d", len(values))) fieldMasks = append(fieldMasks, "Email") } else { conflictClauses = append(conflictClauses, "email = NULL") @@ -142,7 +148,7 @@ func (r *Repository) upsertAccount(ctx context.Context, am *AuthMethod, IdTokenC placeHolders := make([]string, 0, len(columns)) for colNum := range columns { - placeHolders = append(placeHolders, fmt.Sprintf("$%d", colNum+1)) + placeHolders = append(placeHolders, fmt.Sprintf("@%d", colNum+1)) } query := fmt.Sprintf(acctUpsertQuery, strings.Join(columns, ", "), strings.Join(placeHolders, ", "), strings.Join(conflictClauses, ", ")) diff --git a/internal/auth/oidc/repository_managed_group_test.go b/internal/auth/oidc/repository_managed_group_test.go index bf8d88a6b..12cbc8db9 100644 --- a/internal/auth/oidc/repository_managed_group_test.go +++ b/internal/auth/oidc/repository_managed_group_test.go @@ -952,7 +952,9 @@ func TestRepository_UpdateManagedGroup(t *testing.T) { assert.Equal(tt.wantCount, gotCount, "row count") assert.NotSame(tt.orig, got) assert.Equal(tt.orig.AuthMethodId, got.AuthMethodId) - dbassert := dbassert.New(t, conn.DB()) + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(err) + dbassert := dbassert.New(t, underlyingDB) if tt.want.Name == "" { dbassert.IsNull(got, "name") return diff --git a/internal/auth/oidc/testing.go b/internal/auth/oidc/testing.go index 2548cc975..d46ff8c6d 100644 --- a/internal/auth/oidc/testing.go +++ b/internal/auth/oidc/testing.go @@ -29,7 +29,6 @@ import ( "github.com/hashicorp/boundary/internal/kms" "github.com/hashicorp/cap/oidc" wrapping "github.com/hashicorp/go-kms-wrapping" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/require" "google.golang.org/protobuf/types/known/timestamppb" ) @@ -41,7 +40,7 @@ const TestFakeManagedGroupFilter = `"/foo" == "bar"` // WithSigningAlgs options are supported. func TestAuthMethod( t *testing.T, - conn *gorm.DB, + conn *db.DB, databaseWrapper wrapping.Wrapper, scopeId string, state AuthMethodState, @@ -158,7 +157,7 @@ func TestSortAuthMethods(t *testing.T, methods []*AuthMethod) { } // TestAccount creates a test oidc auth account. -func TestAccount(t *testing.T, conn *gorm.DB, am *AuthMethod, subject string, opt ...Option) *Account { +func TestAccount(t *testing.T, conn *db.DB, am *AuthMethod, subject string, opt ...Option) *Account { t.Helper() require := require.New(t) rw := db.New(conn) @@ -179,7 +178,7 @@ func TestAccount(t *testing.T, conn *gorm.DB, am *AuthMethod, subject string, op } // TestManagedGroup creates a test oidc managed group. -func TestManagedGroup(t *testing.T, conn *gorm.DB, am *AuthMethod, filter string, opt ...Option) *ManagedGroup { +func TestManagedGroup(t *testing.T, conn *db.DB, am *AuthMethod, filter string, opt ...Option) *ManagedGroup { t.Helper() require := require.New(t) rw := db.New(conn) @@ -197,7 +196,7 @@ func TestManagedGroup(t *testing.T, conn *gorm.DB, am *AuthMethod, filter string } // TestManagedGroupMember adds given account IDs to a managed group -func TestManagedGroupMember(t *testing.T, conn *gorm.DB, managedGroupId, memberId string, opt ...Option) *ManagedGroupMemberAccount { +func TestManagedGroupMember(t *testing.T, conn *db.DB, managedGroupId, memberId string, opt ...Option) *ManagedGroupMemberAccount { t.Helper() require := require.New(t) rw := db.New(conn) diff --git a/internal/auth/password/account.go b/internal/auth/password/account.go index c4ef1ca1d..5aefb08c2 100644 --- a/internal/auth/password/account.go +++ b/internal/auth/password/account.go @@ -14,7 +14,7 @@ type Account struct { // CredentialId is included when Authenticate or ChangePassword is // called. A new CredentialId is generated when a password is changed. - CredentialId string `gorm:"-"` + CredentialId string `gorm:"->"` } func allocAccount() *Account { diff --git a/internal/auth/password/argon2_test.go b/internal/auth/password/argon2_test.go index a970e0345..f53fb4534 100644 --- a/internal/auth/password/argon2_test.go +++ b/internal/auth/password/argon2_test.go @@ -8,7 +8,6 @@ import ( "github.com/hashicorp/boundary/internal/db" "github.com/hashicorp/boundary/internal/errors" "github.com/hashicorp/boundary/internal/iam" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -289,7 +288,7 @@ func TestArgon2Configuration_Validate(t *testing.T) { } } -func testArgon2Confs(t *testing.T, conn *gorm.DB, authMethodId string, count int) []*Argon2Configuration { +func testArgon2Confs(t *testing.T, conn *db.DB, authMethodId string, count int) []*Argon2Configuration { t.Helper() assert, require := assert.New(t), require.New(t) rw := db.New(conn) diff --git a/internal/auth/password/query.go b/internal/auth/password/query.go index 5bfbae9be..737f64b70 100644 --- a/internal/auth/password/query.go +++ b/internal/auth/password/query.go @@ -25,8 +25,8 @@ select acct.name, -- Account.Name auth_password_argon2_conf conf, auth_password_account acct, auth_password_method meth - where acct.auth_method_id = $1 - and acct.login_name = $2 + where acct.auth_method_id = @auth_method_id + and acct.login_name = @login_name and cred.password_conf_id = conf.private_id and cred.password_account_id = acct.public_id and acct.auth_method_id = meth.public_id ; @@ -38,7 +38,7 @@ select * in ( select auth_method_id from auth_password_account - where public_id = $1 + where public_id = @public_id ); ` ) diff --git a/internal/auth/password/repository_account_test.go b/internal/auth/password/repository_account_test.go index 0040cd720..13ee140a7 100644 --- a/internal/auth/password/repository_account_test.go +++ b/internal/auth/password/repository_account_test.go @@ -589,6 +589,7 @@ func TestRepository_UpdateAccount(t *testing.T) { wrapper := db.TestWrapper(t) kms := kms.TestKms(t, conn, wrapper) iamRepo := iam.TestRepo(t, conn, wrapper) + ctx := context.Background() changeLoginName := func(s string) func(*Account) *Account { return func(a *Account) *Account { @@ -949,7 +950,9 @@ func TestRepository_UpdateAccount(t *testing.T) { assert.Equal(tt.wantCount, gotCount, "row count") assert.NotSame(tt.orig, got) assert.Equal(tt.orig.AuthMethodId, got.AuthMethodId) - dbassert := dbassert.New(t, conn.DB()) + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(err) + dbassert := dbassert.New(t, underlyingDB) if tt.want.Name == "" { dbassert.IsNull(got, "name") return diff --git a/internal/auth/password/repository_authmethod_test.go b/internal/auth/password/repository_authmethod_test.go index e43a8e9cb..1c5a073a6 100644 --- a/internal/auth/password/repository_authmethod_test.go +++ b/internal/auth/password/repository_authmethod_test.go @@ -769,7 +769,9 @@ func TestRepository_UpdateAuthMethod(t *testing.T) { require.NoError(err) assert.Empty(cmp.Diff(updatedAM, foundAuthMethod, protocmp.Transform())) - dbassert := dbassert.New(t, conn.DB()) + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(err) + dbassert := dbassert.New(t, underlyingDB) if amToUpdate.Name == "" && contains(tt.args.fieldMaskPaths, "name") { dbassert.IsNull(foundAuthMethod, "name") } diff --git a/internal/auth/password/repository_configuration.go b/internal/auth/password/repository_configuration.go index 8f79deed5..2cffa5841 100644 --- a/internal/auth/password/repository_configuration.go +++ b/internal/auth/password/repository_configuration.go @@ -2,6 +2,7 @@ package password import ( "context" + "database/sql" "github.com/hashicorp/boundary/internal/auth/password/store" "github.com/hashicorp/boundary/internal/db" @@ -143,7 +144,7 @@ func (r *Repository) currentConfigForAccount(ctx context.Context, accountId stri const op = "password.(Repository).currentConfigForAccount" var confs []currentConfig - rows, err := r.reader.Query(ctx, currentConfigForAccountQuery, []interface{}{accountId}) + rows, err := r.reader.Query(ctx, currentConfigForAccountQuery, []interface{}{sql.Named("public_id", accountId)}) if err != nil { return nil, errors.Wrap(ctx, err, op) } diff --git a/internal/auth/password/repository_password.go b/internal/auth/password/repository_password.go index 69ecfced0..1ebbc18a4 100644 --- a/internal/auth/password/repository_password.go +++ b/internal/auth/password/repository_password.go @@ -3,6 +3,7 @@ package password import ( "context" "crypto/subtle" + "database/sql" "fmt" "github.com/hashicorp/boundary/internal/db" @@ -213,7 +214,8 @@ func (r *Repository) authenticate(ctx context.Context, scopeId, authMethodId, lo const op = "password.(Repository).authenticate" var accts []authAccount - rows, err := r.reader.Query(ctx, authenticateQuery, []interface{}{authMethodId, loginName}) + rows, err := r.reader.Query(ctx, authenticateQuery, []interface{}{sql.Named("auth_method_id", authMethodId), sql.Named("login_name", loginName)}) + if err != nil { return nil, errors.Wrap(ctx, err, op) } diff --git a/internal/auth/password/store/password.pb.go b/internal/auth/password/store/password.pb.go index 992547d7d..7a52921a8 100644 --- a/internal/auth/password/store/password.pb.go +++ b/internal/auth/password/store/password.pb.go @@ -56,8 +56,8 @@ type AuthMethod struct { MinPasswordLength uint32 `protobuf:"varint,10,opt,name=min_password_length,json=minPasswordLength,proto3" json:"min_password_length,omitempty" gorm:"default:null"` // is_primary_auth_method is a read-only output field which indicates if the // auth method is set as the scope's primary auth method. - // @inject_tag: `gorm:"-"` - IsPrimaryAuthMethod bool `protobuf:"varint,20,opt,name=is_primary_auth_method,json=isPrimaryAuthMethod,proto3" json:"is_primary_auth_method,omitempty" gorm:"-"` + // @inject_tag: `gorm:"->"` + IsPrimaryAuthMethod bool `protobuf:"varint,20,opt,name=is_primary_auth_method,json=isPrimaryAuthMethod,proto3" json:"is_primary_auth_method,omitempty" gorm:"->"` } func (x *AuthMethod) Reset() { diff --git a/internal/auth/password/testing.go b/internal/auth/password/testing.go index 8b71bda3f..975ed4cb9 100644 --- a/internal/auth/password/testing.go +++ b/internal/auth/password/testing.go @@ -6,7 +6,6 @@ import ( "testing" "github.com/hashicorp/boundary/internal/db" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -14,7 +13,7 @@ import ( // TestAuthMethod creates a password auth methods to the provided DB with the // provided scope id. If any errors are encountered during the creation of the // auth methods, the test will fail. -func TestAuthMethod(t *testing.T, conn *gorm.DB, scopeId string, opt ...Option) *AuthMethod { +func TestAuthMethod(t *testing.T, conn *db.DB, scopeId string, opt ...Option) *AuthMethod { t.Helper() assert, require := assert.New(t), require.New(t) w := db.New(conn) @@ -48,7 +47,7 @@ func TestAuthMethod(t *testing.T, conn *gorm.DB, scopeId string, opt ...Option) // TestAuthMethods creates count number of password auth methods to the provided DB // with the provided scope id. If any errors are encountered during the creation of // the auth methods, the test will fail. -func TestAuthMethods(t *testing.T, conn *gorm.DB, scopeId string, count int) []*AuthMethod { +func TestAuthMethods(t *testing.T, conn *db.DB, scopeId string, count int) []*AuthMethod { t.Helper() var auts []*AuthMethod for i := 0; i < count; i++ { @@ -60,7 +59,7 @@ func TestAuthMethods(t *testing.T, conn *gorm.DB, scopeId string, count int) []* // TestMultipleAccounts creates count number of password account to the provided DB // with the provided auth method id. The auth method must have been created previously. // If any errors are encountered during the creation of the account, the test will fail. -func TestMultipleAccounts(t *testing.T, conn *gorm.DB, authMethodId string, count int) []*Account { +func TestMultipleAccounts(t *testing.T, conn *db.DB, authMethodId string, count int) []*Account { t.Helper() var auts []*Account for i := 0; i < count; i++ { @@ -73,7 +72,7 @@ func TestMultipleAccounts(t *testing.T, conn *gorm.DB, authMethodId string, coun // auth method id and loginName. The auth method must have been created // previously. See password.NewAccount(...) for a list of supported options. // If any errors are encountered during the creation of the account, the test will fail. -func TestAccount(t *testing.T, conn *gorm.DB, authMethodId, loginName string, opt ...Option) *Account { +func TestAccount(t *testing.T, conn *db.DB, authMethodId, loginName string, opt ...Option) *Account { t.Helper() assert, require := assert.New(t), require.New(t) require.NotEmpty(loginName) diff --git a/internal/authtoken/store/authtoken.pb.go b/internal/authtoken/store/authtoken.pb.go index 8a51ac5c9..53ee69e32 100644 --- a/internal/authtoken/store/authtoken.pb.go +++ b/internal/authtoken/store/authtoken.pb.go @@ -55,14 +55,14 @@ type AuthToken struct { // @inject_tag: `gorm:"default:not_null"` AuthAccountId string `protobuf:"bytes,10,opt,name=auth_account_id,json=authAccountId,proto3" json:"auth_account_id,omitempty" gorm:"default:not_null"` // scope_id is not stored in the backing DB but it derived from the linked to auth account. - // @inject_tag: gorm:"-" - ScopeId string `protobuf:"bytes,11,opt,name=scope_id,json=scopeId,proto3" json:"scope_id,omitempty" gorm:"-"` + // @inject_tag: gorm:"->" + ScopeId string `protobuf:"bytes,11,opt,name=scope_id,json=scopeId,proto3" json:"scope_id,omitempty" gorm:"->"` // auth_method_id is not stored in the backing DB but it derived from the linked to auth account. - // @inject_tag: gorm:"-" - AuthMethodId string `protobuf:"bytes,12,opt,name=auth_method_id,json=authMethodId,proto3" json:"auth_method_id,omitempty" gorm:"-"` + // @inject_tag: gorm:"->" + AuthMethodId string `protobuf:"bytes,12,opt,name=auth_method_id,json=authMethodId,proto3" json:"auth_method_id,omitempty" gorm:"->"` // iam_user_id is not stored in the backing DB but it derived from the linked to auth account. - // @inject_tag: gorm:"-" - IamUserId string `protobuf:"bytes,13,opt,name=iam_user_id,json=iamUserId,proto3" json:"iam_user_id,omitempty" gorm:"-"` + // @inject_tag: gorm:"->" + IamUserId string `protobuf:"bytes,13,opt,name=iam_user_id,json=iamUserId,proto3" json:"iam_user_id,omitempty" gorm:"->"` // key_id is the key ID that was used for the encryption operation. It can be // used to identify a specific version of the key needed to decrypt the value, // which is useful for caching purposes. diff --git a/internal/authtoken/testing.go b/internal/authtoken/testing.go index 5f8f5fbb4..b34cded2f 100644 --- a/internal/authtoken/testing.go +++ b/internal/authtoken/testing.go @@ -8,11 +8,10 @@ import ( "github.com/hashicorp/boundary/internal/db" "github.com/hashicorp/boundary/internal/iam" "github.com/hashicorp/boundary/internal/kms" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/require" ) -func TestAuthToken(t *testing.T, conn *gorm.DB, kms *kms.Kms, scopeId string, opt ...Option) *AuthToken { +func TestAuthToken(t *testing.T, conn *db.DB, kms *kms.Kms, scopeId string, opt ...Option) *AuthToken { t.Helper() authMethod := password.TestAuthMethods(t, conn, scopeId, 1)[0] // auth account is only used to join auth method to user. diff --git a/internal/cmd/base/dev.go b/internal/cmd/base/dev.go index 15bae43d9..eb5e38e7a 100644 --- a/internal/cmd/base/dev.go +++ b/internal/cmd/base/dev.go @@ -94,7 +94,7 @@ func (b *Server) CreateDevDatabase(ctx context.Context, opt ...Option) error { b.Info["dev database container"] = strings.TrimPrefix(container, "/") } - if err := b.ConnectToDatabase(dialect); err != nil { + if err := b.ConnectToDatabase(ctx, dialect); err != nil { if c != nil { err = multierror.Append(err, c()) } diff --git a/internal/cmd/base/internal/docker/supported.go b/internal/cmd/base/internal/docker/supported.go index 172ba2088..50460fc18 100644 --- a/internal/cmd/base/internal/docker/supported.go +++ b/internal/cmd/base/internal/docker/supported.go @@ -1,13 +1,15 @@ +//go:build linux || darwin || windows // +build linux darwin windows package docker import ( - "database/sql" "fmt" "os" "strings" + "github.com/hashicorp/boundary/internal/db/common" + _ "github.com/jackc/pgx/v4/stdlib" "github.com/ory/dockertest/v3" ) @@ -36,7 +38,7 @@ func startDbInDockerSupported(dialect string, opt ...Option) (cleanup func() err } switch dialect { - case "postgres": + case "postgres", "pgx": switch { case os.Getenv("BOUNDARY_TESTING_PG_URL") != "": url = os.Getenv("BOUNDARY_TESTING_PG_URL") @@ -67,7 +69,7 @@ func startDbInDockerSupported(dialect string, opt ...Option) (cleanup func() err } if err := pool.Retry(func() error { - db, err := sql.Open(dialect, url) + db, err := common.SqlOpen(dialect, url) if err != nil { return fmt.Errorf("error opening %s dev container: %w", dialect, err) } diff --git a/internal/cmd/base/profiling_off.go b/internal/cmd/base/profiling_off.go index 9b8d341e6..63ce61254 100644 --- a/internal/cmd/base/profiling_off.go +++ b/internal/cmd/base/profiling_off.go @@ -1,3 +1,4 @@ +//go:build !memprofiler // +build !memprofiler package base diff --git a/internal/cmd/base/profiling_on.go b/internal/cmd/base/profiling_on.go index 8a39367b5..666c089d6 100644 --- a/internal/cmd/base/profiling_on.go +++ b/internal/cmd/base/profiling_on.go @@ -1,3 +1,4 @@ +//go:build memprofiler // +build memprofiler package base diff --git a/internal/cmd/base/servers.go b/internal/cmd/base/servers.go index 642f5bb0f..6d04a0078 100644 --- a/internal/cmd/base/servers.go +++ b/internal/cmd/base/servers.go @@ -38,7 +38,6 @@ import ( "github.com/hashicorp/go-secure-stdlib/parseutil" "github.com/hashicorp/go-secure-stdlib/reloadutil" "github.com/hashicorp/go-secure-stdlib/strutil" - "github.com/jinzhu/gorm" "github.com/mitchellh/cli" "google.golang.org/grpc/grpclog" ) @@ -123,7 +122,7 @@ type Server struct { DatabaseMaxOpenConnections int DevDatabaseCleanupFunc func() error - Database *gorm.DB + Database *db.DB // StatusGracePeriodDuration represents the period of time (as a // duration) that the controller will wait before marking @@ -551,21 +550,22 @@ func (b *Server) RunShutdownFuncs() error { return mErr.ErrorOrNil() } -func (b *Server) ConnectToDatabase(dialect string) error { - dbase, err := gorm.Open(dialect, b.DatabaseUrl) +func (b *Server) ConnectToDatabase(ctx context.Context, dialect string) error { + dbType, err := db.StringToDbType(dialect) if err != nil { return fmt.Errorf("unable to create db object with dialect %s: %w", dialect, err) } - if b.DatabaseMaxOpenConnections == 1 { - return fmt.Errorf("unable to create db object with dialect %s: %s", dialect, "max_open_connections must be unlimited by setting 0 or at least 2") - } else { - dbase.DB().SetMaxOpenConns(b.DatabaseMaxOpenConnections) + opts := []db.Option{ + db.WithMaxOpenConnections(b.DatabaseMaxOpenConnections), + } + if os.Getenv("BOUNDARY_DISABLE_GORM_FORMATTER") == "" { + opts = append(opts, db.WithGormFormatter(b.Logger)) + } + dbase, err := db.Open(dbType, b.DatabaseUrl, opts...) + if err != nil { + return fmt.Errorf("unable to create db object with dialect %s: %w", dialect, err) } b.Database = dbase - if os.Getenv("BOUNDARY_DISABLE_GORM_FORMATTER") == "" { - gorm.LogFormatter = db.GetGormLogFormatter(b.Logger) - b.Database.SetLogger(db.GetGormLogger(b.Logger)) - } return nil } @@ -604,9 +604,11 @@ func (b *Server) CreateGlobalKmsKeys(ctx context.Context) error { return nil } -func (b *Server) DestroyDevDatabase() error { +func (b *Server) DestroyDevDatabase(ctx context.Context) error { if b.Database != nil { - b.Database.Close() + if err := b.Database.Close(ctx); err != nil { + return err + } } if b.DevDatabaseCleanupFunc != nil { return b.DevDatabaseCleanupFunc() diff --git a/internal/cmd/commands/database/funcs.go b/internal/cmd/commands/database/funcs.go index f1ea8d486..9438b8725 100644 --- a/internal/cmd/commands/database/funcs.go +++ b/internal/cmd/commands/database/funcs.go @@ -2,10 +2,10 @@ package database import ( "context" - "database/sql" "fmt" "github.com/hashicorp/boundary/internal/cmd/base" + "github.com/hashicorp/boundary/internal/db/common" "github.com/hashicorp/boundary/internal/db/schema" "github.com/hashicorp/boundary/internal/errors" "github.com/mitchellh/cli" @@ -20,7 +20,7 @@ func migrateDatabase(ctx context.Context, ui cli.Ui, dialect, u string, initiali noop := func() {} // This database is used to keep an exclusive lock on the database for the // remainder of the command - dBase, err := sql.Open(dialect, u) + dBase, err := common.SqlOpen(dialect, u) if err != nil { ui.Error(fmt.Errorf("Error establishing db connection: %w", err).Error()) return noop, 2 diff --git a/internal/cmd/commands/database/funcs_test.go b/internal/cmd/commands/database/funcs_test.go index fe41b4656..6ad2dd1b5 100644 --- a/internal/cmd/commands/database/funcs_test.go +++ b/internal/cmd/commands/database/funcs_test.go @@ -2,10 +2,10 @@ package database import ( "context" - "database/sql" "testing" "github.com/hashicorp/boundary/internal/cmd/base" + "github.com/hashicorp/boundary/internal/db/common" "github.com/hashicorp/boundary/internal/db/schema" "github.com/hashicorp/boundary/testing/dbtest" "github.com/mitchellh/cli" @@ -49,7 +49,7 @@ func TestMigrateDatabase(t *testing.T) { require.NoError(t, c()) }) - dBase, err := sql.Open(dialect, u) + dBase, err := common.SqlOpen(dialect, u) require.NoError(t, err) earlyMigrationVersion := 2000 @@ -75,7 +75,7 @@ func TestMigrateDatabase(t *testing.T) { require.NoError(t, c()) }) - dBase, err := sql.Open(dialect, u) + dBase, err := common.SqlOpen(dialect, u) require.NoError(t, err) earlyMigrationVersion := 2000 @@ -100,7 +100,7 @@ func TestMigrateDatabase(t *testing.T) { t.Cleanup(func() { require.NoError(t, c()) }) - dBase, err := sql.Open(dialect, u) + dBase, err := common.SqlOpen(dialect, u) require.NoError(t, err) createStmt := `create table if not exists schema_migrations (version bigint primary key, dirty boolean not null)` @@ -120,7 +120,7 @@ func TestMigrateDatabase(t *testing.T) { t.Cleanup(func() { require.NoError(t, c()) }) - dBase, err := sql.Open(dialect, u) + dBase, err := common.SqlOpen(dialect, u) require.NoError(t, err) createStmt := `create table if not exists schema_migrations (version bigint primary key, dirty boolean not null)` @@ -154,7 +154,7 @@ func TestMigrateDatabase(t *testing.T) { t.Cleanup(func() { require.NoError(t, c()) }) - dBase, err := sql.Open(dialect, u) + dBase, err := common.SqlOpen(dialect, u) require.NoError(t, err) man, err := schema.NewManager(ctx, dialect, dBase) @@ -177,7 +177,7 @@ func TestMigrateDatabase(t *testing.T) { t.Cleanup(func() { require.NoError(t, c()) }) - dBase, err := sql.Open(dialect, u) + dBase, err := common.SqlOpen(dialect, u) require.NoError(t, err) man, err := schema.NewManager(ctx, dialect, dBase) @@ -217,7 +217,7 @@ func TestVerifyOplogIsEmpty(t *testing.T) { }) _ = c - dBase, err := sql.Open(dialect, u) + dBase, err := common.SqlOpen(dialect, u) require.NoError(t, err) man, err := schema.NewManager(ctx, dialect, dBase) @@ -228,7 +228,7 @@ func TestVerifyOplogIsEmpty(t *testing.T) { cmd.srv = base.NewServer(&base.Command{UI: cmd.UI}) cmd.srv.DatabaseUrl = u - require.NoError(t, cmd.srv.ConnectToDatabase(dialect)) + require.NoError(t, cmd.srv.ConnectToDatabase(ctx, dialect)) - assert.NoError(t, cmd.verifyOplogIsEmpty()) + assert.NoError(t, cmd.verifyOplogIsEmpty(ctx)) } diff --git a/internal/cmd/commands/database/init.go b/internal/cmd/commands/database/init.go index ac5799355..6c8a81abf 100644 --- a/internal/cmd/commands/database/init.go +++ b/internal/cmd/commands/database/init.go @@ -1,6 +1,7 @@ package database import ( + "context" "fmt" "github.com/hashicorp/boundary/internal/cmd/base" @@ -164,6 +165,7 @@ func (c *InitCommand) AutocompleteFlags() complete.Flags { } func (c *InitCommand) Run(args []string) (retCode int) { + ctx := context.Background() if result := c.ParseFlagsAndConfig(args); result > 0 { return result } @@ -277,11 +279,11 @@ func (c *InitCommand) Run(args []string) (retCode int) { return base.CommandUserError } // Everything after is done with normal database URL and is affecting actual data - if err := c.srv.ConnectToDatabase(dialect); err != nil { + if err := c.srv.ConnectToDatabase(ctx, dialect); err != nil { c.UI.Error(fmt.Errorf("Error connecting to database after migrations: %w", err).Error()) return base.CommandCliError } - if err := c.verifyOplogIsEmpty(); err != nil { + if err := c.verifyOplogIsEmpty(ctx); err != nil { c.UI.Error(fmt.Sprintf("The database appears to have already been initialized: %v", err)) return base.CommandCliError } @@ -491,9 +493,13 @@ func (c *InitCommand) ParseFlagsAndConfig(args []string) int { return base.CommandSuccess } -func (c *InitCommand) verifyOplogIsEmpty() error { +func (c *InitCommand) verifyOplogIsEmpty(ctx context.Context) error { const op = "database.(InitCommand).verifyOplogIsEmpty" - r := c.srv.Database.DB().QueryRowContext(c.Context, "select not exists(select 1 from oplog_entry limit 1)") + underlyingDB, err := c.srv.Database.SqlDB(ctx) + if err != nil { + return errors.NewDeprecated(errors.Internal, op, "unable to retreive db", errors.WithWrap(err)) + } + r := underlyingDB.QueryRowContext(c.Context, "select not exists(select 1 from oplog_entry limit 1)") if r.Err() != nil { return r.Err() } diff --git a/internal/cmd/commands/dev/dev.go b/internal/cmd/commands/dev/dev.go index 662786b7f..eb062a9a2 100644 --- a/internal/cmd/commands/dev/dev.go +++ b/internal/cmd/commands/dev/dev.go @@ -567,7 +567,7 @@ func (c *Command) Run(args []string) int { } if !c.flagDisableDatabaseDestruction { - c.ShutdownFuncs = append(c.ShutdownFuncs, c.DestroyDevDatabase) + c.ShutdownFuncs = append(c.ShutdownFuncs, func() error { return c.DestroyDevDatabase(ctx) }) } default: c.DatabaseUrl, err = parseutil.ParsePath(c.flagDatabaseUrl) diff --git a/internal/cmd/commands/server/server.go b/internal/cmd/commands/server/server.go index 1d48c0f1e..a2851a79d 100644 --- a/internal/cmd/commands/server/server.go +++ b/internal/cmd/commands/server/server.go @@ -389,12 +389,17 @@ func (c *Command) Run(args []string) int { } c.DatabaseMaxOpenConnections = c.Config.Controller.Database.MaxOpenConnections - if err := c.ConnectToDatabase("postgres"); err != nil { + if err := c.ConnectToDatabase(ctx, "postgres"); err != nil { c.UI.Error(fmt.Errorf("Error connecting to database: %w", err).Error()) return base.CommandCliError } - sMan, err := schema.NewManager(c.Context, "postgres", c.Database.DB()) + underlyingDB, err := c.Database.SqlDB(ctx) + if err != nil { + c.UI.Error(fmt.Errorf("Can't get db: %w.", err).Error()) + return base.CommandCliError + } + sMan, err := schema.NewManager(c.Context, "postgres", underlyingDB) if err != nil { c.UI.Error(fmt.Errorf("Can't get schema manager: %w.", err).Error()) return base.CommandCliError diff --git a/internal/cmd/commands/version/version.go b/internal/cmd/commands/version/version.go index cba5b4733..a615e9768 100644 --- a/internal/cmd/commands/version/version.go +++ b/internal/cmd/commands/version/version.go @@ -67,6 +67,9 @@ func (c *Command) Run(args []string) int { if verInfo.Version != "" { nonAttributeMap["Version Number"] = verInfo.VersionNumber() } + if verInfo.VersionMetadata != "" { + nonAttributeMap["Metadata"] = verInfo.VersionMetadata + } maxLength := base.MaxAttributesLength(nonAttributeMap, nil, nil) diff --git a/internal/cmd/commands_nonwindows.go b/internal/cmd/commands_nonwindows.go index 51fe5f1b7..183719973 100644 --- a/internal/cmd/commands_nonwindows.go +++ b/internal/cmd/commands_nonwindows.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package cmd diff --git a/internal/cmd/commands_windows.go b/internal/cmd/commands_windows.go index 78a215f39..60634e54a 100644 --- a/internal/cmd/commands_windows.go +++ b/internal/cmd/commands_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package cmd diff --git a/internal/credential/vault/client_certificate.go b/internal/credential/vault/client_certificate.go index 82f83e515..b368c7d72 100644 --- a/internal/credential/vault/client_certificate.go +++ b/internal/credential/vault/client_certificate.go @@ -5,6 +5,7 @@ import ( "crypto/ed25519" "crypto/hmac" "crypto/sha256" + "database/sql" "github.com/hashicorp/boundary/internal/credential/vault/store" "github.com/hashicorp/boundary/internal/db" @@ -119,11 +120,11 @@ func (c *ClientCertificate) hmacCertificateKey(ctx context.Context, cipher wrapp func (c *ClientCertificate) insertQuery() (query string, queryValues []interface{}) { query = upsertClientCertQuery queryValues = []interface{}{ - c.StoreId, - c.Certificate, - c.CtCertificateKey, - c.CertificateKeyHmac, - c.KeyId, + sql.Named("store_id", c.StoreId), + sql.Named("certificate", c.Certificate), + sql.Named("certificate_key", c.CtCertificateKey), + sql.Named("certificate_key_hmac", c.CertificateKeyHmac), + sql.Named("key_id", c.KeyId), } return } diff --git a/internal/credential/vault/credential.go b/internal/credential/vault/credential.go index 4d4f4b707..a3e9178f7 100644 --- a/internal/credential/vault/credential.go +++ b/internal/credential/vault/credential.go @@ -1,6 +1,7 @@ package vault import ( + "database/sql" "time" "github.com/hashicorp/boundary/internal/credential" @@ -118,31 +119,31 @@ func (c *Credential) oplog(op oplog.OpType) oplog.Metadata { func (c *Credential) insertQuery() (query string, queryValues []interface{}) { queryValues = []interface{}{ - c.PublicId, - c.LibraryId, - c.SessionId, - c.TokenHmac, - c.ExternalId, - c.IsRenewable, - c.Status, - "now()", + sql.Named("public_id", c.PublicId), + sql.Named("library_id", c.LibraryId), + sql.Named("session_id", c.SessionId), + sql.Named("token_hmac", c.TokenHmac), + sql.Named("external_id", c.ExternalId), + sql.Named("is_renewable", c.IsRenewable), + sql.Named("status", c.Status), + sql.Named("last_renewal_time", "now()"), } switch { case c.expiration == 0: query = insertCredentialWithInfiniteExpirationQuery default: query = insertCredentialWithExpirationQuery - queryValues = append(queryValues, int(c.expiration.Round(time.Second).Seconds())) + queryValues = append(queryValues, sql.Named("expiration_time", int(c.expiration.Round(time.Second).Seconds()))) } return } func (c *Credential) updateSessionQuery(purpose credential.Purpose) (query string, queryValues []interface{}) { queryValues = []interface{}{ - c.PublicId, - c.LibraryId, - c.SessionId, - string(purpose), + sql.Named("public_id", c.PublicId), + sql.Named("library_id", c.LibraryId), + sql.Named("session_id", c.SessionId), + sql.Named("purpose", string(purpose)), } query = updateSessionCredentialQuery return diff --git a/internal/credential/vault/credential_test.go b/internal/credential/vault/credential_test.go index 280598dc5..07b6e795b 100644 --- a/internal/credential/vault/credential_test.go +++ b/internal/credential/vault/credential_test.go @@ -132,7 +132,7 @@ func TestCredential_New(t *testing.T) { SessionId: session.GetPublicId(), ExternalId: "some/vault/credential", TokenHmac: token.GetTokenHmac(), - ExpirationTime: timestamp.New(db.PositiveInfinityTS), + ExpirationTime: timestamp.New(timestamp.PositiveInfinityTS), Status: string(ActiveCredential), }, }, diff --git a/internal/credential/vault/jobs_test.go b/internal/credential/vault/jobs_test.go index 3dfc1c24c..3ceeaadf2 100644 --- a/internal/credential/vault/jobs_test.go +++ b/internal/credential/vault/jobs_test.go @@ -2,6 +2,7 @@ package vault import ( "context" + "database/sql" "path" "strings" "testing" @@ -18,7 +19,6 @@ import ( "github.com/hashicorp/boundary/internal/target" wrapping "github.com/hashicorp/go-kms-wrapping" vault "github.com/hashicorp/vault/api" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -32,7 +32,7 @@ update credential_vault_token ` func testVaultToken(t *testing.T, - conn *gorm.DB, + conn *db.DB, wrapper wrapping.Wrapper, v *TestVaultServer, cs *CredentialStore, @@ -55,23 +55,23 @@ func testVaultToken(t *testing.T, query := insertTokenQuery queryValues := []interface{}{ - inToken.TokenHmac, - inToken.CtToken, - inToken.StoreId, - inToken.KeyId, - inToken.Status, + sql.Named("1", inToken.TokenHmac), + sql.Named("2", inToken.CtToken), + sql.Named("3", inToken.StoreId), + sql.Named("4", inToken.KeyId), + sql.Named("5", inToken.Status), } expire := int(expiration.Seconds()) if expire < 0 { // last_renewal_time must be before expiration_time, if we are testing a expiration // in the past set last_renewal_time to 1 second before that query = strings.Replace(query, - "$6, -- last_renewal_time", - "wt_add_seconds_to_now($6), -- last_renewal_time", + "@6, -- last_renewal_time", + "wt_add_seconds_to_now(@6), -- last_renewal_time", -1) - queryValues = append(queryValues, expire-1, expire) + queryValues = append(queryValues, expire-1, sql.Named("6", expire)) } else { - queryValues = append(queryValues, "now()", expire) + queryValues = append(queryValues, sql.Named("6", "now()"), sql.Named("7", expire)) } numRows, err := rw.Exec(context.Background(), query, queryValues) @@ -86,7 +86,7 @@ func testVaultToken(t *testing.T, } func testVaultCred(t *testing.T, - conn *gorm.DB, + conn *db.DB, v *TestVaultServer, cl *CredentialLibrary, sess *session.Session, @@ -114,25 +114,25 @@ func testVaultCred(t *testing.T, query := insertCredentialWithExpirationQuery queryValues := []interface{}{ - id, - cl.GetPublicId(), - sess.GetPublicId(), - token.GetTokenHmac(), - secret.LeaseID, - true, - status, + sql.Named("public_id", id), + sql.Named("library_id", cl.GetPublicId()), + sql.Named("session_id", sess.GetPublicId()), + sql.Named("token_hmac", token.GetTokenHmac()), + sql.Named("external_id", secret.LeaseID), + sql.Named("is_renewable", true), + sql.Named("status", status), } expire := int(expiration.Seconds()) if expire < 0 { // last_renewal_time must be before expiration_time, if we are testing a expiration // in the past set last_renewal_time to 1 second before that query = strings.Replace(query, - "$8, -- last_renewal_time", - "wt_add_seconds_to_now($8), -- last_renewal_time", + "@last_renewal_time, -- last_renewal_time", + "wt_add_seconds_to_now(@last_renewal_time), -- last_renewal_time", -1) - queryValues = append(queryValues, expire-1, expire) + queryValues = append(queryValues, sql.Named("last_renewal_time", expire-1), sql.Named("expiration_time", expire)) } else { - queryValues = append(queryValues, "now()", expire) + queryValues = append(queryValues, sql.Named("last_renewal_time", "now()"), sql.Named("expiration_time", expire)) } numRows, err := rw.Exec(context.Background(), query, queryValues) diff --git a/internal/credential/vault/private_library.go b/internal/credential/vault/private_library.go index af52c4555..12a27f203 100644 --- a/internal/credential/vault/private_library.go +++ b/internal/credential/vault/private_library.go @@ -2,6 +2,7 @@ package vault import ( "context" + "database/sql" "fmt" "strings" @@ -170,14 +171,17 @@ func (r *Repository) getPrivateLibraries(ctx context.Context, requests []credent } libIds := mapper.libIds() - - inClause := strings.TrimSuffix(strings.Repeat("?,", len(libIds)), ",") + var inClauseSpots []string + for i := 1; i < len(libIds)+1; i++ { + inClauseSpots = append(inClauseSpots, fmt.Sprintf("@%d", i)) + } + inClause := strings.Join(inClauseSpots, ",") query := fmt.Sprintf(selectPrivateLibrariesQuery, inClause) var params []interface{} - for _, v := range libIds { - params = append(params, v) + for idx, v := range libIds { + params = append(params, sql.Named(fmt.Sprintf("%d", idx+1), v)) } rows, err := r.reader.Query(ctx, query, params) if err != nil { diff --git a/internal/credential/vault/query.go b/internal/credential/vault/query.go index 0a783b488..3346a71af 100644 --- a/internal/credential/vault/query.go +++ b/internal/credential/vault/query.go @@ -11,13 +11,13 @@ insert into credential_vault_token ( last_renewal_time, -- $6 expiration_time -- $7 ) values ( - $1, -- token_hmac - $2, -- token - $3, -- store_id - $4, -- key_id - $5, -- status - $6, -- last_renewal_time - wt_add_seconds_to_now($7) -- expiration_time + @1, -- token_hmac + @2, -- token + @3, -- store_id + @4, -- key_id + @5, -- status + @6, -- last_renewal_time + wt_add_seconds_to_now(@7) -- expiration_time ); ` @@ -33,15 +33,15 @@ insert into credential_vault_credential ( last_renewal_time, -- $8 expiration_time -- $9 ) values ( - $1, -- public_id - $2, -- library_id - $3, -- session_id - $4, -- token_hmac - $5, -- external_id - $6, -- is_renewable - $7, -- status - $8, -- last_renewal_time - wt_add_seconds_to_now($9) -- expiration_time + @public_id, -- public_id + @library_id, -- library_id + @session_id, -- session_id + @token_hmac, -- token_hmac + @external_id, -- external_id + @is_renewable, -- is_renewable + @status, -- status + @last_renewal_time, -- last_renewal_time + wt_add_seconds_to_now(@expiration_time) -- expiration_time ); ` @@ -57,14 +57,14 @@ insert into credential_vault_credential ( last_renewal_time, -- $8 expiration_time -- infinity ) values ( - $1, -- public_id - $2, -- library_id - $3, -- session_id - $4, -- token_hmac - $5, -- external_id - $6, -- is_renewable - $7, -- status - $8, -- last_renewal_time + @public_id, -- public_id + @library_id, -- library_id + @session_id, -- session_id + @token_hmac, -- token_hmac + @external_id, -- external_id + @is_renewable, -- is_renewable + @status, -- status + @last_renewal_time, -- last_renewal_time 'infinity' -- expiration_time ); ` @@ -73,7 +73,7 @@ insert into credential_vault_credential ( insert into credential_vault_client_certificate (store_id, certificate, certificate_key, certificate_key_hmac, key_id) values - ($1, $2, $3, $4, $5) + (@store_id, @certificate, @certificate_key, @certificate_key_hmac, @key_id) on conflict (store_id) do update set certificate = excluded.certificate, certificate_key = excluded.certificate_key, @@ -84,7 +84,7 @@ returning *; deleteClientCertQuery = ` delete from credential_vault_client_certificate - where store_id = $1; + where store_id = ?; ` selectPrivateLibrariesQuery = ` @@ -95,10 +95,10 @@ select * updateSessionCredentialQuery = ` update session_credential_dynamic - set credential_id = $1 - where library_id = $2 - and session_id = $3 - and credential_purpose = $4 + set credential_id = @public_id + where library_id = @library_id + and session_id = @session_id + and credential_purpose = @purpose and credential_id is null returning *; ` @@ -129,7 +129,7 @@ select extract(epoch from (last_renewal_time + (expiration_time - last_renewal_t revokeCredentialsQuery = ` update credential_vault_credential set status = 'revoke' - where session_id = $1 + where session_id = ? and status = 'active'; ` @@ -166,7 +166,7 @@ update credential_vault_credential softDeleteStoreQuery = ` update credential_vault_store set delete_time = now() - where public_id = $1 + where public_id = ? and delete_time is null returning *; ` diff --git a/internal/credential/vault/repository_credential_library_test.go b/internal/credential/vault/repository_credential_library_test.go index ba9dbe52f..039675242 100644 --- a/internal/credential/vault/repository_credential_library_test.go +++ b/internal/credential/vault/repository_credential_library_test.go @@ -795,7 +795,9 @@ func TestRepository_UpdateCredentialLibrary(t *testing.T) { assert.Equal(tt.wantCount, gotCount, "row count") assert.NotSame(tt.orig, got) assert.Equal(tt.orig.StoreId, got.StoreId) - dbassert := dbassert.New(t, conn.DB()) + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(err) + dbassert := dbassert.New(t, underlyingDB) if tt.want.Name == "" { dbassert.IsNull(got, "name") return diff --git a/internal/credential/vault/repository_credential_store_test.go b/internal/credential/vault/repository_credential_store_test.go index 3ce3530fb..2b7f72484 100644 --- a/internal/credential/vault/repository_credential_store_test.go +++ b/internal/credential/vault/repository_credential_store_test.go @@ -20,7 +20,6 @@ import ( "github.com/hashicorp/boundary/internal/oplog" "github.com/hashicorp/boundary/internal/scheduler" wrapping "github.com/hashicorp/go-kms-wrapping" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/protobuf/testing/protocmp" @@ -234,6 +233,7 @@ func TestRepository_LookupCredentialStore(t *testing.T) { csWithoutClientCert := stores[1] ccert := allocClientCertificate() + ccert.StoreId = csWithoutClientCert.GetPublicId() rows, err := rw.Delete(context.Background(), ccert, db.WithWhere("store_id = ?", csWithoutClientCert.GetPublicId())) require.NoError(t, err) require.Equal(t, 1, rows) @@ -755,7 +755,9 @@ func TestRepository_UpdateCredentialStore_Attributes(t *testing.T) { assert.Equal(tt.wantCount, gotCount, "row count") assert.NotSame(tt.orig, got) assert.Equal(tt.orig.ScopeId, got.ScopeId) - dbassert := dbassert.New(t, conn.DB()) + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(err) + dbassert := dbassert.New(t, underlyingDB) if tt.want.Name == "" { dbassert.IsNull(got, "name") } else { @@ -884,8 +886,9 @@ func TestRepository_UpdateCredentialStore_Attributes(t *testing.T) { assert.Equal(1, gotCount2, "count of updated records") require.NotNil(got2) assert.Nil(got2.CaCert) - - dbassert := dbassert.New(t, conn.DB()) + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(err) + dbassert := dbassert.New(t, underlyingDB) dbassert.IsNull(got2, "CaCert") }) @@ -1266,9 +1269,9 @@ func TestRepository_DeleteCredentialStore(t *testing.T) { type tokenMap map[string]*tokenCount - type setupFn func(t *testing.T, conn *gorm.DB) (storeId string, libs []*CredentialLibrary, tokens tokenMap, repo *Repository) + type setupFn func(t *testing.T, conn *db.DB) (storeId string, libs []*CredentialLibrary, tokens tokenMap, repo *Repository) - baseSetup := func(t *testing.T, conn *gorm.DB) (wrapper wrapping.Wrapper, repo *Repository, scopeId string) { + baseSetup := func(t *testing.T, conn *db.DB) (wrapper wrapping.Wrapper, repo *Repository, scopeId string) { wrapper = db.TestWrapper(t) kms := kms.TestKms(t, conn, wrapper) sche := scheduler.TestScheduler(t, conn, wrapper) @@ -1282,7 +1285,7 @@ func TestRepository_DeleteCredentialStore(t *testing.T) { return } - testStores := func(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper, tokens tokenMap, scopeId string, count int) ([]*CredentialStore, tokenMap) { + testStores := func(t *testing.T, conn *db.DB, wrapper wrapping.Wrapper, tokens tokenMap, scopeId string, count int) ([]*CredentialStore, tokenMap) { if tokens == nil { tokens = make(tokenMap) } @@ -1295,18 +1298,18 @@ func TestRepository_DeleteCredentialStore(t *testing.T) { return css, tokens } - makeMaintainingTokens := func(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper, tokens tokenMap, scopeId, storeId string, count int) tokenMap { + makeMaintainingTokens := func(t *testing.T, conn *db.DB, wrapper wrapping.Wrapper, tokens tokenMap, scopeId, storeId string, count int) tokenMap { testTokens(t, conn, wrapper, scopeId, storeId, count) tokens[storeId].maintaining = count return tokens } - makeRevokedTokens := func(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper, tokens tokenMap, scopeId, storeId string, count int) tokenMap { + makeRevokedTokens := func(t *testing.T, conn *db.DB, wrapper wrapping.Wrapper, tokens tokenMap, scopeId, storeId string, count int) tokenMap { require.NotNil(t, tokens) const query = ` update credential_vault_token set status = 'revoked' - where store_id = $1 + where store_id = ? and status = 'current'; ` t.Helper() @@ -1323,12 +1326,12 @@ update credential_vault_token return tokens } - makeExpiredTokens := func(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper, tokens tokenMap, scopeId, storeId string, count int) tokenMap { + makeExpiredTokens := func(t *testing.T, conn *db.DB, wrapper wrapping.Wrapper, tokens tokenMap, scopeId, storeId string, count int) tokenMap { require.NotNil(t, tokens) const query = ` update credential_vault_token set status = 'expired' - where store_id = $1 + where store_id = ? and status = 'current'; ` t.Helper() @@ -1345,7 +1348,7 @@ update credential_vault_token return tokens } - assertTokens := func(t *testing.T, conn *gorm.DB, want tokenMap) { + assertTokens := func(t *testing.T, conn *db.DB, want tokenMap) { const query = ` select store_id, status, count(token_hmac) from credential_vault_token @@ -1395,7 +1398,7 @@ group by store_id, status; }{ { name: "simple", - setup: func(t *testing.T, conn *gorm.DB) (storeId string, libs []*CredentialLibrary, tokens tokenMap, repo *Repository) { + setup: func(t *testing.T, conn *db.DB) (storeId string, libs []*CredentialLibrary, tokens tokenMap, repo *Repository) { wrapper, repo, scopeId := baseSetup(t, conn) css, tokens := testStores(t, conn, wrapper, nil, scopeId, 1) cs := css[0] @@ -1405,7 +1408,7 @@ group by store_id, status; }, { name: "with-libraries", - setup: func(t *testing.T, conn *gorm.DB) (storeId string, libs []*CredentialLibrary, tokens tokenMap, repo *Repository) { + setup: func(t *testing.T, conn *db.DB) (storeId string, libs []*CredentialLibrary, tokens tokenMap, repo *Repository) { wrapper, repo, scopeId := baseSetup(t, conn) css, tokens := testStores(t, conn, wrapper, nil, scopeId, 1) cs := css[0] @@ -1417,7 +1420,7 @@ group by store_id, status; }, { name: "with-maintaining-tokens", - setup: func(t *testing.T, conn *gorm.DB) (storeId string, libs []*CredentialLibrary, tokens tokenMap, repo *Repository) { + setup: func(t *testing.T, conn *db.DB) (storeId string, libs []*CredentialLibrary, tokens tokenMap, repo *Repository) { wrapper, repo, scopeId := baseSetup(t, conn) css, tokens := testStores(t, conn, wrapper, nil, scopeId, 1) cs := css[0] @@ -1430,7 +1433,7 @@ group by store_id, status; }, { name: "with-revoked-tokens", - setup: func(t *testing.T, conn *gorm.DB) (storeId string, libs []*CredentialLibrary, tokens tokenMap, repo *Repository) { + setup: func(t *testing.T, conn *db.DB) (storeId string, libs []*CredentialLibrary, tokens tokenMap, repo *Repository) { wrapper, repo, scopeId := baseSetup(t, conn) css, tokens := testStores(t, conn, wrapper, nil, scopeId, 1) cs := css[0] @@ -1443,7 +1446,7 @@ group by store_id, status; }, { name: "with-expired-tokens", - setup: func(t *testing.T, conn *gorm.DB) (storeId string, libs []*CredentialLibrary, tokens tokenMap, repo *Repository) { + setup: func(t *testing.T, conn *db.DB) (storeId string, libs []*CredentialLibrary, tokens tokenMap, repo *Repository) { wrapper, repo, scopeId := baseSetup(t, conn) css, tokens := testStores(t, conn, wrapper, nil, scopeId, 1) cs := css[0] @@ -1456,7 +1459,7 @@ group by store_id, status; }, { name: "with-all-token-statuses", - setup: func(t *testing.T, conn *gorm.DB) (storeId string, libs []*CredentialLibrary, tokens tokenMap, repo *Repository) { + setup: func(t *testing.T, conn *db.DB) (storeId string, libs []*CredentialLibrary, tokens tokenMap, repo *Repository) { wrapper, repo, scopeId := baseSetup(t, conn) css, tokens := testStores(t, conn, wrapper, nil, scopeId, 1) cs := css[0] diff --git a/internal/credential/vault/supported.go b/internal/credential/vault/supported.go index b71c29048..1cfcf95ac 100644 --- a/internal/credential/vault/supported.go +++ b/internal/credential/vault/supported.go @@ -1,10 +1,10 @@ +//go:build linux || darwin || windows // +build linux darwin windows package vault import ( "crypto/tls" - "database/sql" "fmt" "io/ioutil" "net/http" @@ -15,8 +15,10 @@ import ( "testing" "time" + "github.com/hashicorp/boundary/internal/db/common" "github.com/hashicorp/go-rootcerts" vault "github.com/hashicorp/vault/api" + _ "github.com/jackc/pgx/v4/stdlib" "github.com/ory/dockertest/v3" "github.com/stretchr/testify/require" ) @@ -223,7 +225,7 @@ func gotMountDatabase(t *testing.T, v *TestVaultServer, opt ...TestOption) *Test dburl := fmt.Sprintf(dbUrlTemplate, "postgres", "password") err = pool.Retry(func() error { var err error - db, err := sql.Open("postgres", dburl) + db, err := common.SqlOpen("postgres", dburl) if err != nil { return err } @@ -243,7 +245,7 @@ func gotMountDatabase(t *testing.T, v *TestVaultServer, opt ...TestOption) *Test grantClosedRole = `grant select, insert, update, delete on boundary_closed to closed_role` ) - db, err := sql.Open("postgres", dburl) + db, err := common.SqlOpen("postgres", dburl) require.NoError(err) defer db.Close() diff --git a/internal/credential/vault/testing.go b/internal/credential/vault/testing.go index 858e1b6ac..53042d626 100644 --- a/internal/credential/vault/testing.go +++ b/internal/credential/vault/testing.go @@ -7,7 +7,6 @@ import ( "crypto/rand" "crypto/x509" "crypto/x509/pkix" - "database/sql" "encoding/pem" "fmt" "math/big" @@ -19,6 +18,7 @@ import ( "testing" "time" + "github.com/hashicorp/boundary/internal/db/common" "github.com/hashicorp/boundary/internal/errors" "github.com/hashicorp/boundary/internal/db" @@ -26,8 +26,6 @@ import ( "github.com/hashicorp/boundary/internal/scheduler" wrapping "github.com/hashicorp/go-kms-wrapping" vault "github.com/hashicorp/vault/api" - "github.com/jinzhu/gorm" - _ "github.com/lib/pq" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -36,7 +34,7 @@ import ( // the provided scope, vault address, token, and accessor and any values passed // in through the Options vargs. If any errors are encountered during the // creation of the store, the test will fail. -func TestCredentialStore(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper, scopeId, vaultAddr, vaultToken, accessor string, opts ...Option) *CredentialStore { +func TestCredentialStore(t *testing.T, conn *db.DB, wrapper wrapping.Wrapper, scopeId, vaultAddr, vaultToken, accessor string, opts ...Option) *CredentialStore { t.Helper() ctx := context.Background() kmsCache := kms.TestKms(t, conn, wrapper) @@ -77,7 +75,7 @@ func TestCredentialStore(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper, // the provided DB with the provided scope id. If any errors are // encountered during the creation of the credential stores, the test will // fail. -func TestCredentialStores(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper, scopeId string, count int) []*CredentialStore { +func TestCredentialStores(t *testing.T, conn *db.DB, wrapper wrapping.Wrapper, scopeId string, count int) []*CredentialStore { t.Helper() ctx := context.Background() kmsCache := kms.TestKms(t, conn, wrapper) @@ -115,7 +113,7 @@ func TestCredentialStores(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper, // libraries in the provided DB with the provided store id. If any errors // are encountered during the creation of the credential libraries, the // test will fail. -func TestCredentialLibraries(t *testing.T, conn *gorm.DB, _ wrapping.Wrapper, storeId string, count int) []*CredentialLibrary { +func TestCredentialLibraries(t *testing.T, conn *db.DB, _ wrapping.Wrapper, storeId string, count int) []*CredentialLibrary { t.Helper() assert, require := assert.New(t), require.New(t) w := db.New(conn) @@ -146,7 +144,7 @@ func TestCredentialLibraries(t *testing.T, conn *gorm.DB, _ wrapping.Wrapper, st // TestCredentials creates count number of vault credentials in the provided DB with // the provided library id and session id. If any errors are encountered // during the creation of the credentials, the test will fail. -func TestCredentials(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper, libraryId, sessionId string, count int) []*Credential { +func TestCredentials(t *testing.T, conn *db.DB, wrapper wrapping.Wrapper, libraryId, sessionId string, count int) []*Credential { t.Helper() assert, require := assert.New(t), require.New(t) rw := db.New(conn) @@ -190,7 +188,7 @@ func TestCredentials(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper, libr return credentials } -func createTestToken(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper, scopeId, storeId, token, accessor string) *Token { +func createTestToken(t *testing.T, conn *db.DB, wrapper wrapping.Wrapper, scopeId, storeId, token, accessor string) *Token { t.Helper() w := db.New(conn) ctx := context.Background() @@ -212,7 +210,7 @@ func createTestToken(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper, scop return inToken } -func testTokens(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper, scopeId, storeId string, count int) []*Token { +func testTokens(t *testing.T, conn *db.DB, wrapper wrapping.Wrapper, scopeId, storeId string, count int) []*Token { t.Helper() assert, require := assert.New(t), require.New(t) w := db.New(conn) @@ -872,7 +870,7 @@ func (d *TestDatabase) ValidateCredential(t *testing.T, s *vault.Secret) error { require := require.New(t) require.NotNil(s) dburl := d.URL.Encode(t, s) - db, err := sql.Open("postgres", dburl) + db, err := common.SqlOpen("postgres", dburl) if err != nil { return err } diff --git a/internal/credential/vault/vault_token.go b/internal/credential/vault/vault_token.go index 8836f3b98..5e7321f65 100644 --- a/internal/credential/vault/vault_token.go +++ b/internal/credential/vault/vault_token.go @@ -4,6 +4,7 @@ import ( "context" "crypto/hmac" "crypto/sha256" + "database/sql" "time" "github.com/hashicorp/boundary/internal/credential/vault/store" @@ -139,13 +140,13 @@ func (t *Token) insertQuery() (query string, queryValues []interface{}) { exp := int(t.expiration.Round(time.Second).Seconds()) queryValues = []interface{}{ - t.TokenHmac, - t.CtToken, - t.StoreId, - t.KeyId, - t.Status, - "now()", - exp, + sql.Named("1", t.TokenHmac), + sql.Named("2", t.CtToken), + sql.Named("3", t.StoreId), + sql.Named("4", t.KeyId), + sql.Named("5", t.Status), + sql.Named("6", "now()"), + sql.Named("7", exp), } return } diff --git a/internal/db/README.md b/internal/db/README.md index f29d1d272..120bcc162 100644 --- a/internal/db/README.md +++ b/internal/db/README.md @@ -4,7 +4,12 @@ Just some high-level usage highlights to get you started. Read the godocs for a complete list of capabilities and their documentation. ```go - conn, _ := gorm.Open("postgres", url) + dialect = postgres.New(postgres.Config{ + DSN: connectionUrl}, + ) + conn, _ := gorm.Open(dialect, &gorm.Config{ + ConvertNullToZeroValues: true, + }) // Db implements both the Reader and Writer interfaces rw := Db{Tx: conn} diff --git a/internal/db/assert/asserts_test.go b/internal/db/assert/asserts_test.go index 3e37ba93e..e19c2ca0a 100644 --- a/internal/db/assert/asserts_test.go +++ b/internal/db/assert/asserts_test.go @@ -1,13 +1,16 @@ package dbassert import ( + "context" "testing" + "github.com/hashicorp/boundary/internal/db" dbassert "github.com/hashicorp/dbassert" gormAssert "github.com/hashicorp/dbassert/gorm" + "github.com/hashicorp/vault/sdk/helper/base62" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func Test_FieldDomain(t *testing.T) { @@ -56,23 +59,19 @@ func Test_FieldNullable(t *testing.T) { func Test_FieldIsNull(t *testing.T) { t.Parallel() - cleanup, conn, _ := dbassert.TestSetup(t, "postgres") - defer func() { - if err := cleanup(); err != nil { - t.Error(err) - } - if err := conn.Close(); err != nil { - t.Error(err) - } - }() + ctx := context.Background() assert := assert.New(t) - gormDb, err := gorm.Open("postgres", conn) + conn, _ := db.TestSetup(t, "postgres") + initStore(t, conn) + require := require.New(t) + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(err) assert.NoError(err) mockery := new(dbassert.MockTesting) - dbassert := New(mockery, conn) + dbassert := New(mockery, underlyingDB) v := 1 - m := gormAssert.CreateTestModel(t, gormDb, nil, &v) + m := createTestModel(t, conn, nil, &v) dbassert.IsNull(&m, "Nullable") mockery.AssertNoError(t) @@ -84,23 +83,17 @@ func Test_FieldIsNull(t *testing.T) { func Test_FieldNotNull(t *testing.T) { t.Parallel() - cleanup, conn, _ := dbassert.TestSetup(t, "postgres") - defer func() { - if err := cleanup(); err != nil { - t.Error(err) - } - if err := conn.Close(); err != nil { - t.Error(err) - } - }() - assert := assert.New(t) - gormDb, err := gorm.Open("postgres", conn) - assert.NoError(err) + ctx := context.Background() + conn, _ := db.TestSetup(t, "postgres") + initStore(t, conn) + require := require.New(t) + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(err) mockery := new(dbassert.MockTesting) - dbassert := New(mockery, conn) + dbassert := New(mockery, underlyingDB) v := 1 - m := gormAssert.CreateTestModel(t, gormDb, nil, &v) + m := createTestModel(t, conn, nil, &v) dbassert.NotNull(&m, "Nullable") mockery.AssertError(t) @@ -109,3 +102,54 @@ func Test_FieldNotNull(t *testing.T) { dbassert.NotNull(&m, "typeint") mockery.AssertNoError(t) } + +type testModel struct { + Id int `gorm:"primary_key"` + PublicId string + Nullable *string + TypeInt *int +} + +// TableName is required by Gorm to define the model's table name when it +// doesn't match the model's Go type name. +func (*testModel) TableName() string { return "test_table_dbasserts" } + +// CreateTestModel is a helper that creates a testModel in the DB. +func createTestModel(t dbassert.TestingT, db *db.DB, nullable *string, typeInt *int) *testModel { + publicId, err := base62.Random(12) + assert.NoError(t, err) + m := testModel{ + PublicId: publicId, + Nullable: nullable, + TypeInt: typeInt, + } + err = db.Create(&m).Error + assert.NoError(t, err) + return &m +} + +func initStore(t *testing.T, db *db.DB) { + t.Helper() + const ( + createDomainType = ` +create domain dbasserts_public_id as text +check( + length(trim(value)) > 10 +); +comment on domain dbasserts_public_id is +'dbasserts test domain type'; +` + createTable = ` +create table if not exists test_table_dbasserts ( + id bigint generated always as identity primary key, + public_id dbasserts_public_id not null, + nullable text, + type_int int +); +comment on table test_table_dbasserts is +'dbasserts test table' +` + ) + require.NoError(t, db.Exec(createDomainType).Error) + require.NoError(t, db.Exec(createTable).Error) +} diff --git a/internal/db/common/db.go b/internal/db/common/db.go new file mode 100644 index 000000000..0a166f632 --- /dev/null +++ b/internal/db/common/db.go @@ -0,0 +1,15 @@ +package common + +import ( + "database/sql" + + _ "github.com/jackc/pgx/v4" +) + +func SqlOpen(driverName, dataSourceName string) (*sql.DB, error) { + switch driverName { + case "postgres", "pgx": + driverName = "pgx" + } + return sql.Open(driverName, dataSourceName) +} diff --git a/internal/db/common/update.go b/internal/db/common/update.go index fd40ee2ac..71b11e3fd 100644 --- a/internal/db/common/update.go +++ b/internal/db/common/update.go @@ -9,7 +9,7 @@ import ( "strings" "github.com/hashicorp/boundary/internal/errors" - "github.com/jinzhu/gorm" + "gorm.io/gorm" ) // UpdateFields will create a map[string]interface of the update values to be diff --git a/internal/db/common/update_test.go b/internal/db/common/update_test.go index 41d41b3c7..4da3a16c6 100644 --- a/internal/db/common/update_test.go +++ b/internal/db/common/update_test.go @@ -6,8 +6,8 @@ import ( "github.com/hashicorp/boundary/internal/db/db_test" "github.com/hashicorp/go-secure-stdlib/base62" "github.com/hashicorp/go-uuid" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" + "gorm.io/gorm" ) func Test_intersection(t *testing.T) { diff --git a/internal/db/db.go b/internal/db/db.go index f506c9845..2f5ff3d6d 100644 --- a/internal/db/db.go +++ b/internal/db/db.go @@ -2,26 +2,20 @@ package db import ( "context" + "database/sql" stderrors "errors" "fmt" - "math" - "time" + "github.com/hashicorp/boundary/internal/errors" "github.com/hashicorp/boundary/internal/observability/event" "github.com/hashicorp/go-hclog" - "github.com/jinzhu/gorm" - "github.com/lib/pq" + "github.com/jackc/pgconn" + _ "github.com/jackc/pgx/v4" + "gorm.io/driver/postgres" + "gorm.io/gorm" + "gorm.io/gorm/logger" ) -var ( - NegativeInfinityTS = time.Date(math.MinInt32, time.January, 1, 0, 0, 0, 0, time.UTC) - PositiveInfinityTS = time.Date(math.MaxInt32, time.December, 31, 23, 59, 59, 1e9-1, time.UTC) -) - -func init() { - pq.EnableInfinityTs(NegativeInfinityTS, PositiveInfinityTS) -} - type DbType int const ( @@ -35,15 +29,90 @@ func (db DbType) String() string { "postgres", }[db] } +func StringToDbType(dialect string) (DbType, error) { + switch dialect { + case "postgres": + return Postgres, nil + default: + return UnknownDB, fmt.Errorf("%s is an unknown dialect", dialect) + } +} -// Open a database connection which is long-lived. -// You need to call Close() on the returned gorm.DB -func Open(dbType DbType, connectionUrl string) (*gorm.DB, error) { - db, err := gorm.Open(dbType.String(), connectionUrl) +// DB is a wrapper around the ORM +type DB struct { + *gorm.DB +} + +// SqlDB returns the underlying sql.DB +// +// Note: This func is not named DB(), because our choice of ORM (gorm) which is +// embedded for various reasons, already exports a DB() func and it's base type +// is also an export DB type +func (d *DB) SqlDB(ctx context.Context) (*sql.DB, error) { + const op = "db.(DB).SqlDB" + if d.DB == nil { + return nil, errors.New(ctx, errors.Internal, op, "missing underlying database") + } + return d.DB.DB() +} + +// Close the underlying sql.DB +func (d *DB) Close(ctx context.Context) error { + const op = "db.(DB).Close" + if d.DB == nil { + return errors.New(ctx, errors.Internal, op, "missing underlying database") + } + underlying, err := d.DB.DB() + if err != nil { + return errors.Wrap(ctx, err, op) + } + return underlying.Close() +} + +// Open a database connection which is long-lived. The options of +// WithGormFormatter and WithMaxOpenConnections are supported. +// +// Note: Consider if you need to call Close() on the returned DB. Typically the +// answer is no, but there are occasions when it's necessary. See the sql.DB +// docs for more information. +func Open(dbType DbType, connectionUrl string, opt ...Option) (*DB, error) { + var dialect gorm.Dialector + switch dbType { + case Postgres: + dialect = postgres.New(postgres.Config{ + DSN: connectionUrl}, + ) + default: + return nil, fmt.Errorf("unable to open %s database type", dbType) + } + db, err := gorm.Open(dialect, &gorm.Config{ + ConvertNullToZeroValues: true, + }) if err != nil { return nil, fmt.Errorf("unable to open database: %w", err) } - return db, nil + opts := GetOpts(opt...) + if opts.withGormFormatter != nil { + newLogger := logger.New( + getGormLogger(opts.withGormFormatter), + logger.Config{ + LogLevel: logger.Error, // Log level + Colorful: false, // Disable color + }, + ) + db = db.Session(&gorm.Session{Logger: newLogger}) + } + if opts.withMaxOpenConnections > 0 { + if dialect.Name() == "postgres" && opts.withMaxOpenConnections == 1 { + return nil, fmt.Errorf("unable to create db object with dialect %s: %s", dialect, "max_open_connections must be unlimited by setting 0 or at least 2") + } + underlyingDB, err := db.DB() + if err != nil { + return nil, fmt.Errorf("unable retreive db: %w", err) + } + underlyingDB.SetMaxOpenConns(opts.withMaxOpenConnections) + } + return &DB{db}, nil } func GetGormLogFormatter(log hclog.Logger) func(values ...interface{}) (messages []interface{}) { @@ -52,7 +121,7 @@ func GetGormLogFormatter(log hclog.Logger) func(values ...interface{}) (messages return func(values ...interface{}) (messages []interface{}) { if len(values) > 2 && values[0].(string) == "log" { switch values[2].(type) { - case *pq.Error: + case *pgconn.PgError: if log.IsTrace() { event.WriteError(ctx, op, stderrors.New("error from database adapter"), event.WithInfo("error", values[2], "location", values[1])) } @@ -67,16 +136,15 @@ type gormLogger struct { logger hclog.Logger } -func (g gormLogger) Print(values ...interface{}) { - formatted := gorm.LogFormatter(values...) - if formatted == nil { - return +func (g gormLogger) Printf(msg string, values ...interface{}) { + if len(values) > 1 { + switch values[1].(type) { + case *pgconn.PgError: + g.logger.Trace("error from database adapter", "location", values[0], "error", values[1]) + } } - // Our formatter should elide anything we don't want so this should never - // happen, panic if so so we catch/fix - panic("unhandled error case") } -func GetGormLogger(log hclog.Logger) gormLogger { +func getGormLogger(log hclog.Logger) gormLogger { return gormLogger{logger: log} } diff --git a/internal/db/db_test.go b/internal/db/db_test.go index 7329ceb17..d0730c790 100644 --- a/internal/db/db_test.go +++ b/internal/db/db_test.go @@ -1,14 +1,15 @@ package db import ( + "context" "testing" "github.com/hashicorp/boundary/testing/dbtest" - "github.com/lib/pq" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestOpen(t *testing.T) { + ctx := context.Background() cleanup, url, _, err := dbtest.StartUsingTemplate(dbtest.Postgres) if err != nil { t.Fatal(err) @@ -49,7 +50,10 @@ func TestOpen(t *testing.T) { got, err := Open(tt.args.dbType, tt.args.connectionUrl) defer func() { if err == nil { - got.Close() + sqlDB, err := got.SqlDB(ctx) + require.NoError(t, err) + err = sqlDB.Close() + require.NoError(t, err) } }() if (err != nil) != tt.wantErr { @@ -62,9 +66,3 @@ func TestOpen(t *testing.T) { }) } } - -func TestPostgresInfinity(t *testing.T) { - assert.Panics(t, func() { - pq.EnableInfinityTs(NegativeInfinityTS, PositiveInfinityTS) - }) -} diff --git a/internal/db/domains_test.go b/internal/db/domains_test.go index be5b5b6a5..bf6adc467 100644 --- a/internal/db/domains_test.go +++ b/internal/db/domains_test.go @@ -1,6 +1,7 @@ package db import ( + "context" "strings" "testing" "time" @@ -25,8 +26,11 @@ returning id; ` ) + ctx := context.Background() + conn, _ := TestSetup(t, "postgres") - db := conn.DB() + db, err := conn.SqlDB(ctx) + require.NoError(t, err) for _, typ := range []string{"public", "private", "role", "scope"} { createTable := strings.Replace(createTableBase, "{{rep}}", typ, -1) @@ -106,9 +110,10 @@ insert into test_table values ($1); ` ) - + ctx := context.Background() conn, _ := TestSetup(t, "postgres") - db := conn.DB() + db, err := conn.SqlDB(ctx) + require.NoError(t, err) if _, err := db.Exec(createTable); err != nil { t.Fatalf("query: \n%s\n error: %s", createTable, err) @@ -177,9 +182,10 @@ insert into test_table values ($1); ` ) - + ctx := context.Background() conn, _ := TestSetup(t, "postgres") - db := conn.DB() + db, err := conn.SqlDB(ctx) + require.NoError(t, err) if _, err := db.Exec(createTable); err != nil { t.Fatalf("query: \n%s\n error: %s", createTable, err) @@ -253,8 +259,10 @@ returning id; ` ) + ctx := context.Background() conn, _ := TestSetup(t, "postgres") - db := conn.DB() + db, err := conn.SqlDB(ctx) + require.NoError(t, err) if _, err := db.Exec(createTable); err != nil { t.Fatalf("query: \n%s\n error: %s", createTable, err) } @@ -318,10 +326,11 @@ update test_update_time_column set update_time = null; ` ) - + ctx := context.Background() conn, _ := TestSetup(t, "postgres") - db := conn.DB() - _, err := db.Exec(createTable) + db, err := conn.SqlDB(ctx) + require.NoError(t, err) + _, err = db.Exec(createTable) assert.NoError(err) _, err = db.Exec(addTriggers) @@ -391,9 +400,11 @@ returning public_id; ) conn, _ := TestSetup(t, "postgres") assert, require := assert.New(t), require.New(t) + ctx := context.Background() + db, err := conn.SqlDB(ctx) + require.NoError(err) - db := conn.DB() - _, err := db.Exec(createTable) + _, err = db.Exec(createTable) require.NoError(err) _, err = db.Exec(addTrigger) @@ -450,9 +461,11 @@ returning private_id; ) conn, _ := TestSetup(t, "postgres") assert, require := assert.New(t), require.New(t) + ctx := context.Background() + db, err := conn.SqlDB(ctx) + require.NoError(err) - db := conn.DB() - _, err := db.Exec(createTable) + _, err = db.Exec(createTable) require.NoError(err) _, err = db.Exec(addTrigger) @@ -482,9 +495,10 @@ returning private_id; } func TestDomain_DefaultUsersExist(t *testing.T) { + ctx := context.Background() conn, _ := TestSetup(t, "postgres") - db := conn.DB() - + db, err := conn.SqlDB(ctx) + require.NoError(t, err) for _, val := range []string{"u_anon", "u_auth"} { rows, err := db.Query(`select from iam_user where public_id = $1`, val) require.NoError(t, err) @@ -570,10 +584,11 @@ set id = null; Name string Updatable string } - + ctx := context.Background() conn, _ := TestSetup(t, "postgres") - db := conn.DB() - _, err := db.Exec(createTable) + db, err := conn.SqlDB(ctx) + require.NoError(t, err) + _, err = db.Exec(createTable) assert.NoError(t, err) _, err = db.Exec(addTriggers) @@ -658,7 +673,7 @@ set id = null; _, err = db.Exec(update_updatable) require.Error(err) - assert.Containsf(err.Error(), `pq: column "bad_column_name" not found`, "unexpected error msg: %s", err.Error()) + assert.Containsf(err.Error(), `SQLSTATE 42703`, "unexpected error msg: %s", err.Error()) var found rowData err = db.QueryRow(query, id).Scan(&found.Id, &found.Name, &found.CreateTime, &found.Updatable) @@ -683,9 +698,10 @@ values ($1) returning id; ` ) - + ctx := context.Background() conn, _ := TestSetup(t, "postgres") - db := conn.DB() + db, err := conn.SqlDB(ctx) + require.NoError(t, err) if _, err := db.Exec(createTable); err != nil { t.Fatalf("query: \n%s\n error: %s", createTable, err) @@ -730,9 +746,10 @@ values ($1) returning id; ` ) - + ctx := context.Background() conn, _ := TestSetup(t, "postgres") - db := conn.DB() + db, err := conn.SqlDB(ctx) + require.NoError(t, err) if _, err := db.Exec(createTable); err != nil { t.Fatalf("query: \n%s\n error: %s", createTable, err) @@ -776,9 +793,10 @@ values ($1) returning id; ` ) - + ctx := context.Background() conn, _ := TestSetup(t, "postgres") - db := conn.DB() + db, err := conn.SqlDB(ctx) + require.NoError(t, err) if _, err := db.Exec(createTable); err != nil { t.Fatalf("query: \n%s\n error: %s", createTable, err) @@ -822,9 +840,10 @@ values ($1) returning id; ` ) - + ctx := context.Background() conn, _ := TestSetup(t, "postgres") - db := conn.DB() + db, err := conn.SqlDB(ctx) + require.NoError(t, err) if _, err := db.Exec(createTable); err != nil { t.Fatalf("query: \n%s\n error: %s", createTable, err) @@ -868,9 +887,10 @@ values ($1) returning id; ` ) - + ctx := context.Background() conn, _ := TestSetup(t, "postgres") - db := conn.DB() + db, err := conn.SqlDB(ctx) + require.NoError(t, err) if _, err := db.Exec(createTable); err != nil { t.Fatalf("query: \n%s\n error: %s", createTable, err) @@ -914,9 +934,10 @@ values ($1) returning id; ` ) - + ctx := context.Background() conn, _ := TestSetup(t, "postgres") - db := conn.DB() + db, err := conn.SqlDB(ctx) + require.NoError(t, err) if _, err := db.Exec(createTable); err != nil { t.Fatalf("query: \n%s\n error: %s", createTable, err) @@ -964,9 +985,10 @@ func TestDomain_wt_is_sentinel(t *testing.T) { select wt_is_sentinel($1); ` ) - + ctx := context.Background() conn, _ := TestSetup(t, "postgres") - db := conn.DB() + db, err := conn.SqlDB(ctx) + require.NoError(t, err) tests := []struct { name string @@ -1026,10 +1048,12 @@ insert on test_not_null_columns ` dropTriggers = `drop trigger test_insert_not_null_columns on test_not_null_columns` ) - + ctx := context.Background() conn, _ := TestSetup(t, "postgres") - db := conn.DB() - _, err := db.Exec(createTable) + db, err := conn.SqlDB(ctx) + assert.NoError(t, err) + + _, err = db.Exec(createTable) assert.NoError(t, err) tests := []struct { diff --git a/internal/db/option.go b/internal/db/option.go index 1547bab9a..32b50dcc4 100644 --- a/internal/db/option.go +++ b/internal/db/option.go @@ -2,6 +2,7 @@ package db import ( "github.com/hashicorp/boundary/internal/oplog" + "github.com/hashicorp/go-hclog" wrapping "github.com/hashicorp/go-kms-wrapping" ) @@ -43,6 +44,9 @@ type Options struct { // withPrngValues is used to switch the ID generation to a pseudo-random mode withPrngValues []string + + withGormFormatter hclog.Logger + withMaxOpenConnections int } type oplogOpts struct { @@ -165,3 +169,19 @@ func WithPrngValues(withPrngValues []string) Option { o.withPrngValues = withPrngValues } } + +// WithGormFormatter specifies an optional hclog to use for gorm's log +// formmater +func WithGormFormatter(l hclog.Logger) Option { + return func(o *Options) { + o.withGormFormatter = l + } +} + +// WithMaxOpenConnections specifices and optional max open connections for the +// database +func WithMaxOpenConnections(max int) Option { + return func(o *Options) { + o.withMaxOpenConnections = max + } +} diff --git a/internal/db/option_test.go b/internal/db/option_test.go index 8a1abda47..963b9d008 100644 --- a/internal/db/option_test.go +++ b/internal/db/option_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/hashicorp/boundary/internal/oplog" + "github.com/hashicorp/go-hclog" "github.com/stretchr/testify/assert" ) @@ -175,4 +176,30 @@ func Test_getOpts(t *testing.T) { testOpts.withOrder = "version desc" assert.Equal(opts, testOpts) }) + t.Run("WithGormFormatter", func(t *testing.T) { + assert := assert.New(t) + // test default of false + opts := GetOpts() + testOpts := getDefaultOptions() + assert.Equal(opts, testOpts) + + testLogger := hclog.New(&hclog.LoggerOptions{}) + + // try setting to false + opts = GetOpts(WithGormFormatter(testLogger)) + testOpts.withGormFormatter = testLogger + assert.Equal(opts, testOpts) + }) + t.Run("WithMaxOpenConnections", func(t *testing.T) { + assert := assert.New(t) + // test default of false + opts := GetOpts() + testOpts := getDefaultOptions() + assert.Equal(opts, testOpts) + + // try setting to false + opts = GetOpts(WithMaxOpenConnections(22)) + testOpts.withMaxOpenConnections = 22 + assert.Equal(opts, testOpts) + }) } diff --git a/internal/db/read_writer.go b/internal/db/read_writer.go index 087962e43..119bb8f42 100644 --- a/internal/db/read_writer.go +++ b/internal/db/read_writer.go @@ -13,8 +13,8 @@ import ( "github.com/hashicorp/boundary/internal/oplog" "github.com/hashicorp/boundary/internal/oplog/store" wrapping "github.com/hashicorp/go-kms-wrapping" - "github.com/jinzhu/gorm" "google.golang.org/protobuf/proto" + "gorm.io/gorm" ) const ( @@ -190,7 +190,7 @@ type VetForWriter interface { // Db uses a gorm DB connection for read/write type Db struct { - underlying *gorm.DB + underlying *DB } // ensure that Db implements the interfaces of: Reader and Writer @@ -199,7 +199,7 @@ var ( _ Writer = (*Db)(nil) ) -func New(underlying *gorm.DB) *Db { +func New(underlying *DB) *Db { return &Db{underlying: underlying} } @@ -438,16 +438,26 @@ func (rw *Db) Update(ctx context.Context, i interface{}, fieldMaskPaths []string return NoRowsAffected, errors.New(ctx, errors.InvalidParameter, op, fmt.Sprintf("no fields matched using fieldMaskPaths %s", fieldMaskPaths)) } - // This is not a boundary scope, but rather a gorm Scope: - // https://godoc.org/github.com/jinzhu/gorm#DB.NewScope - scope := rw.underlying.NewScope(i) - if scope.PrimaryKeyZero() { - return NoRowsAffected, errors.New(ctx, errors.InvalidParameter, op, "primary key is not set") + names, isZero, err := rw.primaryFieldsAreZero(ctx, i) + if err != nil { + return NoRowsAffected, errors.Wrap(ctx, err, op) + } + if isZero { + return NoRowsAffected, errors.New(ctx, errors.InvalidParameter, op, fmt.Sprintf("primary key is not set for: %s", names), errors.WithoutEvent()) } - for _, f := range scope.PrimaryFields() { - if contains(fieldMaskPaths, f.Name) { - return NoRowsAffected, errors.New(ctx, errors.InvalidFieldMask, op, fmt.Sprintf("not allowed on primary key field %s", f.Name)) + mDb := rw.underlying.Model(i) + err = mDb.Statement.Parse(i) + if err != nil || mDb.Statement.Schema == nil { + return NoRowsAffected, errors.New(ctx, errors.Unknown, op, "internal error: unable to parse stmt", errors.WithWrap(err)) + } + reflectValue := reflect.Indirect(reflect.ValueOf(i)) + for _, pf := range mDb.Statement.Schema.PrimaryFields { + if _, isZero := pf.ValueOf(reflectValue); isZero { + return NoRowsAffected, errors.New(ctx, errors.InvalidParameter, op, fmt.Sprintf("primary key %s is not set", pf.Name)) + } + if contains(fieldMaskPaths, pf.Name) { + return NoRowsAffected, errors.New(ctx, errors.InvalidFieldMask, op, fmt.Sprintf("not allowed on primary key field %s", pf.Name)) } } @@ -482,8 +492,14 @@ func (rw *Db) Update(ctx context.Context, i interface{}, fieldMaskPaths []string if *opts.WithVersion == 0 { return NoRowsAffected, errors.New(ctx, errors.InvalidParameter, op, "with version option is zero") } - if _, ok := scope.FieldByName("version"); !ok { - return NoRowsAffected, errors.New(ctx, errors.InvalidParameter, op, fmt.Sprintf("%s does not have a version field", scope.TableName())) + mDb := rw.underlying.Model(i) + err = mDb.Statement.Parse(i) + if err != nil && mDb.Statement.Schema == nil { + return NoRowsAffected, errors.New(ctx, errors.Unknown, op, "internal error: unable to parse stmt", errors.WithWrap(err)) + } + if !contains(mDb.Statement.Schema.DBNames, "version") { + // if _, ok := stmt.Schema.FieldsByName["version"]; !ok { + return NoRowsAffected, errors.New(ctx, errors.InvalidParameter, op, fmt.Sprintf("%s does not have a version field", mDb.Statement.Schema.Table)) } where, args = append(where, "version = ?"), append(args, opts.WithVersion) } @@ -554,14 +570,19 @@ func (rw *Db) Delete(ctx context.Context, i interface{}, opt ...Option) (int, er if withOplog && opts.newOplogMsg != nil { return NoRowsAffected, errors.New(ctx, errors.InvalidParameter, op, "both WithOplog and NewOplogMsg options have been specified") } - // This is not a boundary scope, but rather a gorm Scope: - // https://godoc.org/github.com/jinzhu/gorm#DB.NewScope - scope := rw.underlying.NewScope(i) - if opts.withWhereClause == "" { - if scope.PrimaryKeyZero() { - return NoRowsAffected, errors.New(ctx, errors.InvalidParameter, op, "primary key is not set") + + mDb := rw.underlying.Model(i) + err := mDb.Statement.Parse(i) + if err == nil && mDb.Statement.Schema == nil { + return NoRowsAffected, errors.New(ctx, errors.Unknown, op, "internal error: unable to parse stmt", errors.WithWrap(err)) + } + reflectValue := reflect.Indirect(reflect.ValueOf(i)) + for _, pf := range mDb.Statement.Schema.PrimaryFields { + if _, isZero := pf.ValueOf(reflectValue); isZero { + return NoRowsAffected, errors.New(ctx, errors.InvalidParameter, op, fmt.Sprintf("primary key %s is not set", pf.Name)) } } + if withOplog { _, err := validateOplogArgs(ctx, i, opts) if err != nil { @@ -576,7 +597,7 @@ func (rw *Db) Delete(ctx context.Context, i interface{}, opt ...Option) (int, er return NoRowsAffected, errors.Wrap(ctx, err, op, errors.WithMsg("unable to get ticket")) } } - db := rw.underlying + db := rw.underlying.DB if opts.withWhereClause != "" { db = db.Where(opts.withWhereClause, opts.withWhereClauseArgs...) } @@ -692,7 +713,7 @@ func (rw *Db) getTicketFor(aggregateName string) (*store.Ticket, error) { if rw.underlying == nil { return nil, errors.NewDeprecated(errors.InvalidParameter, op, fmt.Sprintf("%s: underlying db missing", aggregateName), errors.WithoutEvent()) } - ticketer, err := oplog.NewGormTicketer(rw.underlying, oplog.WithAggregateNames(true)) + ticketer, err := oplog.NewGormTicketer(rw.underlying.DB, oplog.WithAggregateNames(true)) if err != nil { return nil, errors.WrapDeprecated(err, op, errors.WithMsg(fmt.Sprintf("%s: unable to get Ticketer", aggregateName)), errors.WithoutEvent()) } @@ -772,7 +793,7 @@ func (rw *Db) addOplogForItems(ctx context.Context, opType OpType, opts Options, if err != nil { return errors.Wrap(ctx, err, op, errors.WithMsg("oplog validation failed"), errors.WithoutEvent()) } - ticketer, err := oplog.NewGormTicketer(rw.underlying, oplog.WithAggregateNames(true)) + ticketer, err := oplog.NewGormTicketer(rw.underlying.DB, oplog.WithAggregateNames(true)) if err != nil { return errors.Wrap(ctx, err, op, errors.WithMsg("unable to get Ticketer"), errors.WithoutEvent()) } @@ -787,7 +808,7 @@ func (rw *Db) addOplogForItems(ctx context.Context, opType OpType, opts Options, } if err := entry.WriteEntryWith( ctx, - &oplog.GormWriter{Tx: rw.underlying}, + &oplog.GormWriter{Tx: rw.underlying.DB}, ticket, oplogMsgs..., ); err != nil { @@ -806,7 +827,7 @@ func (rw *Db) addOplog(ctx context.Context, opType OpType, opts Options, ticket if ticket == nil { return errors.New(ctx, errors.InvalidParameter, op, "missing ticket", errors.WithoutEvent()) } - ticketer, err := oplog.NewGormTicketer(rw.underlying, oplog.WithAggregateNames(true)) + ticketer, err := oplog.NewGormTicketer(rw.underlying.DB, oplog.WithAggregateNames(true)) if err != nil { return errors.Wrap(ctx, err, op, errors.WithMsg("unable to get Ticketer"), errors.WithoutEvent()) } @@ -825,7 +846,7 @@ func (rw *Db) addOplog(ctx context.Context, opType OpType, opts Options, ticket } err = entry.WriteEntryWith( ctx, - &oplog.GormWriter{Tx: rw.underlying}, + &oplog.GormWriter{Tx: rw.underlying.DB}, ticket, msg, ) @@ -855,7 +876,7 @@ func (rw *Db) WriteOplogEntryWith(ctx context.Context, wrapper wrapping.Wrapper, return errors.New(ctx, errors.InvalidParameter, op, "missing metadata") } - ticketer, err := oplog.NewGormTicketer(rw.underlying, oplog.WithAggregateNames(true)) + ticketer, err := oplog.NewGormTicketer(rw.underlying.DB, oplog.WithAggregateNames(true)) if err != nil { return errors.Wrap(ctx, err, op, errors.WithMsg("unable to get Ticketer")) } @@ -871,7 +892,7 @@ func (rw *Db) WriteOplogEntryWith(ctx context.Context, wrapper wrapping.Wrapper, } err = entry.WriteEntryWith( ctx, - &oplog.GormWriter{Tx: rw.underlying}, + &oplog.GormWriter{Tx: rw.underlying.DB}, ticket, msgs..., ) @@ -923,9 +944,10 @@ func (w *Db) DoTx(ctx context.Context, retries uint, backOff Backoff, Handler Tx } // step one of this, start a transaction... - newTx := w.underlying.BeginTx(ctx, nil) + newTx := w.underlying.WithContext(ctx) + newTx = newTx.Begin() - rw := &Db{newTx} + rw := &Db{underlying: &DB{newTx}} if err := Handler(rw, rw); err != nil { if err := newTx.Rollback().Error; err != nil { return info, errors.Wrap(ctx, err, op, errors.WithoutEvent()) @@ -1036,8 +1058,10 @@ func (rw *Db) SearchWhere(ctx context.Context, resources interface{}, where stri return errors.New(ctx, errors.InvalidParameter, op, "interface parameter must to be a pointer") } var err error - db := rw.underlying.Order(opts.withOrder) - + db := rw.underlying.WithContext(ctx) + if opts.withOrder != "" { + db = db.Order(opts.withOrder) + } // Perform limiting switch { case opts.WithLimit < 0: // any negative number signals unlimited results @@ -1060,6 +1084,23 @@ func (rw *Db) SearchWhere(ctx context.Context, resources interface{}, where stri return nil } +func (rw *Db) primaryFieldsAreZero(ctx context.Context, i interface{}) ([]string, bool, error) { + const op = "db.primaryFieldsAreZero" + var fieldNames []string + tx := rw.underlying.Model(i) + if err := tx.Statement.Parse(i); err != nil { + return nil, false, errors.Wrap(ctx, err, op, errors.WithoutEvent()) + } + for _, f := range tx.Statement.Schema.PrimaryFields { + if f.PrimaryKey { + if _, isZero := f.ValueOf(reflect.ValueOf(i)); isZero { + fieldNames = append(fieldNames, f.Name) + } + } + } + return fieldNames, len(fieldNames) > 0, nil +} + // filterPaths will filter out non-updatable fields func filterPaths(paths []string) []string { if len(paths) == 0 { diff --git a/internal/db/read_writer_test.go b/internal/db/read_writer_test.go index 8f7a615ae..14404793c 100644 --- a/internal/db/read_writer_test.go +++ b/internal/db/read_writer_test.go @@ -18,7 +18,6 @@ import ( wrapping "github.com/hashicorp/go-kms-wrapping" "github.com/hashicorp/go-secure-stdlib/base62" "github.com/hashicorp/go-uuid" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" @@ -44,7 +43,7 @@ func TestDb_UpdateUnsetField(t *testing.T) { cnt, err := rw.Update(context.Background(), updatedTu, []string{"Name"}, nil) require.NoError(t, err) assert.Equal(t, 1, cnt) - assert.Equal(t, "ignore", updatedTu.Email) + assert.Equal(t, "", updatedTu.Email) assert.Equal(t, "updated", updatedTu.Name) } @@ -1270,7 +1269,7 @@ func TestDb_Delete(t *testing.T) { } tests := []struct { name string - underlying *gorm.DB + underlying *DB wrapper wrapping.Wrapper args args want int @@ -1463,7 +1462,7 @@ func TestDb_ScanRows(t *testing.T) { err = w.Create(context.Background(), user) require.NoError(err) assert.NotEmpty(user.Id) - where := "select * from db_test_user where name in ($1, $2)" + where := "select * from db_test_user where name in (?, ?)" rows, err := w.Query(context.Background(), where, []interface{}{"alice", "bob"}) require.NoError(err) defer func() { err := rows.Close(); assert.NoError(err) }() @@ -1493,7 +1492,7 @@ func TestDb_Query(t *testing.T) { assert.NotEmpty(user.Id) assert.Equal("alice", user.Name) - where := "select * from db_test_user where name in ($1, $2)" + where := "select * from db_test_user where name in (?, ?)" rows, err := rw.Query(context.Background(), where, []interface{}{"alice", "bob"}) require.NoError(err) defer func() { err := rows.Close(); assert.NoError(err) }() @@ -1540,7 +1539,7 @@ func TestDb_CreateItems(t *testing.T) { } tests := []struct { name string - underlying *gorm.DB + underlying *DB args args wantOplogId string wantOplogMsgs bool @@ -1741,7 +1740,7 @@ func TestDb_DeleteItems(t *testing.T) { } tests := []struct { name string - underlying *gorm.DB + underlying *DB args args wantRowsDeleted int wantOplogId string @@ -1914,7 +1913,7 @@ func TestDb_DeleteItems(t *testing.T) { } } -func testUser(t *testing.T, conn *gorm.DB, name, email, phoneNumber string) *db_test.TestUser { +func testUser(t *testing.T, conn *DB, name, email, phoneNumber string) *db_test.TestUser { t.Helper() require := require.New(t) @@ -1935,7 +1934,7 @@ func testUser(t *testing.T, conn *gorm.DB, name, email, phoneNumber string) *db_ return u } -func testCar(t *testing.T, conn *gorm.DB, name, model string, mpg int32) *db_test.TestCar { +func testCar(t *testing.T, conn *DB, name, model string, mpg int32) *db_test.TestCar { t.Helper() require := require.New(t) @@ -1964,7 +1963,7 @@ func testId(t *testing.T) string { return id } -func testScooter(t *testing.T, conn *gorm.DB, model string, mpg int32) *db_test.TestScooter { +func testScooter(t *testing.T, conn *DB, model string, mpg int32) *db_test.TestScooter { t.Helper() require := require.New(t) @@ -1995,7 +1994,7 @@ func TestDb_LookupById(t *testing.T) { } tests := []struct { name string - underlying *gorm.DB + underlying *DB args args wantErr bool want proto.Message @@ -2095,7 +2094,7 @@ func TestDb_GetTicket(t *testing.T) { type notReplayable struct{} tests := []struct { name string - underlying *gorm.DB + underlying *DB aggregateType interface{} wantErr bool wantErrIs errors.Code @@ -2181,7 +2180,7 @@ func TestDb_WriteOplogEntryWith(t *testing.T) { } tests := []struct { name string - underlying *gorm.DB + underlying *DB args args wantErr bool wantErrIs errors.Code @@ -2889,7 +2888,7 @@ func TestDb_lookupAfterWrite(t *testing.T) { } tests := []struct { name string - underlying *gorm.DB + underlying *DB args args wantErr bool want proto.Message diff --git a/internal/db/schema/manager_test.go b/internal/db/schema/manager_test.go index 84b522d56..ea58b0fb1 100644 --- a/internal/db/schema/manager_test.go +++ b/internal/db/schema/manager_test.go @@ -7,6 +7,7 @@ import ( "strings" "testing" + "github.com/hashicorp/boundary/internal/db/common" "github.com/hashicorp/boundary/internal/db/schema/postgres" "github.com/hashicorp/boundary/internal/errors" "github.com/hashicorp/boundary/testing/dbtest" @@ -22,7 +23,7 @@ func TestNewManager(t *testing.T) { t.Cleanup(func() { require.NoError(t, c()) }) - d, err := sql.Open(dialect, u) + d, err := common.SqlOpen(dialect, u) require.NoError(t, err) ctx := context.Background() @@ -47,7 +48,7 @@ func TestCurrentState(t *testing.T) { }) require.NoError(t, err) ctx := context.Background() - d, err := sql.Open(dialect, u) + d, err := common.SqlOpen(dialect, u) require.NoError(t, err) m, err := NewManager(ctx, dialect, d) @@ -83,7 +84,7 @@ func TestRollForward(t *testing.T) { t.Cleanup(func() { require.NoError(t, c()) }) - d, err := sql.Open(dialect, u) + d, err := common.SqlOpen(dialect, u) require.NoError(t, err) ctx := context.Background() @@ -112,7 +113,7 @@ func TestRollForward_NotFromFresh(t *testing.T) { t.Cleanup(func() { require.NoError(t, c()) }) - d, err := sql.Open(dialect, u) + d, err := common.SqlOpen(dialect, u) require.NoError(t, err) // Initialize the DB with only a portion of the current sql scripts. @@ -146,7 +147,7 @@ func TestRunMigration_canceledContext(t *testing.T) { t.Cleanup(func() { require.NoError(t, c()) }) - d, err := sql.Open(dialect, u) + d, err := common.SqlOpen(dialect, u) require.NoError(t, err) ctx := context.Background() @@ -174,7 +175,7 @@ func TestRollForward_BadSQL(t *testing.T) { t.Cleanup(func() { require.NoError(t, c()) }) - d, err := sql.Open(dialect, u) + d, err := common.SqlOpen(dialect, u) require.NoError(t, err) // Initialize the DB with only a portion of the current sql scripts. @@ -198,12 +199,12 @@ func TestManager_ExclusiveLock(t *testing.T) { t.Cleanup(func() { require.NoError(t, c()) }) - d1, err := sql.Open(dialect, u) + d1, err := common.SqlOpen(dialect, u) require.NoError(t, err) m1, err := NewManager(ctx, dialect, d1) require.NoError(t, err) - d2, err := sql.Open(dialect, u) + d2, err := common.SqlOpen(dialect, u) require.NoError(t, err) m2, err := NewManager(ctx, dialect, d2) require.NoError(t, err) @@ -223,12 +224,12 @@ func TestManager_SharedLock(t *testing.T) { t.Cleanup(func() { require.NoError(t, c()) }) - d1, err := sql.Open("postgres", u) + d1, err := common.SqlOpen("postgres", u) require.NoError(t, err) m1, err := NewManager(ctx, "postgres", d1) require.NoError(t, err) - d2, err := sql.Open("postgres", u) + d2, err := common.SqlOpen("postgres", u) require.NoError(t, err) m2, err := NewManager(ctx, "postgres", d2) require.NoError(t, err) @@ -252,7 +253,7 @@ func Test_GetMigrationLog(t *testing.T) { t.Cleanup(func() { require.NoError(t, c()) }) - d, err := sql.Open("postgres", u) + d, err := common.SqlOpen("postgres", u) require.NoError(t, err) m, err := NewManager(ctx, "postgres", d) require.NoError(t, err) diff --git a/internal/db/schema/migrations/postgres/11/01_server_type_enum_test.go b/internal/db/schema/migrations/postgres/11/01_server_type_enum_test.go index 6d8779519..4f3c675b2 100644 --- a/internal/db/schema/migrations/postgres/11/01_server_type_enum_test.go +++ b/internal/db/schema/migrations/postgres/11/01_server_type_enum_test.go @@ -6,6 +6,7 @@ import ( "testing" "time" + "github.com/hashicorp/boundary/internal/db/common" "github.com/hashicorp/boundary/internal/db/schema" "github.com/hashicorp/boundary/testing/dbtest" "github.com/stretchr/testify/require" @@ -14,8 +15,8 @@ import ( const ( insertServerQuery = "insert into server (private_id, type, address) values ($1, $2, $3)" selectServerQuery = "select * from server where private_id = $1" - expectEnumConstraintErr = `pq: new row for relation "server_type_enm" violates check constraint "only_predefined_server_types_allowed"` - expectServerConstraintErr = `pq: insert or update on table "server" violates foreign key constraint "server_type_enm_fkey"` + expectEnumConstraintErr = `ERROR: new row for relation "server_type_enm" violates check constraint "only_predefined_server_types_allowed" (SQLSTATE 23514)` + expectServerConstraintErr = `ERROR: insert or update on table "server" violates foreign key constraint "server_type_enm_fkey" (SQLSTATE 23503)` ) type testServer struct { @@ -48,7 +49,7 @@ func Test_ServerEnumChanges(t *testing.T) { t.Cleanup(func() { require.NoError(c()) }) - d, err := sql.Open(dialect, u) + d, err := common.SqlOpen(dialect, u) require.NoError(err) // migration to the prior migration (before the one we want to test) diff --git a/internal/db/schema/migrations/postgres/12/01_timestamp_sub_funcs_test.go b/internal/db/schema/migrations/postgres/12/01_timestamp_sub_funcs_test.go index eb9fac8d7..7519b73ab 100644 --- a/internal/db/schema/migrations/postgres/12/01_timestamp_sub_funcs_test.go +++ b/internal/db/schema/migrations/postgres/12/01_timestamp_sub_funcs_test.go @@ -6,6 +6,7 @@ import ( "testing" "time" + "github.com/hashicorp/boundary/internal/db/common" "github.com/hashicorp/boundary/internal/db/schema" "github.com/hashicorp/boundary/testing/dbtest" "github.com/stretchr/testify/require" @@ -41,7 +42,7 @@ func testSetupDb(ctx context.Context, t *testing.T) *sql.DB { t.Cleanup(func() { require.NoError(c()) }) - d, err := sql.Open(dialect, u) + d, err := common.SqlOpen(dialect, u) require.NoError(err) oState := schema.TestCloneMigrationStates(t) diff --git a/internal/db/schema/migrations/postgres/14/warehouse_user_dim_test.go b/internal/db/schema/migrations/postgres/14/warehouse_user_dim_test.go index 1b40812f2..749190bbe 100644 --- a/internal/db/schema/migrations/postgres/14/warehouse_user_dim_test.go +++ b/internal/db/schema/migrations/postgres/14/warehouse_user_dim_test.go @@ -2,12 +2,12 @@ package migration import ( "context" - "database/sql" "testing" "github.com/hashicorp/boundary/internal/auth/oidc" "github.com/hashicorp/boundary/internal/authtoken" "github.com/hashicorp/boundary/internal/db" + "github.com/hashicorp/boundary/internal/db/common" "github.com/hashicorp/boundary/internal/db/schema" "github.com/hashicorp/boundary/internal/host/static" "github.com/hashicorp/boundary/internal/iam" @@ -16,7 +16,6 @@ import ( "github.com/hashicorp/boundary/internal/target" "github.com/hashicorp/boundary/testing/dbtest" wrapping "github.com/hashicorp/go-kms-wrapping" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -37,7 +36,7 @@ func TestMigrations_UserDimension(t *testing.T) { t.Cleanup(func() { require.NoError(c()) }) - d, err := sql.Open(dialect, u) + d, err := common.SqlOpen(dialect, u) require.NoError(err) // migration to the prior migration (before the one we want to test) @@ -55,7 +54,9 @@ func TestMigrations_UserDimension(t *testing.T) { assert.False(state.Dirty) // okay, now we can seed the database with test data - conn, err := gorm.Open(dialect, u) + dbType, err := db.StringToDbType(dialect) + require.NoError(err) + conn, err := db.Open(dbType, u) require.NoError(err) rw := db.New(conn) @@ -137,7 +138,7 @@ func TestMigrations_UserDimension(t *testing.T) { assert.False(state.Dirty) } -func testOidcAuthToken(t *testing.T, conn *gorm.DB, kms *kms.Kms, wrapper wrapping.Wrapper, scopeId string) *authtoken.AuthToken { +func testOidcAuthToken(t *testing.T, conn *db.DB, kms *kms.Kms, wrapper wrapping.Wrapper, scopeId string) *authtoken.AuthToken { t.Helper() authMethod := oidc.TestAuthMethod( diff --git a/internal/db/schema/migrations/postgres/16/warehouse_credential_dim_test.go b/internal/db/schema/migrations/postgres/16/warehouse_credential_dim_test.go index ef20f7fad..2f82503f0 100644 --- a/internal/db/schema/migrations/postgres/16/warehouse_credential_dim_test.go +++ b/internal/db/schema/migrations/postgres/16/warehouse_credential_dim_test.go @@ -18,7 +18,6 @@ import ( "github.com/hashicorp/boundary/internal/target" "github.com/hashicorp/boundary/testing/dbtest" wrapping "github.com/hashicorp/go-kms-wrapping" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -56,8 +55,11 @@ func TestMigrations_CredentialDimension(t *testing.T) { assert.Equal(priorMigration, state.DatabaseSchemaVersion) assert.False(state.Dirty) + dbType, err := db.StringToDbType(dialect) + require.NoError(err) + // okay, now we can seed the database with test data - conn, err := gorm.Open(dialect, u) + conn, err := db.Open(dbType, u) require.NoError(err) rw := db.New(conn) @@ -141,7 +143,7 @@ func TestMigrations_CredentialDimension(t *testing.T) { assert.False(state.Dirty) } -func testOidcAuthToken(t *testing.T, conn *gorm.DB, kms *kms.Kms, wrapper wrapping.Wrapper, scopeId string) *authtoken.AuthToken { +func testOidcAuthToken(t *testing.T, conn *db.DB, kms *kms.Kms, wrapper wrapping.Wrapper, scopeId string) *authtoken.AuthToken { t.Helper() authMethod := oidc.TestAuthMethod( @@ -168,7 +170,7 @@ func testOidcAuthToken(t *testing.T, conn *gorm.DB, kms *kms.Kms, wrapper wrappi return at } -func testSessionCredentialParams(t *testing.T, conn *gorm.DB, kms *kms.Kms, wrapper wrapping.Wrapper, tar *target.TcpTarget) []*session.DynamicCredential { +func testSessionCredentialParams(t *testing.T, conn *db.DB, kms *kms.Kms, wrapper wrapping.Wrapper, tar *target.TcpTarget) []*session.DynamicCredential { t.Helper() rw := db.New(conn) diff --git a/internal/db/schema/migrations/postgres/2/07_iam_test.go b/internal/db/schema/migrations/postgres/2/07_iam_test.go index e24549b33..04e76927b 100644 --- a/internal/db/schema/migrations/postgres/2/07_iam_test.go +++ b/internal/db/schema/migrations/postgres/2/07_iam_test.go @@ -2,15 +2,15 @@ package migration import ( "context" - "database/sql" "testing" "github.com/hashicorp/boundary/internal/auth/password" "github.com/hashicorp/boundary/internal/db" + "github.com/hashicorp/boundary/internal/db/common" "github.com/hashicorp/boundary/internal/db/schema" "github.com/hashicorp/boundary/internal/iam" "github.com/hashicorp/boundary/testing/dbtest" - "github.com/jinzhu/gorm" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -38,7 +38,7 @@ func Test_PrimaryAuthMethodChanges(t *testing.T) { t.Cleanup(func() { require.NoError(c()) }) - d, err := sql.Open(dialect, u) + d, err := common.SqlOpen(dialect, u) require.NoError(err) // migration to the prior migration (before the one we want to test) @@ -56,7 +56,9 @@ func Test_PrimaryAuthMethodChanges(t *testing.T) { assert.False(state.Dirty) // okay, now we can seed the database with test data - conn, err := gorm.Open(dialect, u) + dbType, err := db.StringToDbType(dialect) + require.NoError(err) + conn, err := db.Open(dbType, u) require.NoError(err) rootWrapper := db.TestWrapper(t) iamRepo := iam.TestRepo(t, conn, rootWrapper) diff --git a/internal/db/schema/migrations/postgres/8/08_connection_test.go b/internal/db/schema/migrations/postgres/8/08_connection_test.go index 35367ce9f..9de3eb8d3 100644 --- a/internal/db/schema/migrations/postgres/8/08_connection_test.go +++ b/internal/db/schema/migrations/postgres/8/08_connection_test.go @@ -1,6 +1,7 @@ package migration import ( + "context" "database/sql" "testing" @@ -37,10 +38,11 @@ func TestMigration(t *testing.T) { ` selectQuery = `select session_id, server_id from session_connection_testing order by session_id` ) - + ctx := context.Background() conn, _ := db.TestSetup(t, "postgres", db.WithTemplate("template1")) - db := conn.DB() - _, err := db.Exec(createTables) + db, err := conn.SqlDB(ctx) + require.NoError(err) + _, err = db.Exec(createTables) require.NoError(err) tests := []struct { diff --git a/internal/db/schema/migrations/postgres/9/managed_group_test.go b/internal/db/schema/migrations/postgres/9/managed_group_test.go index b6060519a..d39cc1d14 100644 --- a/internal/db/schema/migrations/postgres/9/managed_group_test.go +++ b/internal/db/schema/migrations/postgres/9/managed_group_test.go @@ -1,10 +1,13 @@ package migration import ( + "context" + "database/sql" "fmt" "testing" "time" + "github.com/hashicorp/boundary/internal/db" "github.com/hashicorp/boundary/internal/servers/controller" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -15,8 +18,7 @@ func Test_ManagedGroupTable(t *testing.T) { tc := controller.NewTestController(t, nil) defer tc.Shutdown() - db := tc.DbConn().DB() - var err error + rw := db.New(tc.DbConn()) managedGroupId := "a_bcdefghijk" defaultPasswordAuthMethodId := "ampw_1234567890" @@ -44,9 +46,12 @@ func Test_ManagedGroupTable(t *testing.T) { for _, tt := range insertTests { t.Run("insert: "+tt.testName, func(t *testing.T) { require := require.New(t) - _, err = db.Exec("insert into auth_managed_group values ($1, $2)", - tt.publicId, - tt.authMethodId) + + _, err := rw.Exec(context.Background(), "insert into auth_managed_group values (@public_id, @auth_method_id)", + []interface{}{ + sql.Named("public_id", tt.publicId), + sql.Named("auth_method_id", tt.authMethodId), + }) require.True(tt.wantErr == (err != nil)) }) } @@ -76,7 +81,11 @@ func Test_ManagedGroupTable(t *testing.T) { for _, tt := range updateTests { t.Run("update: "+tt.testName, func(t *testing.T) { assert := assert.New(t) - _, err = db.Exec(fmt.Sprintf("update auth_managed_group set %s = $1 where public_id = $2", tt.column), tt.value, tt.publicId) + _, err := rw.Exec(context.Background(), fmt.Sprintf("update auth_managed_group set %s = @value where public_id = @public_id", tt.column), + []interface{}{ + sql.Named("value", tt.value), + sql.Named("public_id", tt.publicId), + }) assert.True(tt.wantErr == (err != nil)) }) } @@ -87,8 +96,8 @@ func Test_OidcManagedGroupTable(t *testing.T) { tc := controller.NewTestController(t, nil) defer tc.Shutdown() - db := tc.DbConn().DB() - var err error + ctx := context.Background() + rw := db.New(tc.DbConn()) managedGroupId := "a_bcdefghijk" defaultPasswordAuthMethodId := "ampw_1234567890" @@ -150,18 +159,20 @@ func Test_OidcManagedGroupTable(t *testing.T) { for _, tt := range insertTests { t.Run("insert: "+tt.testName, func(t *testing.T) { require := require.New(t) - _, err = db.Exec("insert into auth_oidc_managed_group (public_id, auth_method_id, name, filter) values ($1, $2, $3, $4)", - tt.publicId, - tt.authMethodId, - tt.name, - tt.filter) + _, err := rw.Exec(ctx, "insert into auth_oidc_managed_group (public_id, auth_method_id, name, filter) values (@public_id, @auth_method_id, @name, @filter)", + []interface{}{ + sql.Named("public_id", tt.publicId), + sql.Named("auth_method_id", tt.authMethodId), + sql.Named("name", tt.name), + sql.Named("filter", tt.filter), + }) require.True(tt.wantErr == (err != nil)) }) } } // Read some values to validate that things were set automatically - rows, err := db.Query("select create_time, update_time, version from auth_oidc_managed_group") + rows, err := rw.Query(ctx, "select create_time, update_time, version from auth_oidc_managed_group", nil) require.NoError(t, err) require.True(t, rows.Next()) var create_time, update_time time.Time @@ -207,14 +218,17 @@ func Test_OidcManagedGroupTable(t *testing.T) { for _, tt := range updateTests { t.Run("update: "+tt.testName, func(t *testing.T) { require := require.New(t) - _, err = db.Exec(fmt.Sprintf("update auth_oidc_managed_group set %s = $1 where public_id = $2", tt.column), tt.value, managedGroupId) + _, err = rw.Exec(ctx, fmt.Sprintf("update auth_oidc_managed_group set %s = @value where public_id = @public_id", tt.column), + []interface{}{ + sql.Named("value", tt.value), sql.Named("public_id", managedGroupId), + }) require.True(tt.wantErr == (err != nil)) }) } } // Read values again to validate that things were updated automatically - rows, err = db.Query("select create_time, update_time, version from auth_oidc_managed_group") + rows, err = rw.Query(ctx, "select create_time, update_time, version from auth_oidc_managed_group", nil) require.NoError(t, err) require.True(t, rows.Next()) var updated_create_time, updated_update_time time.Time @@ -224,7 +238,7 @@ func Test_OidcManagedGroupTable(t *testing.T) { assert.Equal(t, 2, version) // Read values from auth_managed_group to ensure it was populated automatically - rows, err = db.Query("select public_id, auth_method_id from auth_managed_group") + rows, err = rw.Query(ctx, "select public_id, auth_method_id from auth_managed_group", nil) require.NoError(t, err) require.True(t, rows.Next()) var public_id, auth_method_id string @@ -233,14 +247,11 @@ func Test_OidcManagedGroupTable(t *testing.T) { assert.Equal(t, defaultOidcAuthMethodId, auth_method_id) // Delete the value from the subtype table - res, err := db.Exec("delete from auth_oidc_managed_group where public_id = $1", managedGroupId) - require.NoError(t, err) - affected, err := res.RowsAffected() - require.NoError(t, err) + affected, err := rw.Exec(ctx, "delete from auth_oidc_managed_group where public_id = @public_id", []interface{}{sql.Named("public_id", managedGroupId)}) require.EqualValues(t, 1, affected) // It should no longer be in the base table - rows, err = db.Query("select public_id, auth_method_id from auth_managed_group") + rows, err = rw.Query(ctx, "select public_id, auth_method_id from auth_managed_group", nil) require.NoError(t, err) require.False(t, rows.Next()) } @@ -250,8 +261,8 @@ func Test_AuthManagedOidcGroupMemberAccountTable(t *testing.T) { tc := controller.NewTestController(t, nil) defer tc.Shutdown() - db := tc.DbConn().DB() - var err error + ctx := context.Background() + rw := db.New(tc.DbConn()) managedGroupId := "a_bcdefghijk" defaultOidcAuthMethodId := "amoidc_1234567890" @@ -259,15 +270,17 @@ func Test_AuthManagedOidcGroupMemberAccountTable(t *testing.T) { filter := "this is a filter" // Insert valid data in auth_oidc_managed_group to use for the following tests - _, err = db.Exec("insert into auth_oidc_managed_group (public_id, auth_method_id, name, filter) values ($1, $2, $3, $4)", - managedGroupId, - defaultOidcAuthMethodId, - name, - filter) + _, err := rw.Exec(ctx, "insert into auth_oidc_managed_group (public_id, auth_method_id, name, filter) values (@public_id, @auth_method_id, @name, @filter)", + []interface{}{ + sql.Named("public_id", managedGroupId), + sql.Named("auth_method_id", defaultOidcAuthMethodId), + sql.Named("name", name), + sql.Named("filter", filter), + }) require.NoError(t, err) // Fetch a valid (oidc) account ID to use in insertion - rows, err := db.Query("select public_id from auth_oidc_account limit 1") + rows, err := rw.Query(ctx, "select public_id from auth_oidc_account limit 1", nil) require.NoError(t, err) require.True(t, rows.Next()) var accountId string @@ -310,16 +323,18 @@ func Test_AuthManagedOidcGroupMemberAccountTable(t *testing.T) { for _, tt := range insertTests { t.Run("insert: "+tt.testName, func(t *testing.T) { assert := assert.New(t) - _, err = db.Exec("insert into auth_oidc_managed_group_member_account (managed_group_id, member_id) values ($1, $2)", - tt.managedGroupId, - tt.memberId) + _, err = rw.Exec(ctx, "insert into auth_oidc_managed_group_member_account (managed_group_id, member_id) values (@group_id, @member_id)", + []interface{}{ + sql.Named("group_id", tt.managedGroupId), + sql.Named("member_id", tt.memberId), + }) assert.True(tt.wantErr == (err != nil)) }) } } // Read some values to validate that things were set automatically - rows, err = db.Query("select create_time, managed_group_id, member_id from auth_oidc_managed_group_member_account") + rows, err = rw.Query(ctx, "select create_time, managed_group_id, member_id from auth_oidc_managed_group_member_account", nil) require.NoError(t, err) require.True(t, rows.Next()) var create_time time.Time @@ -357,14 +372,18 @@ func Test_AuthManagedOidcGroupMemberAccountTable(t *testing.T) { for _, tt := range updateTests { t.Run("update: "+tt.testName, func(t *testing.T) { assert := assert.New(t) - _, err = db.Exec(fmt.Sprintf("update auth_managed_group_member_account set %s = $1 where managed_group_id = $2 and member_id = $3", tt.column), managedGroupId, accountId) + _, err = rw.Exec(ctx, fmt.Sprintf("update auth_managed_group_member_account set %s = ? where managed_group_id = @group_id and member_id = @member_id", tt.column), + []interface{}{ + sql.Named("group_id", managedGroupId), + sql.Named("member_id", accountId), + }) assert.True(tt.wantErr == (err != nil)) }) } } // Read from the view to ensure we see it there - rows, err = db.Query("select create_time, managed_group_id, member_id from auth_managed_group_member_account") + rows, err = rw.Query(ctx, "select create_time, managed_group_id, member_id from auth_managed_group_member_account", nil) require.NoError(t, err) require.True(t, rows.Next()) var view_create_time time.Time diff --git a/internal/db/schema/postgres/postgres.go b/internal/db/schema/postgres/postgres.go index 1c30af45e..8a038abca 100644 --- a/internal/db/schema/postgres/postgres.go +++ b/internal/db/schema/postgres/postgres.go @@ -34,12 +34,11 @@ import ( "fmt" "io" "io/ioutil" - "strconv" "strings" "github.com/hashicorp/boundary/internal/errors" "github.com/hashicorp/go-multierror" - "github.com/lib/pq" + "github.com/jackc/pgconn" ) // schemaAccessLockId is a Lock key used to ensure a single boundary binary is operating @@ -232,14 +231,12 @@ func (p *Postgres) Run(ctx context.Context, migration io.Reader, version int) er if rollbackErr := rollback(); rollbackErr != nil { err = multierror.Append(err, rollbackErr) } - if pgErr, ok := err.(*pq.Error); ok { + if pgErr, ok := err.(*pgconn.PgError); ok { var line uint var col uint var lineColOK bool - if pgErr.Position != "" { - if pos, err := strconv.ParseUint(pgErr.Position, 10, 64); err == nil { - line, col, lineColOK = computeLineFromPos(query, int(pos)) - } + if pgErr.Position != 0 { + line, col, lineColOK = computeLineFromPos(query, int(pgErr.Position)) } message := "migration failed" if lineColOK { @@ -308,8 +305,7 @@ func (p *Postgres) setVersion(ctx context.Context, version int, dirty bool) erro defer func() { p.tx = nil }() return tx.Rollback() } - - query := `truncate ` + pq.QuoteIdentifier(defaultMigrationsTable) + query := `truncate ` + quoteIdentifier(defaultMigrationsTable) if _, err := tx.ExecContext(ctx, query); err != nil { if errRollback := rollback(); errRollback != nil { err = multierror.Append(err, errRollback) @@ -321,7 +317,7 @@ func (p *Postgres) setVersion(ctx context.Context, version int, dirty bool) erro // empty schema Version for failed down migration on the first migration // See: https://github.com/golang-migrate/migrate/issues/330 if version >= 0 || (version == nilVersion && dirty) { - query = `insert into ` + pq.QuoteIdentifier(defaultMigrationsTable) + + query = `insert into ` + quoteIdentifier(defaultMigrationsTable) + ` (version, dirty) values ($1, $2)` if _, err := tx.ExecContext(ctx, query, version, dirty); err != nil { if errRollback := rollback(); errRollback != nil { @@ -368,7 +364,7 @@ func (p *Postgres) CurrentState(ctx context.Context) (version int, previouslyRan return nilVersion, previouslyRan, dirty, errors.New(ctx, errors.MigrationIntegrity, op, "both old and new migration tables exist") } - query := `select version, dirty from ` + pq.QuoteIdentifier(tableName) + query := `select version, dirty from ` + quoteIdentifier(tableName) results, err := p.conn.QueryContext(ctx, query) if err != nil { return nilVersion, previouslyRan, dirty, errors.Wrap(ctx, err, op) @@ -420,7 +416,7 @@ func (p *Postgres) drop(ctx context.Context) (err error) { if len(tableNames) > 0 { // delete one by one ... for _, t := range tableNames { - query = `drop table if exists ` + pq.QuoteIdentifier(t) + ` cascade` + query = `drop table if exists ` + quoteIdentifier(t) + ` cascade` if _, err := p.conn.ExecContext(ctx, query); err != nil { return errors.Wrap(ctx, err, op) } @@ -464,7 +460,7 @@ func (p *Postgres) EnsureVersionTable(ctx context.Context) (err error) { return errors.Wrap(ctx, err, op) } - createStmt := `create table if not exists ` + pq.QuoteIdentifier(defaultMigrationsTable) + ` (version bigint primary key, dirty boolean not null)` + createStmt := `create table if not exists ` + quoteIdentifier(defaultMigrationsTable) + ` (version bigint primary key, dirty boolean not null)` if _, err = extr.ExecContext(ctx, createStmt); err != nil { if wpErr := rollback(); wpErr != nil { err = multierror.Append(err, wpErr) @@ -474,3 +470,8 @@ func (p *Postgres) EnsureVersionTable(ctx context.Context) (err error) { return nil } + +func quoteIdentifier(input string) (output string) { + output = `"` + strings.Replace(input, `"`, `""`, -1) + `"` + return +} diff --git a/internal/db/schema/postgres/postgres_test.go b/internal/db/schema/postgres/postgres_test.go index 2b16c7317..185e9f3f9 100644 --- a/internal/db/schema/postgres/postgres_test.go +++ b/internal/db/schema/postgres/postgres_test.go @@ -28,7 +28,7 @@ package postgres -// error codes https://github.com/lib/pq/blob/master/error.go +// errors: https://pkg.go.dev/github.com/jackc/pgconn#PgError import ( "bytes" diff --git a/internal/db/schema/postgres/testing.go b/internal/db/schema/postgres/testing.go index 42d978d24..854495a36 100644 --- a/internal/db/schema/postgres/testing.go +++ b/internal/db/schema/postgres/testing.go @@ -31,11 +31,11 @@ package postgres import ( "bytes" "context" - "database/sql" "testing" "time" "github.com/golang-migrate/migrate/v4/database" + "github.com/hashicorp/boundary/internal/db/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -123,7 +123,7 @@ func testSetVersion(t *testing.T, d *Postgres) { func open(t *testing.T, ctx context.Context, u string) (*Postgres, error) { t.Helper() - db, err := sql.Open("postgres", u) + db, err := common.SqlOpen("postgres", u) require.NoError(t, err) px, err := New(ctx, db) diff --git a/internal/db/schema/schema.go b/internal/db/schema/schema.go index f300c7308..c33bd505d 100644 --- a/internal/db/schema/schema.go +++ b/internal/db/schema/schema.go @@ -2,8 +2,8 @@ package schema import ( "context" - "database/sql" + "github.com/hashicorp/boundary/internal/db/common" "github.com/hashicorp/boundary/internal/errors" ) @@ -13,7 +13,7 @@ import ( func MigrateStore(ctx context.Context, dialect string, url string, opt ...Option) (bool, error) { const op = "schema.MigrateStore" - d, err := sql.Open(dialect, url) + d, err := common.SqlOpen(dialect, url) if err != nil { return false, errors.Wrap(ctx, err, op) } diff --git a/internal/db/schema/schema_test.go b/internal/db/schema/schema_test.go index 634e881ef..ad2d354c9 100644 --- a/internal/db/schema/schema_test.go +++ b/internal/db/schema/schema_test.go @@ -2,9 +2,9 @@ package schema import ( "context" - "database/sql" "testing" + "github.com/hashicorp/boundary/internal/db/common" "github.com/hashicorp/boundary/testing/dbtest" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -53,7 +53,7 @@ func Test_MigrateStore_WithMigrationStates(t *testing.T) { t.Cleanup(func() { require.NoError(c()) }) - d, err := sql.Open(dialect, u) + d, err := common.SqlOpen(dialect, u) require.NoError(err) // migration to the prior migration (before the one we want to test) diff --git a/internal/db/testing.go b/internal/db/testing.go index 915695103..c8b76a293 100644 --- a/internal/db/testing.go +++ b/internal/db/testing.go @@ -16,12 +16,12 @@ import ( "github.com/hashicorp/boundary/testing/dbtest" wrapping "github.com/hashicorp/go-kms-wrapping" "github.com/hashicorp/go-kms-wrapping/wrappers/aead" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" + "gorm.io/gorm/logger" ) // setup the tests (initialize the database one-time and intialized testDatabaseURL). Do not close the returned db. -func TestSetup(t *testing.T, dialect string, opt ...TestOption) (*gorm.DB, string) { +func TestSetup(t *testing.T, dialect string, opt ...TestOption) (*DB, string) { var cleanup func() error var url string var err error @@ -46,13 +46,19 @@ func TestSetup(t *testing.T, dialect string, opt ...TestOption) (*gorm.DB, strin if err != nil { t.Fatalf("Couldn't init store on existing db: %v", err) } - - db, err := gorm.Open(dialect, url) + dbType, err := StringToDbType(dialect) if err != nil { t.Fatal(err) } + db, err := Open(dbType, url) + if err != nil { + t.Fatal(err) + } + db.Logger.LogMode(logger.Error) t.Cleanup(func() { - assert.NoError(t, db.Close(), "Got error closing gorm db.") + sqlDB, err := db.SqlDB(ctx) + assert.NoError(t, err) + assert.NoError(t, sqlDB.Close(), "Got error closing gorm db.") }) return db, url } diff --git a/internal/db/timestamp/scanners.go b/internal/db/timestamp/scanners.go index 8f7674dc4..0cf43129a 100644 --- a/internal/db/timestamp/scanners.go +++ b/internal/db/timestamp/scanners.go @@ -3,16 +3,29 @@ package timestamp import ( "database/sql/driver" "errors" + "math" "time" "google.golang.org/protobuf/types/known/timestamppb" ) +var ( + NegativeInfinityTS = time.Date(math.MinInt32, time.January, 1, 0, 0, 0, 0, time.UTC) + PositiveInfinityTS = time.Date(math.MaxInt32, time.December, 31, 23, 59, 59, 1e9-1, time.UTC) +) + // Scan implements sql.Scanner for protobuf Timestamp. func (ts *Timestamp) Scan(value interface{}) error { switch t := value.(type) { case time.Time: ts.Timestamp = timestamppb.New(t) // google proto version + case string: + switch value { + case "-infinity": + ts.Timestamp = timestamppb.New(NegativeInfinityTS) + case "infinity": + ts.Timestamp = timestamppb.New(PositiveInfinityTS) + } default: return errors.New("Not a protobuf Timestamp") } @@ -26,3 +39,8 @@ func (ts *Timestamp) Value() (driver.Value, error) { } return ts.Timestamp.AsTime(), nil } + +// GormDataType gorm common data type (required) +func (ts *Timestamp) GormDataType() string { + return "timestamp" +} diff --git a/internal/errors/error.go b/internal/errors/error.go index 73f0f396a..c729f9e80 100644 --- a/internal/errors/error.go +++ b/internal/errors/error.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/hashicorp/boundary/internal/observability/event" - "github.com/lib/pq" + "github.com/jackc/pgconn" ) // Op represents an operation (package.function). @@ -192,29 +192,29 @@ func Convert(e error) *Err { if err, ok := e.(*Err); ok { return err } - var pqError *pq.Error - if As(e, &pqError) { - if pqError.Code.Class() == "23" { // class of integrity constraint violations - switch pqError.Code { + var pgxError *pgconn.PgError + if As(e, &pgxError) { + if pgxError.Code[0:2] == "23" { // class of integrity constraint violations + switch pgxError.Code { case "23505": // unique_violation - return E(ctx, WithoutEvent(), WithMsg(pqError.Message), WithWrap(E(ctx, WithoutEvent(), WithCode(NotUnique), WithMsg("unique constraint violation")))).(*Err) + return E(ctx, WithoutEvent(), WithMsg(pgxError.Message), WithWrap(E(ctx, WithoutEvent(), WithCode(NotUnique), WithMsg("unique constraint violation")))).(*Err) case "23502": // not_null_violation - msg := fmt.Sprintf("%s must not be empty", pqError.Column) + msg := fmt.Sprintf("%s must not be empty", pgxError.ColumnName) return E(ctx, WithoutEvent(), WithMsg(msg), WithWrap(E(ctx, WithoutEvent(), WithCode(NotNull), WithMsg("not null constraint violated")))).(*Err) case "23514": // check_violation - msg := fmt.Sprintf("%s constraint failed", pqError.Constraint) + msg := fmt.Sprintf("%s constraint failed", pgxError.ConstraintName) return E(ctx, WithoutEvent(), WithMsg(msg), WithWrap(E(ctx, WithoutEvent(), WithCode(CheckConstraint), WithMsg("check constraint violated")))).(*Err) default: - return E(ctx, WithoutEvent(), WithCode(NotSpecificIntegrity), WithMsg(pqError.Message)).(*Err) + return E(ctx, WithoutEvent(), WithCode(NotSpecificIntegrity), WithMsg(pgxError.Message)).(*Err) } } - switch pqError.Code { + switch pgxError.Code { case "42P01": - return E(ctx, WithoutEvent(), WithCode(MissingTable), WithMsg(pqError.Message)).(*Err) + return E(ctx, WithoutEvent(), WithCode(MissingTable), WithMsg(pgxError.Message)).(*Err) case "42703": - return E(ctx, WithoutEvent(), WithCode(ColumnNotFound), WithMsg(pqError.Message)).(*Err) + return E(ctx, WithoutEvent(), WithCode(ColumnNotFound), WithMsg(pgxError.Message)).(*Err) case "P0001": - return E(ctx, WithoutEvent(), WithCode(Exception), WithMsg(pqError.Message)).(*Err) + return E(ctx, WithoutEvent(), WithCode(Exception), WithMsg(pgxError.Message)).(*Err) } } // unfortunately, we can't help. diff --git a/internal/errors/error_test.go b/internal/errors/error_test.go index 138ca8256..91101bfef 100644 --- a/internal/errors/error_test.go +++ b/internal/errors/error_test.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/boundary/internal/db" "github.com/hashicorp/boundary/internal/errors" - "github.com/lib/pq" + "github.com/jackc/pgconn" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -254,8 +254,8 @@ func Test_WrapError(t *testing.T) { }, { name: "NotSpecificIntegrity", - err: &pq.Error{ - Code: pq.ErrorCode("23001"), + err: &pgconn.PgError{ + Code: "23001", Message: "test msg", }, want: &errors.Err{ @@ -449,8 +449,8 @@ func TestConvertError(t *testing.T) { }, { name: "NotSpecificIntegrity", - e: &pq.Error{ - Code: pq.ErrorCode("23001"), + e: &pgconn.PgError{ + Code: "23001", }, wantErr: errors.EDeprecated(errors.WithCode(errors.NotSpecificIntegrity)), }, diff --git a/internal/errors/is.go b/internal/errors/is.go index 1bad741a1..01bc22f22 100644 --- a/internal/errors/is.go +++ b/internal/errors/is.go @@ -3,7 +3,7 @@ package errors import ( "errors" - "github.com/lib/pq" + "github.com/jackc/pgconn" ) // IsUniqueError returns a boolean indicating whether the error is known to @@ -17,9 +17,9 @@ func IsUniqueError(err error) bool { return true } - var pqError *pq.Error - if errors.As(err, &pqError) { - if pqError.Code == "23505" { // unique_violation + var pgxError *pgconn.PgError + if errors.As(err, &pgxError) { + if pgxError.Code == "23505" { // unique_violation return true } } @@ -38,9 +38,9 @@ func IsCheckConstraintError(err error) bool { return true } - var pqError *pq.Error - if errors.As(err, &pqError) { - if pqError.Code == "23514" { // check_violation + var pgxError *pgconn.PgError + if errors.As(err, &pgxError) { + if pgxError.Code == "23514" { // check_violation return true } } @@ -59,9 +59,9 @@ func IsNotNullError(err error) bool { return true } - var pqError *pq.Error - if errors.As(err, &pqError) { - if pqError.Code == "23502" { // not_null_violation + var pgxError *pgconn.PgError + if errors.As(err, &pgxError) { + if pgxError.Code == "23502" { // not_null_violation return true } } @@ -72,9 +72,9 @@ func IsNotNullError(err error) bool { // IsMissingTableError returns a boolean indicating whether the error is known // to report a undefined/missing table violation. func IsMissingTableError(err error) bool { - var pqError *pq.Error - if errors.As(err, &pqError) { - if pqError.Code == "42P01" { + var pgxError *pgconn.PgError + if errors.As(err, &pgxError) { + if pgxError.Code == "42P01" { return true } } diff --git a/internal/errors/is_test.go b/internal/errors/is_test.go index ad76af9a9..beb98c6c8 100644 --- a/internal/errors/is_test.go +++ b/internal/errors/is_test.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/boundary/internal/db" "github.com/hashicorp/boundary/internal/errors" - "github.com/lib/pq" + "github.com/jackc/pgconn" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -26,15 +26,15 @@ func TestError_IsUnique(t *testing.T) { }, { name: "postgres-not-unique", - in: &pq.Error{ - Code: pq.ErrorCode("23503"), + in: &pgconn.PgError{ + Code: "23503", }, want: false, }, { name: "postgres-is-unique2", - in: &pq.Error{ - Code: pq.ErrorCode("23505"), + in: &pgconn.PgError{ + Code: "23505", }, want: true, }, @@ -44,11 +44,11 @@ func TestError_IsUnique(t *testing.T) { want: true, }, { - name: "wrapped-pq-is-unique", + name: "wrapped-pg-is-unique", in: errors.E( context.TODO(), - errors.WithWrap(&pq.Error{ - Code: pq.ErrorCode("23505"), + errors.WithWrap(&pgconn.PgError{ + Code: "23505", }), ), want: true, @@ -89,15 +89,15 @@ func TestError_IsCheckConstraint(t *testing.T) { }, { name: "postgres-not-check-constraint", - in: &pq.Error{ - Code: pq.ErrorCode("23505"), + in: &pgconn.PgError{ + Code: "23505", }, want: false, }, { name: "postgres-is-check-constraint", - in: &pq.Error{ - Code: pq.ErrorCode("23514"), + in: &pgconn.PgError{ + Code: "23514", }, want: true, }, @@ -107,10 +107,10 @@ func TestError_IsCheckConstraint(t *testing.T) { want: true, }, { - name: "wrapped-pq-is-check-constraint", + name: "wrapped-pg-is-check-constraint", in: errors.E(context.TODO(), errors.WithCode(errors.CheckConstraint), - errors.WithWrap(&pq.Error{ - Code: pq.ErrorCode("23514"), + errors.WithWrap(&pgconn.PgError{ + Code: "23514", }), ), want: true, @@ -151,22 +151,22 @@ func TestError_IsNotNullError(t *testing.T) { }, { name: "postgres-is-unique-not-not-null", - in: &pq.Error{ - Code: pq.ErrorCode("23505"), + in: &pgconn.PgError{ + Code: "23505", }, want: false, }, { name: "postgres-is-check-constraint-not-not-null", - in: &pq.Error{ - Code: pq.ErrorCode("23514"), + in: &pgconn.PgError{ + Code: "23514", }, want: false, }, { name: "postgres-is-not-null", - in: &pq.Error{ - Code: pq.ErrorCode("23502"), + in: &pgconn.PgError{ + Code: "23502", }, want: true, }, @@ -176,10 +176,10 @@ func TestError_IsNotNullError(t *testing.T) { want: true, }, { - name: "wrapped-pq-is-not-null", + name: "wrapped-pg-is-not-null", in: errors.E(context.TODO(), errors.WithCode(errors.NotNull), - errors.WithWrap(&pq.Error{ - Code: pq.ErrorCode("23502"), + errors.WithWrap(&pgconn.PgError{ + Code: "23502", }), ), want: true, @@ -219,22 +219,22 @@ func TestError_IsMissingTableError(t *testing.T) { }, { name: "postgres-is-unique-not-not-null", - in: &pq.Error{ - Code: pq.ErrorCode("23505"), + in: &pgconn.PgError{ + Code: "23505", }, want: false, }, { name: "postgres-is-check-constraint-not-not-null", - in: &pq.Error{ - Code: pq.ErrorCode("23514"), + in: &pgconn.PgError{ + Code: "23514", }, want: false, }, { name: "postgres-is-missing-table", - in: &pq.Error{ - Code: pq.ErrorCode("42P01"), + in: &pgconn.PgError{ + Code: "42P01", }, want: true, }, diff --git a/internal/gen/controller/api/services/auth_method_service.pb.go b/internal/gen/controller/api/services/auth_method_service.pb.go index 62ca568e2..a22b7cb26 100644 --- a/internal/gen/controller/api/services/auth_method_service.pb.go +++ b/internal/gen/controller/api/services/auth_method_service.pb.go @@ -873,14 +873,14 @@ type AuthenticateRequest struct { unknownFields protoimpl.UnknownFields // The ID of the Auth Method in the system that should be used for authentication. - AuthMethodId string `protobuf:"bytes,1,opt,name=auth_method_id,proto3" json:"auth_method_id,omitempty"` + AuthMethodId string `protobuf:"bytes,1,opt,name=auth_method_id,proto3" json:"auth_method_id,omitempty" class:"public"` // @gotags: `class:"public"` // This can be "cookie" or "token". If not provided, "token" will be used. "cookie" activates a split-cookie method where the token is split partially between http-only and regular cookies in order // to keep it safe from rogue JS in the browser. TokenType string `protobuf:"bytes,2,opt,name=token_type,proto3" json:"token_type,omitempty"` // Attributes are passed to the Auth Method; the valid keys and values depend on the type of Auth Method as well as the command. Attributes *structpb.Struct `protobuf:"bytes,4,opt,name=attributes,proto3" json:"attributes,omitempty"` // The command to perform. - Command string `protobuf:"bytes,5,opt,name=command,proto3" json:"command,omitempty"` + Command string `protobuf:"bytes,5,opt,name=command,proto3" json:"command,omitempty" class:"public"` // @gotags: `class:"public"` } func (x *AuthenticateRequest) Reset() { @@ -951,7 +951,7 @@ type AuthenticateResponse struct { // Valid keys and values depend on the type of Auth Method as well as the command. Attributes *structpb.Struct `protobuf:"bytes,4,opt,name=attributes,proto3" json:"attributes,omitempty"` // The command that was performed. - Command string `protobuf:"bytes,5,opt,name=command,proto3" json:"command,omitempty"` + Command string `protobuf:"bytes,5,opt,name=command,proto3" json:"command,omitempty" class:"public"` // @gotags: `class:"public"` } func (x *AuthenticateResponse) Reset() { diff --git a/internal/gen/controller/api/services/auth_method_service_taggable.go b/internal/gen/controller/api/services/auth_method_service_taggable.go new file mode 100644 index 000000000..7359eaf3d --- /dev/null +++ b/internal/gen/controller/api/services/auth_method_service_taggable.go @@ -0,0 +1,63 @@ +package services + +import "github.com/hashicorp/eventlogger/filters/encrypt" + +// Tags implements the encrypt.Taggable interface which allows +// AuthenticateResponse Attributes to be classified for the encrypt filter. +func (req *AuthenticateResponse) Tags() ([]encrypt.PointerTag, error) { + if req.Attributes == nil { + return nil, nil + } + return []encrypt.PointerTag{ + // public fields + { + Pointer: "/Attributes/Fields/account_id", + Classification: encrypt.PublicClassification, + }, + { + Pointer: "/Attributes/Fields/approximate_last_used_time", + Classification: encrypt.PublicClassification, + }, + { + Pointer: "/Attributes/Fields/auth_method_id", + Classification: encrypt.PublicClassification, + }, + { + Pointer: "/Attributes/Fields/authorized_actions", + Classification: encrypt.PublicClassification, + }, + { + Pointer: "/Attributes/Fields/created_time", + Classification: encrypt.PublicClassification, + }, + { + Pointer: "/Attributes/Fields/expiration_time", + Classification: encrypt.PublicClassification, + }, + { + Pointer: "/Attributes/Fields/id", + Classification: encrypt.PublicClassification, + }, + { + Pointer: "/Attributes/Fields/scope", + Classification: encrypt.PublicClassification, + }, + { + Pointer: "/Attributes/Fields/token_type", + Classification: encrypt.PublicClassification, + }, + { + Pointer: "/Attributes/Fields/updated_time", + Classification: encrypt.PublicClassification, + }, + { + Pointer: "/Attributes/Fields/user_id", + Classification: encrypt.PublicClassification, + }, + // secret fields + { + Pointer: "/Attributes/Fields/token", + Classification: encrypt.SecretClassification, + }, + }, nil +} diff --git a/internal/gen/controller/api/services/auth_method_service_taggable_test.go b/internal/gen/controller/api/services/auth_method_service_taggable_test.go new file mode 100644 index 000000000..aee0e8602 --- /dev/null +++ b/internal/gen/controller/api/services/auth_method_service_taggable_test.go @@ -0,0 +1,97 @@ +package services + +import ( + "context" + "encoding/json" + "testing" + "time" + + "github.com/hashicorp/boundary/sdk/wrapper" + "github.com/hashicorp/eventlogger" + "github.com/hashicorp/eventlogger/filters/encrypt" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + structpb "google.golang.org/protobuf/types/known/structpb" +) + +func TestScope_Tags(t *testing.T) { + ctx := context.Background() + now := time.Now() + wrapper := wrapper.TestWrapper(t) + testEncryptingFilter := &encrypt.Filter{ + Wrapper: wrapper, + HmacSalt: []byte("salt"), + HmacInfo: []byte("info"), + } + + tests := []struct { + name string + testEvent *eventlogger.Event + wantEvent *eventlogger.Event + }{ + { + name: "validate-filtering", + testEvent: &eventlogger.Event{ + Type: "test", + CreatedAt: now, + Payload: &AuthenticateResponse{ + Command: "public-command", + Attributes: &structpb.Struct{ + Fields: map[string]*structpb.Value{ + "account_id": structpb.NewStringValue("public-account_id"), + "approximate_last_used_time": structpb.NewStringValue("public-approximate_last_used_time"), + "auth_method_id": structpb.NewStringValue("public-auth_method_id"), + "authorized_actions": structpb.NewStringValue("public-authorized_actions"), + "created_time": structpb.NewStringValue("public-created_time"), + "expiration_time": structpb.NewStringValue("public-expiration_time"), + "id": structpb.NewStringValue("public-id"), + "scope": structpb.NewStringValue("public-scope"), + "token_type": structpb.NewStringValue("public-token_type"), + "updated_time": structpb.NewStringValue("public-updated_time"), + "user_id": structpb.NewStringValue("public-user_id"), + "token": structpb.NewStringValue("secret-token"), + }, + }, + }, + }, + wantEvent: &eventlogger.Event{ + Type: "test", + CreatedAt: now, + Payload: &AuthenticateResponse{ + Command: "public-command", + Attributes: &structpb.Struct{ + Fields: map[string]*structpb.Value{ + "account_id": structpb.NewStringValue("public-account_id"), + "approximate_last_used_time": structpb.NewStringValue("public-approximate_last_used_time"), + "auth_method_id": structpb.NewStringValue("public-auth_method_id"), + "authorized_actions": structpb.NewStringValue("public-authorized_actions"), + "created_time": structpb.NewStringValue("public-created_time"), + "expiration_time": structpb.NewStringValue("public-expiration_time"), + "id": structpb.NewStringValue("public-id"), + "scope": structpb.NewStringValue("public-scope"), + "token_type": structpb.NewStringValue("public-token_type"), + "updated_time": structpb.NewStringValue("public-updated_time"), + "user_id": structpb.NewStringValue("public-user_id"), + "token": structpb.NewStringValue(""), + }, + }, + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert, require := assert.New(t), require.New(t) + got, err := testEncryptingFilter.Process(ctx, tt.testEvent) + require.NoError(err) + require.NotNil(got) + actualJson, err := json.Marshal(got) + require.NoError(err) + t.Log(string(actualJson)) + + wantJson, err := json.Marshal(tt.wantEvent) + require.NoError(err) + assert.JSONEq(string(wantJson), string(actualJson)) + }) + } +} diff --git a/internal/host/static/host_catalog_test.go b/internal/host/static/host_catalog_test.go index f44992bd8..0dba8443e 100644 --- a/internal/host/static/host_catalog_test.go +++ b/internal/host/static/host_catalog_test.go @@ -4,7 +4,6 @@ import ( "context" "testing" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -109,7 +108,7 @@ func TestHostCatalog_New(t *testing.T) { } } -func testCatalog(t *testing.T, conn *gorm.DB, scopeId string) *HostCatalog { +func testCatalog(t *testing.T, conn *db.DB, scopeId string) *HostCatalog { t.Helper() cats := TestCatalogs(t, conn, scopeId, 1) return cats[0] diff --git a/internal/host/static/host_set_test.go b/internal/host/static/host_set_test.go index e0c746805..d52fbd484 100644 --- a/internal/host/static/host_set_test.go +++ b/internal/host/static/host_set_test.go @@ -9,6 +9,7 @@ import ( "github.com/hashicorp/boundary/internal/iam" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "gorm.io/gorm/logger" ) func TestHostSet_New(t *testing.T) { @@ -16,8 +17,7 @@ func TestHostSet_New(t *testing.T) { wrapper := db.TestWrapper(t) _, prj := iam.TestScopes(t, iam.TestRepo(t, conn, wrapper)) cat := testCatalog(t, conn, prj.PublicId) - - conn.LogMode(false) + conn.Logger.LogMode(logger.Silent) type args struct { catalogId string opts []Option diff --git a/internal/host/static/host_test.go b/internal/host/static/host_test.go index c3a437382..4176f506b 100644 --- a/internal/host/static/host_test.go +++ b/internal/host/static/host_test.go @@ -9,6 +9,7 @@ import ( "github.com/hashicorp/boundary/internal/iam" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "gorm.io/gorm/logger" ) func TestHost_New(t *testing.T) { @@ -17,7 +18,7 @@ func TestHost_New(t *testing.T) { _, prj := iam.TestScopes(t, iam.TestRepo(t, conn, wrapper)) cat := testCatalog(t, conn, prj.PublicId) - conn.LogMode(false) + conn.Logger.LogMode(logger.Silent) type args struct { catalogId string opts []Option diff --git a/internal/host/static/query.go b/internal/host/static/query.go index 0aca0a882..3618d4b75 100644 --- a/internal/host/static/query.go +++ b/internal/host/static/query.go @@ -13,7 +13,7 @@ current_hosts (host_id) as ( -- returns the current list select host_id from static_host_set_member - where set_id = $1 + where set_id = @1 -- this trailing space is needed by gorm ), keep_hosts (host_id) as ( -- returns the KEEP list diff --git a/internal/host/static/repository_host_catalog_test.go b/internal/host/static/repository_host_catalog_test.go index 96a999ae2..3a733193f 100644 --- a/internal/host/static/repository_host_catalog_test.go +++ b/internal/host/static/repository_host_catalog_test.go @@ -179,6 +179,7 @@ func TestRepository_UpdateCatalog(t *testing.T) { conn, _ := db.TestSetup(t, "postgres") rw := db.New(conn) wrapper := db.TestWrapper(t) + ctx := context.Background() changeName := func(s string) func(*HostCatalog) *HostCatalog { return func(c *HostCatalog) *HostCatalog { @@ -461,7 +462,9 @@ func TestRepository_UpdateCatalog(t *testing.T) { assert.Equal(tt.wantCount, gotCount, "row count") assert.NotSame(tt.orig, got) assert.Equal(tt.orig.ScopeId, got.ScopeId) - dbassert := dbassert.New(t, conn.DB()) + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(t, err) + dbassert := dbassert.New(t, underlyingDB) if tt.want.Name == "" { dbassert.IsNull(got, "name") return diff --git a/internal/host/static/repository_host_set_member.go b/internal/host/static/repository_host_set_member.go index a7dae0527..dead39500 100644 --- a/internal/host/static/repository_host_set_member.go +++ b/internal/host/static/repository_host_set_member.go @@ -2,6 +2,7 @@ package static import ( "context" + "database/sql" "fmt" "strings" @@ -121,14 +122,14 @@ func getHosts(ctx context.Context, reader db.Reader, setId string, limit int) ([ const whereNoLimit = `public_id in ( select host_id from static_host_set_member - where set_id = $1 + where set_id = ? )` const whereLimit = `public_id in ( select host_id from static_host_set_member - where set_id = $1 - limit $2 + where set_id = ? + limit ? )` params := []interface{}{setId} @@ -328,9 +329,9 @@ type change struct { func (r *Repository) changes(ctx context.Context, setId string, hostIds []string) ([]*change, error) { const op = "static.(Repository).changes" var inClauseSpots []string - // starts at 2 because there is already a $1 in the query + // starts at 2 because there is already a @1 in the query for i := 2; i < len(hostIds)+2; i++ { - inClauseSpots = append(inClauseSpots, fmt.Sprintf("$%d", i)) + inClauseSpots = append(inClauseSpots, fmt.Sprintf("@%d", i)) } inClause := strings.Join(inClauseSpots, ",") if inClause == "" { @@ -339,9 +340,9 @@ func (r *Repository) changes(ctx context.Context, setId string, hostIds []string query := fmt.Sprintf(setChangesQuery, inClause) var params []interface{} - params = append(params, setId) - for _, v := range hostIds { - params = append(params, v) + params = append(params, sql.Named("1", setId)) + for idx, v := range hostIds { + params = append(params, sql.Named(fmt.Sprintf("%d", idx+2), v)) } rows, err := r.reader.Query(ctx, query, params) if err != nil { diff --git a/internal/host/static/repository_host_set_test.go b/internal/host/static/repository_host_set_test.go index 894636d52..05f3eb43a 100644 --- a/internal/host/static/repository_host_set_test.go +++ b/internal/host/static/repository_host_set_test.go @@ -202,6 +202,7 @@ func TestRepository_CreateSet(t *testing.T) { } func TestRepository_UpdateSet(t *testing.T) { + ctx := context.Background() conn, _ := db.TestSetup(t, "postgres") rw := db.New(conn) wrapper := db.TestWrapper(t) @@ -493,7 +494,9 @@ func TestRepository_UpdateSet(t *testing.T) { assert.Equal(tt.wantCount, gotCount, "row count") assert.NotSame(tt.orig, got) assert.Equal(tt.orig.CatalogId, got.CatalogId) - dbassert := dbassert.New(t, conn.DB()) + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(err) + dbassert := dbassert.New(t, underlyingDB) if tt.want.Name == "" { dbassert.IsNull(got, "name") return diff --git a/internal/host/static/repository_host_test.go b/internal/host/static/repository_host_test.go index ff8212b72..aebf419b7 100644 --- a/internal/host/static/repository_host_test.go +++ b/internal/host/static/repository_host_test.go @@ -251,6 +251,7 @@ func TestRepository_CreateHost(t *testing.T) { } func TestRepository_UpdateHost(t *testing.T) { + ctx := context.Background() conn, _ := db.TestSetup(t, "postgres") rw := db.New(conn) wrapper := db.TestWrapper(t) @@ -620,7 +621,9 @@ func TestRepository_UpdateHost(t *testing.T) { assert.Equal(tt.wantCount, gotCount, "row count") assert.NotSame(tt.orig, got) assert.Equal(tt.orig.CatalogId, got.CatalogId) - dbassert := dbassert.New(t, conn.DB()) + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(err) + dbassert := dbassert.New(t, underlyingDB) if tt.want.Name == "" { dbassert.IsNull(got, "name") return diff --git a/internal/host/static/testing.go b/internal/host/static/testing.go index 1cc0c6847..8dbca5444 100644 --- a/internal/host/static/testing.go +++ b/internal/host/static/testing.go @@ -6,14 +6,13 @@ import ( "testing" "github.com/hashicorp/boundary/internal/db" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" ) // TestCatalogs creates count number of static host catalogs to the provided DB // with the provided scope id. If any errors are encountered during the creation of // the host catalog, the test will fail. -func TestCatalogs(t *testing.T, conn *gorm.DB, scopeId string, count int) []*HostCatalog { +func TestCatalogs(t *testing.T, conn *db.DB, scopeId string, count int) []*HostCatalog { t.Helper() assert := assert.New(t) var cats []*HostCatalog @@ -37,7 +36,7 @@ func TestCatalogs(t *testing.T, conn *gorm.DB, scopeId string, count int) []*Hos // TestHosts creates count number of static hosts to the provided DB // with the provided catalog id. The catalog must have been created previously. // If any errors are encountered during the creation of the host, the test will fail. -func TestHosts(t *testing.T, conn *gorm.DB, catalogId string, count int) []*Host { +func TestHosts(t *testing.T, conn *db.DB, catalogId string, count int) []*Host { t.Helper() assert := assert.New(t) var hosts []*Host @@ -63,7 +62,7 @@ func TestHosts(t *testing.T, conn *gorm.DB, catalogId string, count int) []*Host // TestSets creates count number of static host sets in the provided DB // with the provided catalog id. The catalog must have been created // previously. The test will fail if any errors are encountered. -func TestSets(t *testing.T, conn *gorm.DB, catalogId string, count int) []*HostSet { +func TestSets(t *testing.T, conn *db.DB, catalogId string, count int) []*HostSet { t.Helper() assert := assert.New(t) var sets []*HostSet @@ -88,7 +87,7 @@ func TestSets(t *testing.T, conn *gorm.DB, catalogId string, count int) []*HostS // TestSetMembers adds hosts to the specified setId in the provided DB. // The set and hosts must have been created previously and belong to the // same catalog. The test will fail if any errors are encountered. -func TestSetMembers(t *testing.T, conn *gorm.DB, setId string, hosts []*Host) []*HostSetMember { +func TestSetMembers(t *testing.T, conn *db.DB, setId string, hosts []*Host) []*HostSetMember { t.Helper() assert := assert.New(t) diff --git a/internal/iam/account_test.go b/internal/iam/account_test.go index 973acbd51..76cee0902 100644 --- a/internal/iam/account_test.go +++ b/internal/iam/account_test.go @@ -65,6 +65,7 @@ func TestAccount_GetScope(t *testing.T) { func TestAccount_Clone(t *testing.T) { t.Parallel() + ctx := context.Background() conn, _ := db.TestSetup(t, "postgres") wrapper := db.TestWrapper(t) repo := TestRepo(t, conn, wrapper) @@ -83,7 +84,9 @@ func TestAccount_Clone(t *testing.T) { authMethodPublicId := testAuthMethod(t, conn, org.PublicId) acct := testAccount(t, conn, org.PublicId, authMethodPublicId, u.PublicId) acct2 := testAccount(t, conn, org.PublicId, authMethodPublicId, "") - dbassert := dbassert.New(t, conn.DB()) + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(t, err) + dbassert := dbassert.New(t, underlyingDB) dbassert.IsNull(acct2, "IamUserId") cp := acct.Clone() assert.True(!proto.Equal(cp.(*authAccount).Account, acct2.Account)) diff --git a/internal/iam/group_test.go b/internal/iam/group_test.go index 50228616d..d08e9b4c7 100644 --- a/internal/iam/group_test.go +++ b/internal/iam/group_test.go @@ -206,6 +206,7 @@ func Test_GroupCreate(t *testing.T) { func Test_GroupUpdate(t *testing.T) { t.Parallel() + ctx := context.Background() conn, _ := db.TestSetup(t, "postgres") wrapper := db.TestWrapper(t) repo := TestRepo(t, conn, wrapper) @@ -351,7 +352,9 @@ func Test_GroupUpdate(t *testing.T) { require.NoError(err) assert.True(proto.Equal(updateGrp, foundGrp)) if len(tt.args.nullPaths) != 0 { - dbassert := dbassert.New(t, conn.DB()) + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(err) + dbassert := dbassert.New(t, underlyingDB) for _, f := range tt.args.nullPaths { dbassert.IsNull(&foundGrp, f) } diff --git a/internal/iam/immutable_fields_test.go b/internal/iam/immutable_fields_test.go index 2284ae3e3..7bffd66a6 100644 --- a/internal/iam/immutable_fields_test.go +++ b/internal/iam/immutable_fields_test.go @@ -92,11 +92,12 @@ func TestConcreteScope_ImmutableFields(t *testing.T) { update = `update {{rep}} set scope_id = $1 where scope_id = $2;` ) t.Parallel() + ctx := context.Background() conn, _ := db.TestSetup(t, "postgres") wrapper := db.TestWrapper(t) repo := TestRepo(t, conn, wrapper) - db := conn.DB() - + db, err := conn.SqlDB(ctx) + require.NoError(t, err) org, proj := TestScopes(t, repo) tests := []struct { diff --git a/internal/iam/query.go b/internal/iam/query.go index 665c9d907..4a06c6cc7 100644 --- a/internal/iam/query.go +++ b/internal/iam/query.go @@ -12,15 +12,15 @@ const ( on iam_user_acct_info.public_id = auth_account.iam_user_id where iam_user_acct_info.scope_id = auth_account.scope_id and - auth_account.public_id = $1` + auth_account.public_id = ?` // whereValidAuthMethod - determine if an auth method public_id within a scope_id // is valid by returning a count of matching rows. - whereValidAuthMethod = `select count(*) from auth_method where public_id = $1 and scope_id = $2` + whereValidAuthMethod = `select count(*) from auth_method where public_id = $1 and scope_id = $2` // raw query // insertAuthMethod - insert a row directly into auth_method (TODO - this // should be replaced with calls to the auth method repo). - insertAuthMethod = `insert into auth_method (public_id, scope_id) values ($1, $2)` + insertAuthMethod = `insert into auth_method (public_id, scope_id) values (?, ?)` accountChangesQuery = ` with @@ -34,7 +34,7 @@ const ( -- returns the current list select public_id from auth_account - where iam_user_id = $1 + where iam_user_id = ? ), keep_accounts (account_id) as ( -- returns the KEEP list @@ -78,7 +78,7 @@ const ( -- returns the current list select member_id from iam_group_member - where group_id = $1 + where group_id = ? ), keep_members (member_id) as ( -- returns the KEEP list diff --git a/internal/iam/repository_group.go b/internal/iam/repository_group.go index e14b7e3d7..44ca3e1e9 100644 --- a/internal/iam/repository_group.go +++ b/internal/iam/repository_group.go @@ -497,9 +497,9 @@ func (r *Repository) SetGroupMembers(ctx context.Context, groupId string, groupV func groupMemberChanges(ctx context.Context, reader db.Reader, groupId string, userIds []string) ([]interface{}, []interface{}, error) { const op = "iam.groupMemberChanges" var inClauseSpots []string - // starts at 2 because there is already a $1 in the query + // starts at 2 because there is already a ? in the query for i := 2; i < len(userIds)+2; i++ { - inClauseSpots = append(inClauseSpots, fmt.Sprintf("$%d", i)) + inClauseSpots = append(inClauseSpots, "?") } inClause := strings.Join(inClauseSpots, ",") if inClause == "" { @@ -508,10 +508,11 @@ func groupMemberChanges(ctx context.Context, reader db.Reader, groupId string, u query := fmt.Sprintf(grpMemberChangesQuery, inClause) var params []interface{} - params = append(params, groupId) for _, v := range userIds { params = append(params, v) } + params = append(params, groupId) + rows, err := reader.Query(ctx, query, params) if err != nil { return nil, nil, errors.Wrap(ctx, err, op) diff --git a/internal/iam/repository_group_test.go b/internal/iam/repository_group_test.go index 7b5d0dd44..5ea3b4b53 100644 --- a/internal/iam/repository_group_test.go +++ b/internal/iam/repository_group_test.go @@ -173,6 +173,7 @@ func TestRepository_CreateGroup(t *testing.T) { func TestRepository_UpdateGroup(t *testing.T) { t.Parallel() + ctx := context.Background() conn, _ := db.TestSetup(t, "postgres") a := assert.New(t) rw := db.New(conn) @@ -450,7 +451,9 @@ func TestRepository_UpdateGroup(t *testing.T) { foundGrp, _, err := repo.LookupGroup(context.Background(), u.PublicId) require.NoError(err) assert.True(proto.Equal(groupAfterUpdate, foundGrp)) - dbassert := dbassert.New(t, conn.DB()) + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(err) + dbassert := dbassert.New(t, underlyingDB) if tt.args.name == "" { dbassert.IsNull(foundGrp, "name") } diff --git a/internal/iam/repository_role_grant.go b/internal/iam/repository_role_grant.go index 923cce7de..0bb39d82f 100644 --- a/internal/iam/repository_role_grant.go +++ b/internal/iam/repository_role_grant.go @@ -392,8 +392,8 @@ func (r *Repository) GrantsForUser(ctx context.Context, userId string, _ ...Opti } const ( - anonUser = `where public_id in ($1)` - authUser = `where public_id in ('u_anon', 'u_auth', $1)` + anonUser = `where public_id in (?)` + authUser = `where public_id in ('u_anon', 'u_auth', ?)` grantsQuery = ` with users (id) as ( diff --git a/internal/iam/repository_role_test.go b/internal/iam/repository_role_test.go index f2344c270..f1551334c 100644 --- a/internal/iam/repository_role_test.go +++ b/internal/iam/repository_role_test.go @@ -174,6 +174,7 @@ func TestRepository_CreateRole(t *testing.T) { func TestRepository_UpdateRole(t *testing.T) { t.Parallel() + ctx := context.Background() conn, _ := db.TestSetup(t, "postgres") rw := db.New(conn) wrapper := db.TestWrapper(t) @@ -447,7 +448,9 @@ func TestRepository_UpdateRole(t *testing.T) { foundRole, _, _, err := repo.LookupRole(context.Background(), r.PublicId) assert.NoError(err) assert.True(proto.Equal(roleAfterUpdate, foundRole)) - dbassert := dbassert.New(t, conn.DB()) + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(err) + dbassert := dbassert.New(t, underlyingDB) if tt.args.name == "" { assert.Equal(foundRole.Name, "") dbassert.IsNull(foundRole, "name") diff --git a/internal/iam/repository_scope.go b/internal/iam/repository_scope.go index ddfc149f3..b5b89c3bc 100644 --- a/internal/iam/repository_scope.go +++ b/internal/iam/repository_scope.go @@ -394,7 +394,7 @@ func (r *Repository) UpdateScope(ctx context.Context, scope *Scope, version uint map[string]interface{}{ "name": scope.Name, "description": scope.Description, - "primaryAuthMethodId": scope.PrimaryAuthMethodId, + "PrimaryAuthMethodId": scope.PrimaryAuthMethodId, // gorm: it's important that the field start with a capital letter. }, fieldMaskPaths, nil, diff --git a/internal/iam/repository_user.go b/internal/iam/repository_user.go index 6ed4dc2ef..f22e87758 100644 --- a/internal/iam/repository_user.go +++ b/internal/iam/repository_user.go @@ -782,10 +782,12 @@ func dissociateUserFromAccounts(ctx context.Context, repoKms *kms.Kms, reader db // associationChanges returns two slices: accounts to associate and disassociate func associationChanges(ctx context.Context, reader db.Reader, userId string, accountIds []string) ([]string, []string, error) { const op = "iam.associationChanges" + var inClauseSpots []string - // starts at 2 because there is already a $1 in the query + // starts at 2 because there is already a ? in the query for i := 2; i < len(accountIds)+2; i++ { - inClauseSpots = append(inClauseSpots, fmt.Sprintf("$%d", i)) + // inClauseSpots = append(inClauseSpots, fmt.Sprintf("$%d", i)) + inClauseSpots = append(inClauseSpots, "?") } inClause := strings.Join(inClauseSpots, ",") if inClause == "" { @@ -794,10 +796,11 @@ func associationChanges(ctx context.Context, reader db.Reader, userId string, ac query := fmt.Sprintf(accountChangesQuery, inClause) var params []interface{} - params = append(params, userId) for _, v := range accountIds { params = append(params, v) } + params = append(params, userId) + rows, err := reader.Query(ctx, query, params) if err != nil { return nil, nil, errors.Wrap(ctx, err, op) diff --git a/internal/iam/repository_user_iam_pkg_test.go b/internal/iam/repository_user_iam_pkg_test.go index 3abb3c562..690441d2d 100644 --- a/internal/iam/repository_user_iam_pkg_test.go +++ b/internal/iam/repository_user_iam_pkg_test.go @@ -184,6 +184,7 @@ func TestRepository_associateUserWithAccounts(t *testing.T) { func TestRepository_dissociateUserWithAccount(t *testing.T) { t.Parallel() + ctx := context.Background() conn, _ := db.TestSetup(t, "postgres") rw := db.New(conn) wrapper := db.TestWrapper(t) @@ -309,8 +310,10 @@ func TestRepository_dissociateUserWithAccount(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { assert, require := assert.New(t), require.New(t) - dbassert := dbassert.New(t, conn.DB()) - err := dissociateUserFromAccounts(context.Background(), kms, rw, rw, tt.args.Ids.user, tt.args.Ids.accts, tt.args.opt...) + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(err) + dbassert := dbassert.New(t, underlyingDB) + err = dissociateUserFromAccounts(context.Background(), kms, rw, rw, tt.args.Ids.user, tt.args.Ids.accts, tt.args.opt...) if tt.wantErr { require.Error(err) assert.Truef(errors.Match(errors.T(tt.wantErrCode), err), "unexpected error %s", err) diff --git a/internal/iam/repository_user_test.go b/internal/iam/repository_user_test.go index 052610fc8..88d8c5240 100644 --- a/internal/iam/repository_user_test.go +++ b/internal/iam/repository_user_test.go @@ -198,6 +198,7 @@ func TestRepository_LookupUser_WithDifferentPrimaryAuthMethods(t *testing.T) { func TestRepository_UpdateUser(t *testing.T) { t.Parallel() + ctx := context.Background() conn, _ := db.TestSetup(t, "postgres") rw := db.New(conn) wrapper := db.TestWrapper(t) @@ -475,8 +476,9 @@ func TestRepository_UpdateUser(t *testing.T) { assert.True(proto.Equal(userAfterUpdate, foundUser)) sort.Strings(foundAccountIds) assert.Equal(accountIds, foundAccountIds) - - dbassert := dbassert.New(t, conn.DB()) + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(err) + dbassert := dbassert.New(t, underlyingDB) if tt.args.name == "" { dbassert.IsNull(foundUser, "name") } @@ -709,6 +711,7 @@ func TestRepository_ListUsers_Multiple_Scopes(t *testing.T) { func TestRepository_LookupUserWithLogin(t *testing.T) { t.Parallel() + ctx := context.Background() conn, _ := db.TestSetup(t, "postgres") rw := db.New(conn) wrapper := db.TestWrapper(t) @@ -846,8 +849,9 @@ func TestRepository_LookupUserWithLogin(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { assert, require := assert.New(t), require.New(t) - dbassert := dbassert.New(t, conn.DB()) - + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(err) + dbassert := dbassert.New(t, underlyingDB) got, err := repo.LookupUserWithLogin(context.Background(), tt.args.withAccountId, tt.args.opt...) if tt.wantErr { require.Error(err) diff --git a/internal/iam/role_grant_test.go b/internal/iam/role_grant_test.go index ca8bbddc2..7e24eee99 100644 --- a/internal/iam/role_grant_test.go +++ b/internal/iam/role_grant_test.go @@ -2,7 +2,6 @@ package iam import ( "context" - "strings" "testing" "github.com/hashicorp/boundary/internal/db" @@ -162,7 +161,7 @@ func TestRoleGrant_Delete(t *testing.T) { grant: "id=*;type=*;actions=*", }, wantErr: true, - wantsErrStr: "primary key is not set", + wantsErrStr: "is not set", }, { name: "nil-grant", @@ -170,9 +169,8 @@ func TestRoleGrant_Delete(t *testing.T) { roleId: projRole.PublicId, grant: "", }, - // Note: Gorm's primary key checking is only for what it considers - // the main primary key field, hence this doesn't error as the above - // case does + wantErr: true, + wantsErrStr: "is not set", }, { name: "invalid", @@ -211,7 +209,7 @@ func TestRoleGrant_Delete(t *testing.T) { deleted, err := rw.Delete(context.Background(), rg) if tt.wantErr { require.Error(err) - assert.True(strings.Contains(err.Error(), tt.wantsErrStr)) + assert.Contains(err.Error(), tt.wantsErrStr) return } require.NoError(err) diff --git a/internal/iam/role_test.go b/internal/iam/role_test.go index 0c6cbca94..749f9da18 100644 --- a/internal/iam/role_test.go +++ b/internal/iam/role_test.go @@ -206,6 +206,7 @@ func Test_RoleCreate(t *testing.T) { func Test_RoleUpdate(t *testing.T) { t.Parallel() + ctx := context.Background() conn, _ := db.TestSetup(t, "postgres") wrapper := db.TestWrapper(t) repo := TestRepo(t, conn, wrapper) @@ -440,7 +441,9 @@ func Test_RoleUpdate(t *testing.T) { } assert.True(proto.Equal(updateRole, foundRole)) if len(tt.args.nullPaths) != 0 { - dbassert := dbassert.New(t, conn.DB()) + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(err) + dbassert := dbassert.New(t, underlyingDB) for _, f := range tt.args.nullPaths { dbassert.IsNull(&foundRole, f) } diff --git a/internal/iam/store/user.pb.go b/internal/iam/store/user.pb.go index 62c31dae8..16370e7e0 100644 --- a/internal/iam/store/user.pb.go +++ b/internal/iam/store/user.pb.go @@ -51,20 +51,20 @@ type User struct { Version uint32 `protobuf:"varint,70,opt,name=version,proto3" json:"version,omitempty" gorm:"default:null"` // Output only. login_name is a string that maps to the user's account "login // name" from the scope's primary auth method - // @inject_tag: `gorm:"-"` - LoginName string `protobuf:"bytes,90,opt,name=login_name,proto3" json:"login_name,omitempty" gorm:"-"` + // @inject_tag: `gorm:"->"` + LoginName string `protobuf:"bytes,90,opt,name=login_name,proto3" json:"login_name,omitempty" gorm:"->"` // Output only. full_name is a string that maps to the user's account name // from the scope's primary auth method - // @inject_tag: `gorm:"-"` - FullName string `protobuf:"bytes,100,opt,name=full_name,proto3" json:"full_name,omitempty" gorm:"-"` + // @inject_tag: `gorm:"->"` + FullName string `protobuf:"bytes,100,opt,name=full_name,proto3" json:"full_name,omitempty" gorm:"->"` // Output only. email is a string that maps to the user's account email from // the scope's primary auth method - // @inject_tag: `gorm:"-"` - Email string `protobuf:"bytes,110,opt,name=email,proto3" json:"email,omitempty" gorm:"-"` + // @inject_tag: `gorm:"->"` + Email string `protobuf:"bytes,110,opt,name=email,proto3" json:"email,omitempty" gorm:"->"` // Output only. primary_account_id is a string that maps to the user's account // public_id from the scope's primary auth method - // @inject_tag: `gorm:"-"` - PrimaryAccountId string `protobuf:"bytes,120,opt,name=primary_account_id,proto3" json:"primary_account_id,omitempty" gorm:"-"` + // @inject_tag: `gorm:"->"` + PrimaryAccountId string `protobuf:"bytes,120,opt,name=primary_account_id,proto3" json:"primary_account_id,omitempty" gorm:"->"` } func (x *User) Reset() { diff --git a/internal/iam/testing.go b/internal/iam/testing.go index 68babe53d..3e693a9a5 100644 --- a/internal/iam/testing.go +++ b/internal/iam/testing.go @@ -12,13 +12,12 @@ import ( "github.com/hashicorp/boundary/internal/types/scope" wrapping "github.com/hashicorp/go-kms-wrapping" "github.com/hashicorp/go-uuid" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/require" ) // TestRepo creates a repo that can be used for various purposes. Crucially, it // ensures that the global scope contains a valid root key. -func TestRepo(t *testing.T, conn *gorm.DB, rootWrapper wrapping.Wrapper, opt ...Option) *Repository { +func TestRepo(t *testing.T, conn *db.DB, rootWrapper wrapping.Wrapper, opt ...Option) *Repository { require := require.New(t) rw := db.New(conn) kmsCache := kms.TestKms(t, conn, rootWrapper) @@ -156,7 +155,7 @@ func TestUser(t *testing.T, repo *Repository, scopeId string, opt ...Option) *Us } // TestRole creates a role suitable for testing. -func TestRole(t *testing.T, conn *gorm.DB, scopeId string, opt ...Option) *Role { +func TestRole(t *testing.T, conn *db.DB, scopeId string, opt ...Option) *Role { t.Helper() require := require.New(t) rw := db.New(conn) @@ -176,7 +175,7 @@ func TestRole(t *testing.T, conn *gorm.DB, scopeId string, opt ...Option) *Role return role } -func TestRoleGrant(t *testing.T, conn *gorm.DB, roleId, grant string, opt ...Option) *RoleGrant { +func TestRoleGrant(t *testing.T, conn *db.DB, roleId, grant string, opt ...Option) *RoleGrant { t.Helper() require := require.New(t) rw := db.New(conn) @@ -189,7 +188,7 @@ func TestRoleGrant(t *testing.T, conn *gorm.DB, roleId, grant string, opt ...Opt } // TestGroup creates a group suitable for testing. -func TestGroup(t *testing.T, conn *gorm.DB, scopeId string, opt ...Option) *Group { +func TestGroup(t *testing.T, conn *db.DB, scopeId string, opt ...Option) *Group { t.Helper() require := require.New(t) rw := db.New(conn) @@ -205,7 +204,7 @@ func TestGroup(t *testing.T, conn *gorm.DB, scopeId string, opt ...Option) *Grou return grp } -func TestGroupMember(t *testing.T, conn *gorm.DB, groupId, userId string, opt ...Option) *GroupMemberUser { +func TestGroupMember(t *testing.T, conn *db.DB, groupId, userId string, opt ...Option) *GroupMemberUser { t.Helper() require := require.New(t) rw := db.New(conn) @@ -218,7 +217,7 @@ func TestGroupMember(t *testing.T, conn *gorm.DB, groupId, userId string, opt .. return gm } -func TestUserRole(t *testing.T, conn *gorm.DB, roleId, userId string, opt ...Option) *UserRole { +func TestUserRole(t *testing.T, conn *db.DB, roleId, userId string, opt ...Option) *UserRole { t.Helper() require := require.New(t) rw := db.New(conn) @@ -230,7 +229,7 @@ func TestUserRole(t *testing.T, conn *gorm.DB, roleId, userId string, opt ...Opt return r } -func TestGroupRole(t *testing.T, conn *gorm.DB, roleId, grpId string, opt ...Option) *GroupRole { +func TestGroupRole(t *testing.T, conn *db.DB, roleId, grpId string, opt ...Option) *GroupRole { t.Helper() require := require.New(t) rw := db.New(conn) @@ -242,7 +241,7 @@ func TestGroupRole(t *testing.T, conn *gorm.DB, roleId, grpId string, opt ...Opt return r } -func TestManagedGroupRole(t *testing.T, conn *gorm.DB, roleId, managedGrpId string, opt ...Option) *ManagedGroupRole { +func TestManagedGroupRole(t *testing.T, conn *db.DB, roleId, managedGrpId string, opt ...Option) *ManagedGroupRole { t.Helper() require := require.New(t) rw := db.New(conn) @@ -257,11 +256,13 @@ func TestManagedGroupRole(t *testing.T, conn *gorm.DB, roleId, managedGrpId stri // testAccount is a temporary test function. TODO - replace with an auth // subsystem testAccount function. If userId is zero value, then an auth // account will be created with a null IamUserId -func testAccount(t *testing.T, conn *gorm.DB, scopeId, authMethodId, userId string) *authAccount { +func testAccount(t *testing.T, conn *db.DB, scopeId, authMethodId, userId string) *authAccount { const ( accountPrefix = "aa_" ) t.Helper() + ctx := context.Background() + rw := db.New(conn) require := require.New(t) require.NotNil(conn) @@ -277,7 +278,9 @@ func testAccount(t *testing.T, conn *gorm.DB, scopeId, authMethodId, userId stri } var count int - err := conn.DB().QueryRow(whereValidAuthMethod, authMethodId, scopeId).Scan(&count) + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(err) + err = underlyingDB.QueryRow(whereValidAuthMethod, authMethodId, scopeId).Scan(&count) require.NoError(err) require.Equal(1, count) @@ -297,7 +300,9 @@ func testAccount(t *testing.T, conn *gorm.DB, scopeId, authMethodId, userId stri require.NotEmpty(acct.PublicId) if userId == "" { - dbassert := dbassert.New(t, conn.DB()) + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(err) + dbassert := dbassert.New(t, underlyingDB) dbassert.IsNull(acct, "IamUserId") } return acct @@ -305,7 +310,7 @@ func testAccount(t *testing.T, conn *gorm.DB, scopeId, authMethodId, userId stri // testAuthMethod is a temporary test function. TODO - replace with an auth // subsystem testAuthMethod function. -func testAuthMethod(t *testing.T, conn *gorm.DB, scopeId string) string { +func testAuthMethod(t *testing.T, conn *db.DB, scopeId string) string { const ( authMethodPrefix = "am_" ) @@ -316,7 +321,8 @@ func testAuthMethod(t *testing.T, conn *gorm.DB, scopeId string) string { id, err := db.NewPublicId(authMethodPrefix) require.NoError(err) - _, err = conn.DB().Exec(insertAuthMethod, id, scopeId) + rw := db.New(conn) + _, err = rw.Exec(context.Background(), insertAuthMethod, []interface{}{id, scopeId}) require.NoError(err) return id } diff --git a/internal/iam/testing_test.go b/internal/iam/testing_test.go index 5d6ca27d8..57a771164 100644 --- a/internal/iam/testing_test.go +++ b/internal/iam/testing_test.go @@ -216,3 +216,14 @@ func Test_TestGroupMember(t *testing.T) { require.Equal(pg.PublicId, gm.GroupId) require.Equal(u.PublicId, gm.MemberId) } + +func Test_testAccount(t *testing.T) { + require := require.New(t) + conn, _ := db.TestSetup(t, "postgres") + wrapper := db.TestWrapper(t) + repo := TestRepo(t, conn, wrapper) + org, _ := TestScopes(t, repo) + authMethodId := testAuthMethod(t, conn, org.PublicId) + acct := testAccount(t, conn, org.PublicId, authMethodId, "") + require.Equal(acct.ScopeId, org.PublicId) +} diff --git a/internal/kms/testing.go b/internal/kms/testing.go index f949622d6..37ec6da7e 100644 --- a/internal/kms/testing.go +++ b/internal/kms/testing.go @@ -7,11 +7,10 @@ import ( "github.com/hashicorp/boundary/internal/db" wrapping "github.com/hashicorp/go-kms-wrapping" "github.com/hashicorp/go-kms-wrapping/wrappers/aead" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/require" ) -func TestRootKey(t *testing.T, conn *gorm.DB, scopeId string) *RootKey { +func TestRootKey(t *testing.T, conn *db.DB, scopeId string) *RootKey { t.Helper() require := require.New(t) rw := db.New(conn) @@ -26,7 +25,7 @@ func TestRootKey(t *testing.T, conn *gorm.DB, scopeId string) *RootKey { return k } -func TestRootKeyVersion(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper, rootId string) (kv *RootKeyVersion, kvWrapper wrapping.Wrapper) { +func TestRootKeyVersion(t *testing.T, conn *db.DB, wrapper wrapping.Wrapper, rootId string) (kv *RootKeyVersion, kvWrapper wrapping.Wrapper) { t.Helper() require := require.New(t) rw := db.New(conn) @@ -48,7 +47,7 @@ func TestRootKeyVersion(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper, r return k, rootKeyVersionWrapper } -func TestKms(t *testing.T, conn *gorm.DB, rootWrapper wrapping.Wrapper) *Kms { +func TestKms(t *testing.T, conn *db.DB, rootWrapper wrapping.Wrapper) *Kms { t.Helper() require := require.New(t) rw := db.New(conn) @@ -61,7 +60,7 @@ func TestKms(t *testing.T, conn *gorm.DB, rootWrapper wrapping.Wrapper) *Kms { return kms } -func TestDatabaseKey(t *testing.T, conn *gorm.DB, rootKeyId string) *DatabaseKey { +func TestDatabaseKey(t *testing.T, conn *db.DB, rootKeyId string) *DatabaseKey { t.Helper() require := require.New(t) rw := db.New(conn) @@ -77,7 +76,7 @@ func TestDatabaseKey(t *testing.T, conn *gorm.DB, rootKeyId string) *DatabaseKey return k } -func TestDatabaseKeyVersion(t *testing.T, conn *gorm.DB, rootKeyVersionWrapper wrapping.Wrapper, databaseKeyId string, key []byte) *DatabaseKeyVersion { +func TestDatabaseKeyVersion(t *testing.T, conn *db.DB, rootKeyVersionWrapper wrapping.Wrapper, databaseKeyId string, key []byte) *DatabaseKeyVersion { t.Helper() require := require.New(t) rw := db.New(conn) @@ -95,7 +94,7 @@ func TestDatabaseKeyVersion(t *testing.T, conn *gorm.DB, rootKeyVersionWrapper w return k } -func TestOplogKey(t *testing.T, conn *gorm.DB, rootKeyId string) *OplogKey { +func TestOplogKey(t *testing.T, conn *db.DB, rootKeyId string) *OplogKey { t.Helper() require := require.New(t) rw := db.New(conn) @@ -111,7 +110,7 @@ func TestOplogKey(t *testing.T, conn *gorm.DB, rootKeyId string) *OplogKey { return k } -func TestOplogKeyVersion(t *testing.T, conn *gorm.DB, rootKeyVersionWrapper wrapping.Wrapper, oplogKeyId string, key []byte) *OplogKeyVersion { +func TestOplogKeyVersion(t *testing.T, conn *db.DB, rootKeyVersionWrapper wrapping.Wrapper, oplogKeyId string, key []byte) *OplogKeyVersion { t.Helper() require := require.New(t) rw := db.New(conn) @@ -129,7 +128,7 @@ func TestOplogKeyVersion(t *testing.T, conn *gorm.DB, rootKeyVersionWrapper wrap return k } -func TestTokenKey(t *testing.T, conn *gorm.DB, rootKeyId string) *TokenKey { +func TestTokenKey(t *testing.T, conn *db.DB, rootKeyId string) *TokenKey { t.Helper() require := require.New(t) rw := db.New(conn) @@ -145,7 +144,7 @@ func TestTokenKey(t *testing.T, conn *gorm.DB, rootKeyId string) *TokenKey { return k } -func TestTokenKeyVersion(t *testing.T, conn *gorm.DB, rootKeyVersionWrapper wrapping.Wrapper, tokenKeyId string, key []byte) *TokenKeyVersion { +func TestTokenKeyVersion(t *testing.T, conn *db.DB, rootKeyVersionWrapper wrapping.Wrapper, tokenKeyId string, key []byte) *TokenKeyVersion { t.Helper() require := require.New(t) rw := db.New(conn) @@ -163,7 +162,7 @@ func TestTokenKeyVersion(t *testing.T, conn *gorm.DB, rootKeyVersionWrapper wrap return k } -func TestSessionKey(t *testing.T, conn *gorm.DB, rootKeyId string) *SessionKey { +func TestSessionKey(t *testing.T, conn *db.DB, rootKeyId string) *SessionKey { t.Helper() require := require.New(t) rw := db.New(conn) @@ -179,7 +178,7 @@ func TestSessionKey(t *testing.T, conn *gorm.DB, rootKeyId string) *SessionKey { return k } -func TestSessionKeyVersion(t *testing.T, conn *gorm.DB, rootKeyVersionWrapper wrapping.Wrapper, sessionKeyId string, key []byte) *SessionKeyVersion { +func TestSessionKeyVersion(t *testing.T, conn *db.DB, rootKeyVersionWrapper wrapping.Wrapper, sessionKeyId string, key []byte) *SessionKeyVersion { t.Helper() require := require.New(t) rw := db.New(conn) @@ -197,7 +196,7 @@ func TestSessionKeyVersion(t *testing.T, conn *gorm.DB, rootKeyVersionWrapper wr return k } -func TestOidcKey(t *testing.T, conn *gorm.DB, rootKeyId string) *OidcKey { +func TestOidcKey(t *testing.T, conn *db.DB, rootKeyId string) *OidcKey { t.Helper() require := require.New(t) rw := db.New(conn) @@ -213,7 +212,7 @@ func TestOidcKey(t *testing.T, conn *gorm.DB, rootKeyId string) *OidcKey { return k } -func TestOidcKeyVersion(t *testing.T, conn *gorm.DB, rootKeyVersionWrapper wrapping.Wrapper, oidcKeyId string, key []byte) *OidcKeyVersion { +func TestOidcKeyVersion(t *testing.T, conn *db.DB, rootKeyVersionWrapper wrapping.Wrapper, oidcKeyId string, key []byte) *OidcKeyVersion { t.Helper() require := require.New(t) rw := db.New(conn) diff --git a/internal/observability/event/context_test.go b/internal/observability/event/context_test.go index 66f04577d..f8a1c1555 100644 --- a/internal/observability/event/context_test.go +++ b/internal/observability/event/context_test.go @@ -30,16 +30,15 @@ const ( ) type testAudit struct { - Id string `json:"id"` // std audit/boundary field - Version string `json:"version"` // std audit/boundary field - Type string `json:"type"` // std audit field - Timestamp time.Time `json:"timestamp"` // std audit field - RequestInfo *event.RequestInfo `json:"request_info,omitempty"` // boundary field - Auth *event.Auth `json:"auth,omitempty"` // std audit field - Request *event.Request `json:"request,omitempty"` // std audit field - Response *event.Response `json:"response,omitempty"` // std audit field - SerializedHMAC string `json:"serialized_hmac"` // boundary field - Flush bool `json:"-"` + Id string `json:"id"` // std audit/boundary field + Version string `json:"version"` // std audit/boundary field + Type string `json:"type"` // std audit field + Timestamp time.Time `json:"timestamp"` // std audit field + RequestInfo *event.RequestInfo `json:"request_info,omitempty"` // boundary field + Auth *event.Auth `json:"auth,omitempty"` // std audit field + Request *event.Request `json:"request,omitempty"` // std audit field + Response *event.Response `json:"response,omitempty"` // std audit field + Flush bool `json:"-"` } func Test_NewRequestInfoContext(t *testing.T) { @@ -922,13 +921,12 @@ func Test_WriteAudit(t *testing.T) { Time: gotAudit.Time, Type: "audit", Data: map[string]interface{}{ - "auth": tt.wantAudit.Auth, - "id": gotAudit.Data.(map[string]interface{})["id"], - "timestamp": now, - "request": tt.wantAudit.Request, - "serialized_hmac": "", - "type": apiRequest, - "version": testAuditVersion, + "auth": tt.wantAudit.Auth, + "id": gotAudit.Data.(map[string]interface{})["id"], + "timestamp": now, + "request": tt.wantAudit.Request, + "type": apiRequest, + "version": testAuditVersion, }, } if tt.wantAudit.Id != "" { diff --git a/internal/observability/event/event_audit.go b/internal/observability/event/event_audit.go index 1175bb657..48e6d38de 100644 --- a/internal/observability/event/event_audit.go +++ b/internal/observability/event/event_audit.go @@ -19,16 +19,15 @@ const ( // audit defines the data of audit events type audit struct { - Id string `json:"id"` // std audit/boundary field - Version string `json:"version"` // std audit/boundary field - Type string `json:"type"` // std audit field - Timestamp time.Time `json:"timestamp"` // std audit field - RequestInfo *RequestInfo `json:"request_info,omitempty"` // boundary field - Auth *Auth `json:"auth,omitempty"` // std audit field - Request *Request `json:"request,omitempty"` // std audit field - Response *Response `json:"response,omitempty"` // std audit field - SerializedHMAC string `json:"serialized_hmac"` // boundary field - Flush bool `json:"-"` + Id string `json:"id"` // std audit/boundary field + Version string `json:"version"` // std audit/boundary field + Type string `json:"type"` // std audit field + Timestamp time.Time `json:"timestamp"` // std audit field + RequestInfo *RequestInfo `json:"request_info,omitempty"` // boundary field + Auth *Auth `json:"auth,omitempty"` // std audit field + Request *Request `json:"request,omitempty"` // std audit field + Response *Response `json:"response,omitempty"` // std audit field + Flush bool `json:"-"` } func newAudit(fromOperation Op, opt ...Option) (*audit, error) { @@ -133,7 +132,15 @@ func (a *audit) ComposeFrom(events []*eventlogger.Event) (eventlogger.EventType, payload.Request = gated.Request } if gated.Response != nil { - payload.Response = gated.Response + if payload.Response == nil { + payload.Response = &Response{} + } + if gated.Response.StatusCode != 0 { + payload.Response.StatusCode = gated.Response.StatusCode + } + if gated.Response.Details != nil { + payload.Response.Details = gated.Response.Details + } } if !gated.Timestamp.IsZero() { payload.Timestamp = gated.Timestamp diff --git a/internal/oplog/oplog.go b/internal/oplog/oplog.go index 2236d5820..aa6c0a2a1 100644 --- a/internal/oplog/oplog.go +++ b/internal/oplog/oplog.go @@ -10,7 +10,6 @@ import ( "github.com/hashicorp/boundary/internal/oplog/store" wrapping "github.com/hashicorp/go-kms-wrapping" "github.com/hashicorp/go-kms-wrapping/structwrapping" - _ "github.com/lib/pq" "google.golang.org/protobuf/proto" ) @@ -29,8 +28,8 @@ type Message struct { // Entry represents an oplog entry type Entry struct { *store.Entry - Cipherer wrapping.Wrapper `sql:"-"` - Ticketer Ticketer `sql:"-"` + Cipherer wrapping.Wrapper `gorm:"-"` + Ticketer Ticketer `gorm:"-"` } // Metadata provides meta information about the Entry diff --git a/internal/oplog/oplog_test.go b/internal/oplog/oplog_test.go index 0c28c00fc..c7fc4c8a1 100644 --- a/internal/oplog/oplog_test.go +++ b/internal/oplog/oplog_test.go @@ -8,9 +8,10 @@ import ( dbassert "github.com/hashicorp/dbassert/gorm" "github.com/hashicorp/boundary/internal/oplog/oplog_test" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "gorm.io/driver/postgres" + "gorm.io/gorm" _ "github.com/golang-migrate/migrate/v4/database/postgres" _ "github.com/golang-migrate/migrate/v4/source/file" @@ -22,12 +23,38 @@ func setup(t *testing.T) (func() error, *gorm.DB) { require := require.New(t) cleanup, url, err := testInitDbInDocker(t) require.NoError(err) - db, err := gorm.Open("postgres", url) + db, err := testOpen("postgres", url) + require.NoError(err) + oplog_test.Init(db) + t.Cleanup(func() { + sqlDB, err := db.DB() + assert.NoError(t, err) + assert.NoError(t, sqlDB.Close(), "Got error closing gorm db.") + }) require.NoError(err) oplog_test.Init(db) return cleanup, db } +func testOpen(dbType string, connectionUrl string) (*gorm.DB, error) { + var dialect gorm.Dialector + switch dbType { + case "postgres": + dialect = postgres.New(postgres.Config{ + DSN: connectionUrl}, + ) + default: + return nil, fmt.Errorf("unable to open %s database type", dbType) + } + db, err := gorm.Open(dialect, &gorm.Config{ + ConvertNullToZeroValues: true, + }) + if err != nil { + return nil, fmt.Errorf("unable to open database: %w", err) + } + return db, nil +} + // Test_BasicOplog provides some basic unit tests for oplogs func Test_BasicOplog(t *testing.T) { cleanup, db := setup(t) @@ -228,6 +255,7 @@ func Test_UnmarshalData(t *testing.T) { // now let's us optimistic locking via a ticketing system for a serialized oplog ticketer, err := NewGormTicketer(db, WithAggregateNames(true)) + require.NoError(t, err) types, err := NewTypeCatalog(Type{new(oplog_test.TestUser), "user"}) require.NoError(t, err) @@ -390,7 +418,9 @@ func Test_Replay(t *testing.T) { } err = tx.Model(&userUpdate).Updates(map[string]interface{}{"PhoneNumber": "867-5309", "Name": gorm.Expr("NULL")}).Error require.NoError(err) - dbassert := dbassert.New(t, tx.DB(), "postgres") + underlyingDB, err := tx.DB() + require.NoError(err) + dbassert := dbassert.New(t, underlyingDB, tx.Dialector.Name()) dbassert.IsNull(&userUpdate, "Name") foundCreateUser := testFindUser(t, tx, userCreate.Id) diff --git a/internal/oplog/oplog_test/db.go b/internal/oplog/oplog_test/db.go index 7fad2f8e2..f3a6ea4b6 100644 --- a/internal/oplog/oplog_test/db.go +++ b/internal/oplog/oplog_test/db.go @@ -1,7 +1,7 @@ // Package oplog_test provides some gorm helper funcs for testing oplog database integrations package oplog_test -import "github.com/jinzhu/gorm" +import "gorm.io/gorm" const ( defaultTestUserTableName = "oplog_test_user" @@ -18,9 +18,10 @@ func Init(db *gorm.DB) { // Reinit will use gorm to drop then init tables for test models func Reinit(db *gorm.DB) { - db.DropTableIfExists(&TestUser{}) - db.DropTableIfExists(&TestCar{}) - db.DropTableIfExists(&TestRental{}) + // Migrator.DropTable is actually "drop table if exists" + _ = db.Migrator().DropTable(&TestUser{}) + _ = db.Migrator().DropTable(&TestCar{}) + _ = db.Migrator().DropTable(&TestRental{}) Init(db) } diff --git a/internal/oplog/testing.go b/internal/oplog/testing.go index 5476b6b91..dac8f502c 100644 --- a/internal/oplog/testing.go +++ b/internal/oplog/testing.go @@ -3,25 +3,27 @@ package oplog import ( "context" "crypto/rand" - "database/sql" "testing" + "github.com/hashicorp/boundary/internal/db/common" "github.com/hashicorp/boundary/internal/db/schema" "github.com/hashicorp/boundary/internal/oplog/oplog_test" "github.com/hashicorp/boundary/testing/dbtest" wrapping "github.com/hashicorp/go-kms-wrapping" "github.com/hashicorp/go-kms-wrapping/wrappers/aead" "github.com/hashicorp/go-uuid" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "gorm.io/gorm" ) func testCleanup(t *testing.T, cleanupFunc func() error, db *gorm.DB) { t.Helper() err := cleanupFunc() assert.NoError(t, err) - err = db.Close() + sqlDB, err := db.DB() + assert.NoError(t, err) + err = sqlDB.Close() assert.NoError(t, err) } @@ -84,7 +86,7 @@ func testInitStore(t *testing.T, cleanup func() error, url string) { ctx := context.Background() dialect := "postgres" - d, err := sql.Open(dialect, url) + d, err := common.SqlOpen(dialect, url) require.NoError(t, err) sm, err := schema.NewManager(ctx, dialect, d) require.NoError(t, err) diff --git a/internal/oplog/testing_test.go b/internal/oplog/testing_test.go index b5d1030a5..93436e7c1 100644 --- a/internal/oplog/testing_test.go +++ b/internal/oplog/testing_test.go @@ -1,9 +1,9 @@ package oplog import ( - "database/sql" "testing" + "github.com/hashicorp/boundary/internal/db/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -77,7 +77,7 @@ func Test_testInitStore(t *testing.T) { const query = ` select count(*) from information_schema."tables" t where table_name = 'db_test_user'; ` - db, err := sql.Open("postgres", url) + db, err := common.SqlOpen("postgres", url) require.NoError(err) var cnt int diff --git a/internal/oplog/ticketer.go b/internal/oplog/ticketer.go index 3fb19cb6a..744096a91 100644 --- a/internal/oplog/ticketer.go +++ b/internal/oplog/ticketer.go @@ -3,7 +3,7 @@ package oplog import ( "github.com/hashicorp/boundary/internal/errors" "github.com/hashicorp/boundary/internal/oplog/store" - "github.com/jinzhu/gorm" + "gorm.io/gorm" ) const DefaultAggregateName = "global" @@ -53,7 +53,7 @@ func (ticketer *GormTicketer) GetTicket(aggregateName string) (*store.Ticket, er } ticket := store.Ticket{} if err := ticketer.tx.First(&ticket, store.Ticket{Name: name}).Error; err != nil { - if gorm.IsRecordNotFoundError(err) { + if errors.Is(err, gorm.ErrRecordNotFound) { return nil, errors.NewDeprecated(errors.TicketNotFound, op, "ticket not found") } return nil, errors.WrapDeprecated(err, op, errors.WithMsg("error retrieving ticket from storage")) diff --git a/internal/oplog/writer.go b/internal/oplog/writer.go index 4fbb5d00a..d175ce7f6 100644 --- a/internal/oplog/writer.go +++ b/internal/oplog/writer.go @@ -4,8 +4,10 @@ import ( "fmt" "github.com/hashicorp/boundary/internal/db/common" + "github.com/hashicorp/boundary/internal/errors" - "github.com/jinzhu/gorm" + "gorm.io/gorm" + "gorm.io/gorm/schema" ) // Writer interface for Entries @@ -47,8 +49,15 @@ func (w *GormWriter) Create(i interface{}) error { if i == nil { return errors.NewDeprecated(errors.InvalidParameter, op, "nil interface") } - if err := w.Tx.Create(i).Error; err != nil { - return errors.WrapDeprecated(err, op) + + if tabler, ok := i.(schema.Tabler); ok { + if err := w.Tx.Table(tabler.TableName()).Create(i).Error; err != nil { + return errors.WrapDeprecated(err, op) + } + } else { + if err := w.Tx.Create(i).Error; err != nil { + return errors.WrapDeprecated(err, op) + } } return nil } @@ -73,8 +82,15 @@ func (w *GormWriter) Update(i interface{}, fieldMaskPaths, setToNullPaths []stri if err != nil { return errors.WrapDeprecated(err, op, errors.WithMsg("unable to build update fields")) } - if err := w.Tx.Model(i).Updates(updateFields).Error; err != nil { - return errors.WrapDeprecated(err, op) + + if tabler, ok := i.(schema.Tabler); ok { + if err := w.Tx.Table(tabler.TableName()).Model(i).Updates(updateFields).Error; err != nil { + return errors.WrapDeprecated(err, op) + } + } else { + if err := w.Tx.Model(i).Updates(updateFields).Error; err != nil { + return errors.WrapDeprecated(err, op) + } } return nil } @@ -88,8 +104,14 @@ func (w *GormWriter) Delete(i interface{}) error { if i == nil { return errors.NewDeprecated(errors.InvalidParameter, op, "nil interface") } - if err := w.Tx.Delete(i).Error; err != nil { - return errors.WrapDeprecated(err, op) + if tabler, ok := i.(schema.Tabler); ok { + if err := w.Tx.Table(tabler.TableName()).Delete(i).Error; err != nil { + return errors.WrapDeprecated(err, op) + } + } else { + if err := w.Tx.Delete(i).Error; err != nil { + return errors.WrapDeprecated(err, op) + } } return nil } @@ -99,7 +121,7 @@ func (w *GormWriter) hasTable(tableName string) bool { if tableName == "" { return false } - return w.Tx.Dialect().HasTable(tableName) + return w.Tx.Migrator().HasTable(tableName) } // CreateTableLike will create a newTableName like the model's table @@ -112,10 +134,11 @@ func (w *GormWriter) createTableLike(existingTableName string, newTableName stri if newTableName == "" { return errors.NewDeprecated(errors.InvalidParameter, op, "missing new table name") } - existingTableName = w.Tx.Dialect().Quote(existingTableName) - newTableName = w.Tx.Dialect().Quote(newTableName) + + existingTableName = w.Tx.Statement.Quote(existingTableName) + newTableName = w.Tx.Statement.Quote(newTableName) var sql string - switch w.Tx.Dialect().GetName() { + switch w.Tx.Dialector.Name() { case "postgres": sql = fmt.Sprintf( `CREATE TABLE %s ( LIKE %s INCLUDING DEFAULTS INCLUDING CONSTRAINTS INCLUDING INDEXES );`, @@ -143,7 +166,8 @@ func (w *GormWriter) dropTableIfExists(tableName string) error { if tableName == "" { return errors.NewDeprecated(errors.InvalidParameter, op, "missing table name") } - err := w.Tx.DropTableIfExists(tableName).Error + // Migrator.DropTable uses an "if exists" clause + err := w.Tx.Migrator().DropTable(tableName) if err != nil { return errors.WrapDeprecated(err, op) } diff --git a/internal/oplog/writer_test.go b/internal/oplog/writer_test.go index 72c482243..f3930d722 100644 --- a/internal/oplog/writer_test.go +++ b/internal/oplog/writer_test.go @@ -5,9 +5,10 @@ import ( "github.com/hashicorp/boundary/internal/oplog/oplog_test" dbassert "github.com/hashicorp/dbassert/gorm" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + _ "gorm.io/driver/postgres" + "gorm.io/gorm" ) // Test_GormWriterCreate provides unit tests for GormWriter Create @@ -290,7 +291,10 @@ func TestGormWriter_Update(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - assert, require, dbassert := assert.New(t), require.New(t), dbassert.New(t, db.DB(), "postgres") + assert, require := assert.New(t), require.New(t) + underlyingDB, err := db.DB() + require.NoError(err) + dbassert := dbassert.New(t, underlyingDB, db.Dialector.Name()) w := &GormWriter{ Tx: tt.Tx, @@ -299,7 +303,7 @@ func TestGormWriter_Update(t *testing.T) { u.Name = tt.args.user.Name u.Email = tt.args.user.Email u.PhoneNumber = tt.args.user.PhoneNumber - err := w.Update(tt.args.user, tt.args.fieldMaskPaths, tt.args.setToNullPaths) + err = w.Update(u, tt.args.fieldMaskPaths, tt.args.setToNullPaths) if tt.wantErr { require.Error(err) return diff --git a/internal/proto/local/controller/api/resources/authmethods/v1/auth_method.proto b/internal/proto/local/controller/api/resources/authmethods/v1/auth_method.proto index ff222abd3..a34480a4e 100644 --- a/internal/proto/local/controller/api/resources/authmethods/v1/auth_method.proto +++ b/internal/proto/local/controller/api/resources/authmethods/v1/auth_method.proto @@ -13,42 +13,43 @@ import "controller/custom_options/v1/options.proto"; // AuthMethod contains all fields related to an Auth Method resource message AuthMethod { // Output only. The ID of the Auth Method. - string id = 10; + string id = 10; // @gotags: `class:"public"` // The ID of the Scope of which this Auth Method is a part. - string scope_id = 20 [json_name = "scope_id"]; + string scope_id = 20 [json_name = "scope_id"]; // @gotags: `class:"public"` // Output only. Scope information for this Auth method. - resources.scopes.v1.ScopeInfo scope = 30; + resources.scopes.v1.ScopeInfo scope = 30; // @gotags: `class:"public"` // Optional name for identification purposes. - google.protobuf.StringValue name = 40 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = { this: "name" that: "Name" }]; + google.protobuf.StringValue name = 40 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = { this: "name" that: "Name" }]; // @gotags: `class:"public"` // Optional user-set description for identification purposes. - google.protobuf.StringValue description = 50 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = { this: "description" that: "Description" }]; + google.protobuf.StringValue description = 50 + [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = { this: "description" that: "Description" }]; // @gotags: `class:"public"` // Output only. The time this resource was created. - google.protobuf.Timestamp created_time = 60 [json_name = "created_time"]; + google.protobuf.Timestamp created_time = 60 [json_name = "created_time"]; // @gotags: `class:"public"` // Output only. The time this resource was last updated. - google.protobuf.Timestamp updated_time = 70 [json_name = "updated_time"]; + google.protobuf.Timestamp updated_time = 70 [json_name = "updated_time"]; // @gotags: `class:"public"` // Version is used in mutation requests, after the initial creation, to ensure this resource has not changed. // The mutation will fail if the version does not match the latest known good version. - uint32 version = 80; + uint32 version = 80; // @gotags: `class:"public"` // The Auth Method type. - string type = 90; + string type = 90; // @gotags: `class:"public"` // The attributes that are applicable for the specific Auth Method type. google.protobuf.Struct attributes = 100 [(custom_options.v1.generate_sdk_option) = true]; // Output only. Whether this auth method is the primary auth method for it's scope. // To change this value update the primary_auth_method_id field on the scope. - bool is_primary = 110 [json_name = "is_primary"]; + bool is_primary = 110 [json_name = "is_primary"]; // @gotags: `class:"public"` // Output only. The available actions on this resource for this user. - repeated string authorized_actions = 300 [json_name = "authorized_actions"]; + repeated string authorized_actions = 300 [json_name = "authorized_actions"]; // @gotags: `class:"public"` // Output only. The authorized actions for the scope's collections. map authorized_collection_actions = 310 [json_name = "authorized_collection_actions"]; diff --git a/internal/proto/local/controller/api/resources/scopes/v1/scope.proto b/internal/proto/local/controller/api/resources/scopes/v1/scope.proto index 3ab3d4b76..b320741a4 100644 --- a/internal/proto/local/controller/api/resources/scopes/v1/scope.proto +++ b/internal/proto/local/controller/api/resources/scopes/v1/scope.proto @@ -11,58 +11,62 @@ import "controller/custom_options/v1/options.proto"; message ScopeInfo { // Output only. The ID of the Scope. - string id = 1; + string id = 1; // @gotags: `class:"public"` // Output only. The type of the Scope. - string type = 2; + string type = 2; // @gotags: `class:"public"` // Output only. The name of the Scope, if any. - string name = 3; + string name = 3; // @gotags: `class:"public"` // Output only. The description of the Scope, if any. - string description = 4; + string description = 4; // @gotags: `class:"public"` // Output only. The ID of the parent Scope, if any. This field will be empty if this is the "global" scope. - string parent_scope_id = 5 [json_name = "parent_scope_id"]; + string parent_scope_id = 5 [json_name = "parent_scope_id"]; // @gotags: `class:"public"` } // Scope contains all fields related to a Scope resource message Scope { // Output only. The ID of the Scope. - string id = 10; + string id = 10; // @gotags: `class:"public"` // The ID of the Scope this resource is in. If this is the "global" Scope this field will be empty. - string scope_id = 20 [json_name = "scope_id"]; + string scope_id = 20 [json_name = "scope_id"]; // @gotags: `class:"public"` // Output only. Scope information for this resource. ScopeInfo scope = 30; // Optional name for identification purposes. - google.protobuf.StringValue name = 40 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = { this: "name" that: "name" }]; + google.protobuf.StringValue name = 40 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = { this: "name" that: "name" }]; // @gotags: `class:"public"` // Optional user-set descripton for identification purposes. - google.protobuf.StringValue description = 50 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = { this: "description" that: "description" }]; + google.protobuf.StringValue description = 50 + [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = { this: "description" that: "description" }]; // @gotags: `class:"public"` // Output only. The time this resource was created. - google.protobuf.Timestamp created_time = 60 [json_name = "created_time"]; + google.protobuf.Timestamp created_time = 60 [json_name = "created_time"]; // @gotags: `class:"public"` // Output only. The time this resource was last updated. - google.protobuf.Timestamp updated_time = 70 [json_name = "updated_time"]; + google.protobuf.Timestamp updated_time = 70 [json_name = "updated_time"]; // @gotags: `class:"public"` // Version is used in mutation requests, after the initial creation, to ensure this resource has not changed. // The mutation will fail if the version does not match the latest known good version. - uint32 version = 80; + uint32 version = 80; // @gotags: `class:"public"` // The type of the resource. - string type = 90; + string type = 90; // @gotags: `class:"public"` // The ID of the primary auth method for this scope. A primary auth method // is allowed to vivify users when new accounts are created and is the source for the users account info - google.protobuf.StringValue primary_auth_method_id = 100 - [json_name = "primary_auth_method_id", (custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = { this: "primary_auth_method_id" that: "PrimaryAuthMethodId" }]; + google.protobuf.StringValue primary_auth_method_id = 100 [ + json_name = "primary_auth_method_id", + (custom_options.v1.generate_sdk_option) = true, + (custom_options.v1.mask_mapping) = { this: "primary_auth_method_id" that: "PrimaryAuthMethodId" } + ]; // @gotags: `class:"public"` // Output only. The available actions on this resource for this user. - repeated string authorized_actions = 300 [json_name = "authorized_actions"]; + repeated string authorized_actions = 300 [json_name = "authorized_actions"]; // @gotags: `class:"public"` // Output only. The authorized actions for the scope's collections. map authorized_collection_actions = 310 [json_name = "authorized_collection_actions"]; diff --git a/internal/proto/local/controller/api/services/v1/auth_method_service.proto b/internal/proto/local/controller/api/services/v1/auth_method_service.proto index 0284b0574..c66e0ec96 100644 --- a/internal/proto/local/controller/api/services/v1/auth_method_service.proto +++ b/internal/proto/local/controller/api/services/v1/auth_method_service.proto @@ -200,14 +200,14 @@ message OidcTokenAttributes { message AuthenticateRequest { // The ID of the Auth Method in the system that should be used for authentication. - string auth_method_id = 1 [json_name = "auth_method_id"]; + string auth_method_id = 1 [json_name = "auth_method_id"]; // @gotags: `class:"public"` // This can be "cookie" or "token". If not provided, "token" will be used. "cookie" activates a split-cookie method where the token is split partially between http-only and regular cookies in order // to keep it safe from rogue JS in the browser. string token_type = 2 [json_name = "token_type"]; // Attributes are passed to the Auth Method; the valid keys and values depend on the type of Auth Method as well as the command. google.protobuf.Struct attributes = 4 [json_name = "attributes"]; // The command to perform. - string command = 5 [json_name = "command"]; + string command = 5 [json_name = "command"]; // @gotags: `class:"public"` // Deprecated fields reserved "credentials"; @@ -220,5 +220,5 @@ message AuthenticateResponse { // Valid keys and values depend on the type of Auth Method as well as the command. google.protobuf.Struct attributes = 4 [json_name = "attributes"]; // The command that was performed. - string command = 5 [json_name = "command"]; + string command = 5 [json_name = "command"]; // @gotags: `class:"public"` } diff --git a/internal/proto/local/controller/servers/v1/servers.proto b/internal/proto/local/controller/servers/v1/servers.proto index cc02349f3..7adf4bbb3 100644 --- a/internal/proto/local/controller/servers/v1/servers.proto +++ b/internal/proto/local/controller/servers/v1/servers.proto @@ -32,6 +32,7 @@ message Server { storage.timestamp.v1.Timestamp update_time = 70; // Tags for workers + // @inject_tag: `gorm:"-"` map tags = 80; } diff --git a/internal/proto/local/controller/storage/auth/password/store/v1/password.proto b/internal/proto/local/controller/storage/auth/password/store/v1/password.proto index 5d1e1e0f1..25adc39cc 100644 --- a/internal/proto/local/controller/storage/auth/password/store/v1/password.proto +++ b/internal/proto/local/controller/storage/auth/password/store/v1/password.proto @@ -45,7 +45,7 @@ message AuthMethod { // is_primary_auth_method is a read-only output field which indicates if the // auth method is set as the scope's primary auth method. - // @inject_tag: `gorm:"-"` + // @inject_tag: `gorm:"->"` bool is_primary_auth_method = 20; } diff --git a/internal/proto/local/controller/storage/authtoken/store/v1/authtoken.proto b/internal/proto/local/controller/storage/authtoken/store/v1/authtoken.proto index 412748994..d4ab6982b 100644 --- a/internal/proto/local/controller/storage/authtoken/store/v1/authtoken.proto +++ b/internal/proto/local/controller/storage/authtoken/store/v1/authtoken.proto @@ -43,15 +43,15 @@ message AuthToken { string auth_account_id = 10; // scope_id is not stored in the backing DB but it derived from the linked to auth account. - // @inject_tag: gorm:"-" + // @inject_tag: gorm:"->" string scope_id = 11; // auth_method_id is not stored in the backing DB but it derived from the linked to auth account. - // @inject_tag: gorm:"-" + // @inject_tag: gorm:"->" string auth_method_id = 12; // iam_user_id is not stored in the backing DB but it derived from the linked to auth account. - // @inject_tag: gorm:"-" + // @inject_tag: gorm:"->" string iam_user_id = 13; // key_id is the key ID that was used for the encryption operation. It can be diff --git a/internal/proto/local/controller/storage/iam/store/v1/user.proto b/internal/proto/local/controller/storage/iam/store/v1/user.proto index 8b454ad8b..e85f0ccca 100644 --- a/internal/proto/local/controller/storage/iam/store/v1/user.proto +++ b/internal/proto/local/controller/storage/iam/store/v1/user.proto @@ -38,21 +38,21 @@ message User { // Output only. login_name is a string that maps to the user's account "login // name" from the scope's primary auth method - // @inject_tag: `gorm:"-"` + // @inject_tag: `gorm:"->"` string login_name = 90 [json_name = "login_name"]; // Output only. full_name is a string that maps to the user's account name // from the scope's primary auth method - // @inject_tag: `gorm:"-"` + // @inject_tag: `gorm:"->"` string full_name = 100 [json_name = "full_name"]; // Output only. email is a string that maps to the user's account email from // the scope's primary auth method - // @inject_tag: `gorm:"-"` + // @inject_tag: `gorm:"->"` string email = 110 [json_name = "email"]; // Output only. primary_account_id is a string that maps to the user's account // public_id from the scope's primary auth method - // @inject_tag: `gorm:"-"` + // @inject_tag: `gorm:"->"` string primary_account_id = 120 [json_name = "primary_account_id"]; } \ No newline at end of file diff --git a/internal/proto/local/controller/storage/job/store/v1/job.proto b/internal/proto/local/controller/storage/job/store/v1/job.proto index ee110bf06..7adcfee31 100644 --- a/internal/proto/local/controller/storage/job/store/v1/job.proto +++ b/internal/proto/local/controller/storage/job/store/v1/job.proto @@ -26,7 +26,7 @@ message Job { message JobRun { // private_id is used to access the job run but not intended to be available via the API - // @inject_tag: `gorm:"primary_key"` + // @inject_tag: `gorm:"primary_key;default:null"` string private_id = 1; // The job_plugin_id is the id of the plugin that owns the job. diff --git a/internal/scheduler/job/additional_verification_test.go b/internal/scheduler/job/additional_verification_test.go index 9e89b4d4c..40337ee2c 100644 --- a/internal/scheduler/job/additional_verification_test.go +++ b/internal/scheduler/job/additional_verification_test.go @@ -2,6 +2,7 @@ package job import ( "context" + "database/sql" "testing" "time" @@ -100,24 +101,24 @@ func TestPlugin(t *testing.T) { rw := db.New(conn) rows, err := rw.Query(context.Background(), createJobQuery, []interface{}{ - defaultPluginId, - "same-job-name", - "description", - 0, + sql.Named("plugin_id", defaultPluginId), + sql.Named("name", "same-job-name"), + sql.Named("description", "description"), + sql.Named("next_scheduled_run", 0), }) require.NoError(err) _ = rows.Close() // Creating a job with same name and pluginId should return a unique constraint error rows, err = rw.Query(context.Background(), createJobQuery, []interface{}{ - defaultPluginId, - "same-job-name", - "description", - 0, + sql.Named("plugin_id", defaultPluginId), + sql.Named("name", "same-job-name"), + sql.Named("description", "description"), + sql.Named("next_scheduled_run", 0), }) require.Error(err) assert.Nil(rows) - assert.Equal("pq: duplicate key value violates unique constraint \"job_pkey\"", err.Error()) + assert.Contains(err.Error(), "duplicate key value violates unique constraint \"job_pkey\"") // Create test plugin id testPluginId := "pi_test1234" @@ -127,24 +128,24 @@ func TestPlugin(t *testing.T) { // Creating the a job with the same name and different pluginId should succeed rows, err = rw.Query(context.Background(), createJobQuery, []interface{}{ - testPluginId, - "same-job-name", - "description", - 0, + sql.Named("plugin_id", testPluginId), + sql.Named("name", "same-job-name"), + sql.Named("description", "description"), + sql.Named("next_scheduled_run", 0), }) assert.NoError(err) _ = rows.Close() // Creating a job with same name and pluginId should again return a unique constraint error rows, err = rw.Query(context.Background(), createJobQuery, []interface{}{ - testPluginId, - "same-job-name", - "description", - 0, + sql.Named("plugin_id", testPluginId), + sql.Named("name", "same-job-name"), + sql.Named("description", "description"), + sql.Named("next_scheduled_run", 0), }) require.Error(err) assert.Nil(rows) - assert.Equal("pq: duplicate key value violates unique constraint \"job_pkey\"", err.Error()) + assert.Contains(err.Error(), "duplicate key value violates unique constraint \"job_pkey\"") }) t.Run("plugin-id-immutable", func(t *testing.T) { assert, require := assert.New(t), require.New(t) diff --git a/internal/scheduler/job/query.go b/internal/scheduler/job/query.go index fc057d4c3..7a20a70ad 100644 --- a/internal/scheduler/job/query.go +++ b/internal/scheduler/job/query.go @@ -14,15 +14,15 @@ const runJobsQuery = ` const createJobQuery = ` insert into job ( - plugin_id, -- $1 - name, -- $2 - description, -- $3 - next_scheduled_run -- $4 + plugin_id, + name, + description, + next_scheduled_run ) values ( - $1, -- plugin_id - $2, -- name - $3, -- description - wt_add_seconds_to_now($4) -- next_scheduled_run + @plugin_id, -- plugin_id + @name, -- name + @description, -- description + wt_add_seconds_to_now(@next_scheduled_run) -- next_scheduled_run ) returning *; ` @@ -101,3 +101,10 @@ const interruptRunsQuery = ` %s returning *; ` + +const deleteJobByName = ` + delete + from job + where + name = ? +` diff --git a/internal/scheduler/job/repository_job.go b/internal/scheduler/job/repository_job.go index 73aceb2f8..8ef11d117 100644 --- a/internal/scheduler/job/repository_job.go +++ b/internal/scheduler/job/repository_job.go @@ -2,6 +2,7 @@ package job import ( "context" + "database/sql" "fmt" "strings" "time" @@ -28,14 +29,16 @@ func (r *Repository) CreateJob(ctx context.Context, name, description string, op opts := getOpts(opt...) + defaultId := defaultPluginId + j := allocJob() _, err := r.writer.DoTx(ctx, db.StdRetryCnt, db.ExpBackoff{}, func(r db.Reader, w db.Writer) error { rows, err := r.Query(ctx, createJobQuery, []interface{}{ - defaultPluginId, - name, - description, - int(opts.withNextRunIn.Round(time.Second).Seconds()), + sql.Named("plugin_id", defaultId), + sql.Named("name", name), + sql.Named("description", description), + sql.Named("next_scheduled_run", int(opts.withNextRunIn.Round(time.Second).Seconds())), }) if err != nil { return errors.Wrap(ctx, err, op, errors.WithoutEvent()) @@ -171,12 +174,11 @@ func (r *Repository) deleteJob(ctx context.Context, name string, _ ...Option) (i return db.NoRowsAffected, errors.New(ctx, errors.InvalidParameter, op, "missing name") } - j := allocJob() var rowsDeleted int _, err := r.writer.DoTx( ctx, db.StdRetryCnt, db.ExpBackoff{}, func(_ db.Reader, w db.Writer) (err error) { - rowsDeleted, err = w.Delete(ctx, j, db.WithWhere("name = ?", []interface{}{name})) + rowsDeleted, err = w.Exec(ctx, deleteJobByName, []interface{}{name}) if err != nil { return errors.Wrap(ctx, err, op) } diff --git a/internal/scheduler/job/repository_run_test.go b/internal/scheduler/job/repository_run_test.go index 879963630..8cd810298 100644 --- a/internal/scheduler/job/repository_run_test.go +++ b/internal/scheduler/job/repository_run_test.go @@ -542,7 +542,7 @@ func TestRepository_CompleteRun(t *testing.T) { var privateId string if tt.orig != nil { err = rw.Create(context.Background(), tt.orig) - assert.NoError(err) + require.NoError(err) assert.Empty(tt.orig.EndTime) privateId = tt.orig.PrivateId } @@ -1112,7 +1112,7 @@ func TestRepository_DuplicateJobRun(t *testing.T) { run, err = testRun(conn, job1.PluginId, job1.Name, server.PrivateId) require.Error(err) require.Nil(run) - assert.Equal("pq: duplicate key value violates unique constraint \"job_run_status_constraint\"", err.Error()) + assert.Contains(err.Error(), "duplicate key value violates unique constraint \"job_run_status_constraint\"") // Creating a new job with a different name, the associated run should not conflict with the previous run job2 := testJob(t, conn, "job2", "description", wrapper) diff --git a/internal/scheduler/job/store/job.pb.go b/internal/scheduler/job/store/job.pb.go index 087eb8df3..a4b84ba81 100644 --- a/internal/scheduler/job/store/job.pb.go +++ b/internal/scheduler/job/store/job.pb.go @@ -108,8 +108,8 @@ type JobRun struct { unknownFields protoimpl.UnknownFields // private_id is used to access the job run but not intended to be available via the API - // @inject_tag: `gorm:"primary_key"` - PrivateId string `protobuf:"bytes,1,opt,name=private_id,json=privateId,proto3" json:"private_id,omitempty" gorm:"primary_key"` + // @inject_tag: `gorm:"primary_key;default:null"` + PrivateId string `protobuf:"bytes,1,opt,name=private_id,json=privateId,proto3" json:"private_id,omitempty" gorm:"primary_key;default:null"` // The job_plugin_id is the id of the plugin that owns the job. // @inject_tag: `gorm:"not_null"` JobPluginId string `protobuf:"bytes,2,opt,name=job_plugin_id,json=jobPluginId,proto3" json:"job_plugin_id,omitempty" gorm:"not_null"` diff --git a/internal/scheduler/job/testing.go b/internal/scheduler/job/testing.go index e63d60c25..bd192c93e 100644 --- a/internal/scheduler/job/testing.go +++ b/internal/scheduler/job/testing.go @@ -11,11 +11,10 @@ import ( "github.com/hashicorp/boundary/internal/servers" wrapping "github.com/hashicorp/go-kms-wrapping" "github.com/hashicorp/go-uuid" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/require" ) -func testJob(t *testing.T, conn *gorm.DB, name, description string, wrapper wrapping.Wrapper, opt ...Option) *Job { +func testJob(t *testing.T, conn *db.DB, name, description string, wrapper wrapping.Wrapper, opt ...Option) *Job { t.Helper() require := require.New(t) rw := db.New(conn) @@ -31,7 +30,7 @@ func testJob(t *testing.T, conn *gorm.DB, name, description string, wrapper wrap return job } -func testRun(conn *gorm.DB, pluginId, name, cId string) (*Run, error) { +func testRun(conn *db.DB, pluginId, name, cId string) (*Run, error) { query := ` insert into job_run ( job_plugin_id, job_name, server_id @@ -59,7 +58,7 @@ func testRun(conn *gorm.DB, pluginId, name, cId string) (*Run, error) { return run, nil } -func testRunWithUpdateTime(conn *gorm.DB, pluginId, name, cId string, updateTime time.Time) (*Run, error) { +func testRunWithUpdateTime(conn *db.DB, pluginId, name, cId string, updateTime time.Time) (*Run, error) { query := ` insert into job_run ( job_plugin_id, job_name, server_id, update_time @@ -87,7 +86,7 @@ func testRunWithUpdateTime(conn *gorm.DB, pluginId, name, cId string, updateTime return run, nil } -func testController(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper) *servers.Server { +func testController(t *testing.T, conn *db.DB, wrapper wrapping.Wrapper) *servers.Server { t.Helper() rw := db.New(conn) kms := kms.TestKms(t, conn, wrapper) diff --git a/internal/scheduler/testing.go b/internal/scheduler/testing.go index 8de49b3ce..71646d7d0 100644 --- a/internal/scheduler/testing.go +++ b/internal/scheduler/testing.go @@ -13,7 +13,6 @@ import ( "github.com/hashicorp/boundary/internal/servers" wrapping "github.com/hashicorp/go-kms-wrapping" "github.com/hashicorp/go-uuid" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/require" ) @@ -22,7 +21,7 @@ import ( // // WithRunJobsLimit, WithRunJobsInterval, WithMonitorInterval and WithInterruptThreshold are // the only valid options. -func TestScheduler(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper, opt ...Option) *Scheduler { +func TestScheduler(t *testing.T, conn *db.DB, wrapper wrapping.Wrapper, opt ...Option) *Scheduler { t.Helper() rw := db.New(conn) diff --git a/internal/servers/common/handler.go b/internal/servers/common/handler.go index 53864388a..ffc42d614 100644 --- a/internal/servers/common/handler.go +++ b/internal/servers/common/handler.go @@ -216,7 +216,7 @@ func flushGatedEvents(ctx context.Context, method, url string, statusCode int, s if err != nil { return errors.Wrap(ctx, err, op, errors.WithMsg("unable to write and flush observation event")) } - err = event.WriteAudit(ctx, "handler", event.WithFlush()) + err = event.WriteAudit(ctx, "handler", event.WithFlush(), event.WithResponse(&event.Response{StatusCode: statusCode})) if err != nil { return errors.Wrap(ctx, err, op, errors.WithMsg("unable to write and flush audit event")) } diff --git a/internal/servers/common/handler_test.go b/internal/servers/common/handler_test.go index 449c261ec..ecd288035 100644 --- a/internal/servers/common/handler_test.go +++ b/internal/servers/common/handler_test.go @@ -332,9 +332,9 @@ func Test_WrapWithEventsHandler(t *testing.T) { Id: got.Data.(map[string]interface{})["request_info"].(map[string]interface{})["id"].(string), } hdr := map[string]interface{}{ - "id": got.Data.(map[string]interface{})["id"].(string), - "timestamp": got.Data.(map[string]interface{})["timestamp"].(string), - "serialized_hmac": got.Data.(map[string]interface{})["serialized_hmac"].(string), + "id": got.Data.(map[string]interface{})["id"].(string), + "timestamp": got.Data.(map[string]interface{})["timestamp"].(string), + "response": got.Data.(map[string]interface{})["response"].(map[string]interface{}), } wantJson := testJson(t, event.AuditType, &info, event.Op(tt.name), got, hdr, nil) assert.JSONEq(string(wantJson), string(actualJson)) diff --git a/internal/servers/controller/handler_ui.go b/internal/servers/controller/handler_ui.go index 94cd9e7aa..9d660c0c1 100644 --- a/internal/servers/controller/handler_ui.go +++ b/internal/servers/controller/handler_ui.go @@ -1,3 +1,4 @@ +//go:build ui // +build ui package controller diff --git a/internal/servers/controller/handler_ui_test.go b/internal/servers/controller/handler_ui_test.go index f885783f9..f87154b17 100644 --- a/internal/servers/controller/handler_ui_test.go +++ b/internal/servers/controller/handler_ui_test.go @@ -1,3 +1,4 @@ +//go:build ui // +build ui package controller diff --git a/internal/servers/controller/handlers/authmethods/oidc_test.go b/internal/servers/controller/handlers/authmethods/oidc_test.go index 16648390f..d843c4603 100644 --- a/internal/servers/controller/handlers/authmethods/oidc_test.go +++ b/internal/servers/controller/handlers/authmethods/oidc_test.go @@ -32,7 +32,6 @@ import ( scopepb "github.com/hashicorp/boundary/sdk/pbs/controller/api/resources/scopes" capoidc "github.com/hashicorp/cap/oidc" wrapping "github.com/hashicorp/go-kms-wrapping" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/genproto/protobuf/field_mask" @@ -46,7 +45,7 @@ import ( type setup struct { ctx context.Context - conn *gorm.DB + conn *db.DB rw *db.Db rootWrapper wrapping.Wrapper kmsCache *kms.Kms diff --git a/internal/servers/controller/handlers/host_sets/host_set_service.go b/internal/servers/controller/handlers/host_sets/host_set_service.go index 899d6b5cb..f9a02d512 100644 --- a/internal/servers/controller/handlers/host_sets/host_set_service.go +++ b/internal/servers/controller/handlers/host_sets/host_set_service.go @@ -291,7 +291,7 @@ func (s Service) AddHostSetHosts(ctx context.Context, req *pbs.AddHostSetHostsRe if err := validateAddRequest(req); err != nil { return nil, err } - _, authResults := s.parentAndAuthResult(ctx, req.GetId(), action.AddHostSets) + _, authResults := s.parentAndAuthResult(ctx, req.GetId(), action.AddHosts) if authResults.Error != nil { return nil, authResults.Error } @@ -329,7 +329,7 @@ func (s Service) SetHostSetHosts(ctx context.Context, req *pbs.SetHostSetHostsRe if err := validateSetRequest(req); err != nil { return nil, err } - _, authResults := s.parentAndAuthResult(ctx, req.GetId(), action.SetHostSets) + _, authResults := s.parentAndAuthResult(ctx, req.GetId(), action.SetHosts) if authResults.Error != nil { return nil, authResults.Error } @@ -366,7 +366,7 @@ func (s Service) RemoveHostSetHosts(ctx context.Context, req *pbs.RemoveHostSetH if err := validateRemoveRequest(req); err != nil { return nil, err } - _, authResults := s.parentAndAuthResult(ctx, req.GetId(), action.RemoveHostSets) + _, authResults := s.parentAndAuthResult(ctx, req.GetId(), action.RemoveHosts) if authResults.Error != nil { return nil, authResults.Error } diff --git a/internal/servers/controller/handlers/host_sets/host_set_service_test.go b/internal/servers/controller/handlers/host_sets/host_set_service_test.go index d8b6eebd9..5e0ac56fa 100644 --- a/internal/servers/controller/handlers/host_sets/host_set_service_test.go +++ b/internal/servers/controller/handlers/host_sets/host_set_service_test.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "sort" "strings" "testing" @@ -1318,6 +1319,17 @@ func TestUpdate(t *testing.T) { if tc.res != nil { tc.res.Item.Version = version + 1 } + if tc.res != nil { + sort.Slice(tc.res.GetItem().HostIds, func(i, j int) bool { + return tc.res.GetItem().HostIds[i] < tc.res.GetItem().HostIds[j] + }) + } + if got != nil && got.Item != nil { + sort.Slice(got.GetItem().HostIds, func(i, j int) bool { + return got.GetItem().HostIds[i] < got.GetItem().HostIds[j] + }) + } + assert.Empty(cmp.Diff(got, tc.res, protocmp.Transform()), "UpdateHostSet(%q) got response %q, wanted %q", req, got, tc.res) }) } diff --git a/internal/servers/controller/handlers/outgoing_interceptor.go b/internal/servers/controller/handlers/outgoing_interceptor.go index a97abfee9..2814c2b10 100644 --- a/internal/servers/controller/handlers/outgoing_interceptor.go +++ b/internal/servers/controller/handlers/outgoing_interceptor.go @@ -7,6 +7,7 @@ import ( "strings" pbs "github.com/hashicorp/boundary/internal/gen/controller/api/services" + "github.com/hashicorp/boundary/internal/observability/event" authtokenpb "github.com/hashicorp/boundary/sdk/pbs/controller/api/resources/authtokens" "google.golang.org/protobuf/proto" @@ -20,13 +21,21 @@ const ( statusField = "status" ) -func OutgoingInterceptor(_ context.Context, w http.ResponseWriter, m proto.Message) error { +func OutgoingInterceptor(ctx context.Context, w http.ResponseWriter, m proto.Message) error { + const op = "handlers.OutgoingInterceptor" m = m.ProtoReflect().Interface() if !m.ProtoReflect().IsValid() { // This would be the case if it's a nil pointer w.WriteHeader(http.StatusNoContent) return nil } + + // add the outgoing resp proto. See: common.flushGatedEvents is where the + // event.Response.StatusCode is added. + if err := event.WriteAudit(ctx, op, event.WithResponse(&event.Response{Details: m})); err != nil { + return fmt.Errorf("%s: unable to write audit event: %w", op, err) + } + switch m := m.(type) { case *pbs.AuthenticateResponse: if m.GetAttributes() == nil || m.GetAttributes().GetFields() == nil { diff --git a/internal/servers/controller/handlers/targets/target_service_test.go b/internal/servers/controller/handlers/targets/target_service_test.go index 8595a420c..85b48fd55 100644 --- a/internal/servers/controller/handlers/targets/target_service_test.go +++ b/internal/servers/controller/handlers/targets/target_service_test.go @@ -40,7 +40,6 @@ import ( pb "github.com/hashicorp/boundary/sdk/pbs/controller/api/resources/targets" plgpb "github.com/hashicorp/boundary/sdk/pbs/plugin" wrapping "github.com/hashicorp/go-kms-wrapping" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/genproto/protobuf/field_mask" @@ -70,7 +69,7 @@ var testAuthorizedActions = []string{ "authorize-session", } -func testService(t *testing.T, conn *gorm.DB, kms *kms.Kms, wrapper wrapping.Wrapper) (targets.Service, error) { +func testService(t *testing.T, conn *db.DB, kms *kms.Kms, wrapper wrapping.Wrapper) (targets.Service, error) { rw := db.New(conn) sche := scheduler.TestScheduler(t, conn, wrapper) repoFn := func() (*target.Repository, error) { diff --git a/internal/servers/controller/testing.go b/internal/servers/controller/testing.go index d4e890aa8..fea334a2a 100644 --- a/internal/servers/controller/testing.go +++ b/internal/servers/controller/testing.go @@ -16,6 +16,7 @@ import ( "github.com/hashicorp/boundary/internal/authtoken" "github.com/hashicorp/boundary/internal/cmd/base" "github.com/hashicorp/boundary/internal/cmd/config" + "github.com/hashicorp/boundary/internal/db" "github.com/hashicorp/boundary/internal/db/schema" "github.com/hashicorp/boundary/internal/host/plugin" "github.com/hashicorp/boundary/internal/iam" @@ -27,7 +28,6 @@ import ( wrapping "github.com/hashicorp/go-kms-wrapping" "github.com/hashicorp/go-secure-stdlib/base62" "github.com/hashicorp/go-secure-stdlib/strutil" - "github.com/jinzhu/gorm" ) const ( @@ -127,7 +127,7 @@ func (tc *TestController) ClusterAddrs() []string { return tc.addrs("cluster") } -func (tc *TestController) DbConn() *gorm.DB { +func (tc *TestController) DbConn() *db.DB { return tc.b.Database } @@ -273,8 +273,8 @@ func (tc *TestController) Shutdown() { tc.t.Error(err) } if !tc.opts.DisableDatabaseDestruction { - if tc.b.DestroyDevDatabase() != nil { - if err := tc.b.DestroyDevDatabase(); err != nil { + if tc.b.DestroyDevDatabase(tc.ctx) != nil { + if err := tc.b.DestroyDevDatabase(tc.ctx); err != nil { tc.t.Error(err) } } @@ -537,7 +537,7 @@ func NewTestController(t *testing.T, opts *TestControllerOpts) *TestController { if _, err := schema.MigrateStore(ctx, "postgres", tc.b.DatabaseUrl); err != nil { t.Fatal(err) } - if err := tc.b.ConnectToDatabase("postgres"); err != nil { + if err := tc.b.ConnectToDatabase(tc.ctx, "postgres"); err != nil { t.Fatal(err) } if !opts.DisableKmsKeyCreation { diff --git a/internal/servers/query.go b/internal/servers/query.go index afc44040f..1e814a853 100644 --- a/internal/servers/query.go +++ b/internal/servers/query.go @@ -5,14 +5,14 @@ const ( insert into server (private_id, type, description, address, update_time) values - ($1, $2, $3, $4, now()) + (@private_id, @type, @description, @address, now()) on conflict on constraint server_pkey do update set - type = $2, - description = $3, - address = $4, + type = @type, + description = @description, + address = @address, update_time = now(); ` - deleteWhereCreateTimeSql = `create_time < $1` - deleteTagsSql = `server_id = $1` + deleteWhereCreateTimeSql = `create_time < ?` + deleteTagsSql = `server_id = ?` ) diff --git a/internal/servers/repository.go b/internal/servers/repository.go index 3ca3784d7..2634e87a7 100644 --- a/internal/servers/repository.go +++ b/internal/servers/repository.go @@ -2,6 +2,7 @@ package servers import ( "context" + "database/sql" "fmt" "time" @@ -80,9 +81,9 @@ func (r *Repository) listServersWithReader(ctx context.Context, reader db.Reader var where string if liveness > 0 { - where = fmt.Sprintf("type = $1 and update_time > now() - interval '%d seconds'", uint32(liveness.Seconds())) + where = fmt.Sprintf("type = ? and update_time > now() - interval '%d seconds'", uint32(liveness.Seconds())) } else { - where = "type = $1" + where = "type = ?" } var servers []*Server @@ -148,10 +149,10 @@ func (r *Repository) UpsertServer(ctx context.Context, server *Server, opt ...Op rowsUpdated, err = w.Exec(ctx, serverUpsertQuery, []interface{}{ - server.PrivateId, - server.Type, - server.Description, - server.Address, + sql.Named("private_id", server.PrivateId), + sql.Named("type", server.Type), + sql.Named("description", server.Description), + sql.Named("address", server.Address), }) if err != nil { return errors.Wrap(ctx, err, op+":Upsert") diff --git a/internal/servers/repository_test.go b/internal/servers/repository_test.go index 8dda2a7bb..30ed1c8ed 100644 --- a/internal/servers/repository_test.go +++ b/internal/servers/repository_test.go @@ -102,6 +102,7 @@ func TestTagUpdatingListing(t *testing.T) { }, }, } + _, _, err := repo.UpsertServer(tc.Context(), srv, servers.WithUpdateTags(true)) require.NoError(err) diff --git a/internal/servers/servers.pb.go b/internal/servers/servers.pb.go index cb1012f11..b5fad0c29 100644 --- a/internal/servers/servers.pb.go +++ b/internal/servers/servers.pb.go @@ -47,7 +47,8 @@ type Server struct { // Last time there was an update UpdateTime *timestamp.Timestamp `protobuf:"bytes,70,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` // Tags for workers - Tags map[string]*TagValues `protobuf:"bytes,80,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // @inject_tag: `gorm:"-"` + Tags map[string]*TagValues `protobuf:"bytes,80,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3" gorm:"-"` } func (x *Server) Reset() { diff --git a/internal/session/query.go b/internal/session/query.go index 476bd0e2d..8218e43f5 100644 --- a/internal/session/query.go +++ b/internal/session/query.go @@ -16,9 +16,9 @@ with not_active as ( where s.public_id = ss.session_id and ss.state = 'pending' and - ss.session_id = $1 and - s.version = $2 and - s.public_id not in(select session_id from session_state where session_id = $1 and state = 'active') + ss.session_id = @session_id and + s.version = @version and + s.public_id not in(select session_id from session_state where session_id = @session_id and state = 'active') ) select * from not_active; ` @@ -29,11 +29,11 @@ select * from not_active; updateSessionState = ` insert into session_state(session_id, state) select - $1::text, $2 + @session_id, @status from session s where - s.public_id = $1::text and + s.public_id = @session_id and s.public_id not in ( select session_id @@ -42,8 +42,8 @@ where where -- already in the updated state ( - session_id = $1::text and - state = $2 + session_id = @session_id and + state = @status ) or -- already terminated session_id in ( @@ -52,7 +52,7 @@ where from session_state where - session_id = $1::text and + session_id = @session_id and state = 'terminated' ) ) @@ -65,7 +65,7 @@ with terminated as ( from session s where - s.version = $2 and + s.version = @version and s.public_id in ( -- sessions without any connections select s.public_id @@ -74,7 +74,7 @@ with terminated as ( left join session_connection sc on sc.session_id = s.public_id where sc.session_id is null - and s.public_id = $1 + and s.public_id = @session_id union -- sessions where all connections are closed select s.public_id @@ -86,7 +86,7 @@ with terminated as ( s.public_id = c.session_id and c.public_id = cs.connection_id and cs.state = 'closed' and - s.public_id = $1 + s.public_id = @session_id ) ) select * from terminated; @@ -99,9 +99,9 @@ insert into session_connection ( ) with active_session as ( select - $1 as session_id, - $2 as public_id, - $3 as server_id + @session_id as session_id, + @public_id as public_id, + @worker_id as server_id from session s where @@ -111,7 +111,7 @@ with active_session as ( ( s.connection_limit = -1 or - s.connection_limit > (select count(*) from session_connection sc where sc.session_id = $1) + s.connection_limit > (select count(*) from session_connection sc where sc.session_id = @session_id) ) and -- check that there's a state of active s.public_id in ( @@ -120,7 +120,7 @@ with active_session as ( from session_state ss where - ss.session_id = $1 and + ss.session_id = @session_id and ss.state = 'active' and -- if there's no end_time, then this is the current state. ss.end_time is null @@ -136,7 +136,7 @@ session_connection_count(current_connection_count) as ( from session_connection sc where - sc.session_id = $1 + sc.session_id = @session_id ), session_connection_limit(expiration_time, connection_limit) as ( select @@ -145,7 +145,7 @@ session_connection_limit(expiration_time, connection_limit) as ( from session s where - s.public_id = $1 + s.public_id = @session_id ) select expiration_time, connection_limit, current_connection_count from @@ -269,7 +269,7 @@ with from session_connection where -- Related to the worker that just reported to us - server_id = $1 + server_id = ? and -- These are connection IDs that just got reported to us by the given -- worker, so they should not be considered closed. @@ -302,7 +302,7 @@ with dead_servers (server_id, last_update_time) as ( select private_id, update_time from server - where update_time < wt_sub_seconds_from_now($1) + where update_time < wt_sub_seconds_from_now(?) ), closed_connections (connection_id, server_id) as ( update session_connection diff --git a/internal/session/repository_connection.go b/internal/session/repository_connection.go index 8ea77e728..c86d6297e 100644 --- a/internal/session/repository_connection.go +++ b/internal/session/repository_connection.go @@ -2,6 +2,7 @@ package session import ( "context" + "database/sql" "fmt" "strings" "time" @@ -128,8 +129,8 @@ func (r *Repository) CloseDeadConnectionsForWorker(ctx context.Context, serverId publicIdStr = `public_id not in (%s) and` params := make([]string, len(foundConns)) for i, connId := range foundConns { - params[i] = fmt.Sprintf("$%d", i+2) // Add one for server ID, and offsets start at 1 - args = append(args, connId) + params[i] = fmt.Sprintf("@%d", i+2) // Add one for server ID, and offsets start at 1 + args = append(args, sql.Named(fmt.Sprintf("%d", i+2), connId)) } publicIdStr = fmt.Sprintf(publicIdStr, strings.Join(params, ",")) } @@ -224,8 +225,8 @@ func (r *Repository) ShouldCloseConnectionsOnWorker(ctx context.Context, foundCo // foundConns first connsParams := make([]string, len(foundConns)) for i, connId := range foundConns { - connsParams[i] = fmt.Sprintf("$%d", i+1) - args = append(args, connId) + connsParams[i] = fmt.Sprintf("@%d", i+1) + args = append(args, sql.Named(fmt.Sprintf("%d", i+1), connId)) } connsStr := strings.Join(connsParams, ",") @@ -235,8 +236,8 @@ func (r *Repository) ShouldCloseConnectionsOnWorker(ctx context.Context, foundCo offset := len(foundConns) + 1 sessionsParams := make([]string, len(filterSessions)) for i, sessionId := range filterSessions { - sessionsParams[i] = fmt.Sprintf("$%d", i+offset) - args = append(args, sessionId) + sessionsParams[i] = fmt.Sprintf("@%d", i+offset) + args = append(args, sql.Named(fmt.Sprintf("%d", i+offset), sessionId)) } const sessionIdFmtStr = `and session_id not in (%s)` diff --git a/internal/session/repository_connection_test.go b/internal/session/repository_connection_test.go index 106ab50b3..7e51ba65f 100644 --- a/internal/session/repository_connection_test.go +++ b/internal/session/repository_connection_test.go @@ -503,9 +503,9 @@ func TestRepository_CloseConnectionsForDeadWorkers(t *testing.T) { // CloseConnectionsForDeadWorkersResult. timestampPbAsUTC := func(t *testing.T, tm time.Time) time.Time { t.Helper() - utcLoc, err := time.LoadLocation("Etc/UTC") - require.NoError(err) - return tm.In(utcLoc) + // utcLoc, err := time.LoadLocation("Etc/UTC") + // require.NoError(err) + return tm.In(time.Local) } // Now try some scenarios. diff --git a/internal/session/repository_session.go b/internal/session/repository_session.go index 7eaf0da80..f324be3b6 100644 --- a/internal/session/repository_session.go +++ b/internal/session/repository_session.go @@ -4,6 +4,7 @@ import ( "context" "crypto/ed25519" "crypto/subtle" + "database/sql" "fmt" "strings" @@ -206,31 +207,31 @@ func (r *Repository) ListSessions(ctx context.Context, opt ...Option) ([]*Sessio switch len(opts.withScopeIds) { case 1: inClauseCnt += 1 - where, args = append(where, fmt.Sprintf("scope_id = $%d", inClauseCnt)), append(args, opts.withScopeIds[0]) + where, args = append(where, fmt.Sprintf("scope_id = @%d", inClauseCnt)), append(args, sql.Named("1", opts.withScopeIds[0])) default: idsInClause := make([]string, 0, len(opts.withScopeIds)) for _, id := range opts.withScopeIds { inClauseCnt += 1 - idsInClause, args = append(idsInClause, fmt.Sprintf("$%d", inClauseCnt)), append(args, id) + idsInClause, args = append(idsInClause, fmt.Sprintf("@%d", inClauseCnt)), append(args, sql.Named(fmt.Sprintf("%d", inClauseCnt), id)) } where = append(where, fmt.Sprintf("scope_id in (%s)", strings.Join(idsInClause, ","))) } } if opts.withUserId != "" { inClauseCnt += 1 - where, args = append(where, fmt.Sprintf("user_id = $%d", inClauseCnt)), append(args, opts.withUserId) + where, args = append(where, fmt.Sprintf("user_id = @%d", inClauseCnt)), append(args, sql.Named(fmt.Sprintf("%d", inClauseCnt), opts.withUserId)) } if len(opts.withSessionIds) > 0 { idsInClause := make([]string, 0, len(opts.withSessionIds)) for _, id := range opts.withSessionIds { inClauseCnt += 1 - idsInClause, args = append(idsInClause, fmt.Sprintf("$%d", inClauseCnt)), append(args, id) + idsInClause, args = append(idsInClause, fmt.Sprintf("@%d", inClauseCnt)), append(args, sql.Named(fmt.Sprintf("%d", inClauseCnt), id)) } where = append(where, fmt.Sprintf("s.public_id in (%s)", strings.Join(idsInClause, ","))) } if opts.withServerId != "" { inClauseCnt += 1 - where, args = append(where, fmt.Sprintf("server_id = $%d", inClauseCnt)), append(args, opts.withServerId) + where, args = append(where, fmt.Sprintf("server_id = @%d", inClauseCnt)), append(args, sql.Named(fmt.Sprintf("%d", inClauseCnt), opts.withServerId)) } var limit string @@ -360,7 +361,10 @@ func (r *Repository) TerminateSession(ctx context.Context, sessionId string, ses db.StdRetryCnt, db.ExpBackoff{}, func(reader db.Reader, w db.Writer) error { - rowsAffected, err := w.Exec(ctx, terminateSessionCte, []interface{}{sessionId, sessionVersion}) + rowsAffected, err := w.Exec(ctx, terminateSessionCte, []interface{}{ + sql.Named("version", sessionVersion), + sql.Named("session_id", sessionId), + }) if err != nil { return errors.Wrap(ctx, err, op, errors.WithMsg(fmt.Sprintf("unable to terminate session %s", sessionId))) } @@ -441,7 +445,11 @@ func (r *Repository) AuthorizeConnection(ctx context.Context, sessionId, workerI db.StdRetryCnt, db.ExpBackoff{}, func(reader db.Reader, w db.Writer) error { - rowsAffected, err := w.Exec(ctx, authorizeConnectionCte, []interface{}{sessionId, connectionId, workerId}) + rowsAffected, err := w.Exec(ctx, authorizeConnectionCte, []interface{}{ + sql.Named("session_id", sessionId), + sql.Named("public_id", connectionId), + sql.Named("worker_id", workerId), + }) if err != nil { return errors.Wrap(ctx, err, op, errors.WithMsg(fmt.Sprintf("unable to authorize connection %s", sessionId))) } @@ -476,7 +484,7 @@ type ConnectionAuthzSummary struct { func (r *Repository) sessionAuthzSummary(ctx context.Context, sessionId string) (*ConnectionAuthzSummary, error) { const op = "session.(Repository).sessionAuthzSummary" - rows, err := r.reader.Query(ctx, remainingConnectionsCte, []interface{}{sessionId}) + rows, err := r.reader.Query(ctx, remainingConnectionsCte, []interface{}{sql.Named("session_id", sessionId)}) if err != nil { return nil, errors.Wrap(ctx, err, op) } @@ -645,7 +653,10 @@ func (r *Repository) ActivateSession(ctx context.Context, sessionId string, sess db.StdRetryCnt, db.ExpBackoff{}, func(reader db.Reader, w db.Writer) error { - rowsAffected, err := w.Exec(ctx, activateStateCte, []interface{}{sessionId, sessionVersion}) + rowsAffected, err := w.Exec(ctx, activateStateCte, []interface{}{ + sql.Named("session_id", sessionId), + sql.Named("version", sessionVersion), + }) if err != nil { return errors.Wrap(ctx, err, op, errors.WithMsg(fmt.Sprintf("unable to activate session %s", sessionId))) } @@ -742,7 +753,10 @@ func (r *Repository) updateState(ctx context.Context, sessionId string, sessionV updatedSession.CtTofuToken = nil } - rowsAffected, err = w.Exec(ctx, updateSessionState, []interface{}{sessionId, s.String()}) + rowsAffected, err = w.Exec(ctx, updateSessionState, []interface{}{ + sql.Named("session_id", sessionId), + sql.Named("status", s.String()), + }) if err != nil { return errors.Wrap(ctx, err, op, errors.WithMsg(fmt.Sprintf("unable to update session %s state to %s", sessionId, s.String()))) } diff --git a/internal/session/repository_session_test.go b/internal/session/repository_session_test.go index 1ccae8c59..890e5b260 100644 --- a/internal/session/repository_session_test.go +++ b/internal/session/repository_session_test.go @@ -17,8 +17,7 @@ import ( "github.com/hashicorp/boundary/internal/target" targetStore "github.com/hashicorp/boundary/internal/target/store" wrapping "github.com/hashicorp/go-kms-wrapping" - "github.com/jinzhu/gorm" - "github.com/lib/pq" + "github.com/jackc/pgconn" "google.golang.org/protobuf/types/known/timestamppb" "github.com/hashicorp/boundary/internal/errors" @@ -1408,13 +1407,13 @@ func TestRepository_CancelSessionViaFKNull(t *testing.T) { rowsDeleted, err := rw.Delete(context.Background(), tt.cancelFk.fkType) if err != nil { - var pqError *pq.Error - if errors.As(err, &pqError) { - t.Log(pqError.Message) - t.Log(pqError.Detail) - t.Log(pqError.Where) - t.Log(pqError.Constraint) - t.Log(pqError.Table) + var pgError *pgconn.PgError + if errors.As(err, &pgError) { + t.Log(pgError.Message) + t.Log(pgError.Detail) + t.Log(pgError.Where) + t.Log(pgError.ConstraintName) + t.Log(pgError.TableName) } } require.NoError(err) @@ -1642,7 +1641,7 @@ func TestRepository_DeleteSession(t *testing.T) { } } -func testSessionCredentialParams(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper, iamRepo *iam.Repository) ComposedOf { +func testSessionCredentialParams(t *testing.T, conn *db.DB, wrapper wrapping.Wrapper, iamRepo *iam.Repository) ComposedOf { t.Helper() params := TestSessionParams(t, conn, wrapper, iamRepo) require := require.New(t) diff --git a/internal/session/testing.go b/internal/session/testing.go index 8a67e19e4..652f5ac98 100644 --- a/internal/session/testing.go +++ b/internal/session/testing.go @@ -18,13 +18,12 @@ import ( wrapping "github.com/hashicorp/go-kms-wrapping" "github.com/hashicorp/go-secure-stdlib/base62" "github.com/hashicorp/go-uuid" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/require" "google.golang.org/protobuf/types/known/timestamppb" ) // TestConnection creates a test connection for the sessionId in the repository. -func TestConnection(t *testing.T, conn *gorm.DB, sessionId, clientTcpAddr string, clientTcpPort uint32, endpointTcpAddr string, endpointTcpPort uint32) *Connection { +func TestConnection(t *testing.T, conn *db.DB, sessionId, clientTcpAddr string, clientTcpPort uint32, endpointTcpAddr string, endpointTcpPort uint32) *Connection { t.Helper() require := require.New(t) rw := db.New(conn) @@ -44,7 +43,7 @@ func TestConnection(t *testing.T, conn *gorm.DB, sessionId, clientTcpAddr string } // TestConnectionState creates a test connection state for the connectionId in the repository. -func TestConnectionState(t *testing.T, conn *gorm.DB, connectionId string, state ConnectionStatus) *ConnectionState { +func TestConnectionState(t *testing.T, conn *db.DB, connectionId string, state ConnectionStatus) *ConnectionState { t.Helper() require := require.New(t) rw := db.New(conn) @@ -56,7 +55,7 @@ func TestConnectionState(t *testing.T, conn *gorm.DB, connectionId string, state } // TestState creates a test state for the sessionId in the repository. -func TestState(t *testing.T, conn *gorm.DB, sessionId string, state Status) *State { +func TestState(t *testing.T, conn *db.DB, sessionId string, state Status) *State { t.Helper() require := require.New(t) rw := db.New(conn) @@ -69,7 +68,7 @@ func TestState(t *testing.T, conn *gorm.DB, sessionId string, state Status) *Sta // TestSession creates a test session composed of c in the repository. Options // are passed into New, and withServerId is handled locally. -func TestSession(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper, c ComposedOf, opt ...Option) *Session { +func TestSession(t *testing.T, conn *db.DB, wrapper wrapping.Wrapper, c ComposedOf, opt ...Option) *Session { t.Helper() ctx := context.Background() opts := getOpts(opt...) @@ -110,7 +109,7 @@ func TestSession(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper, c Compos } // TestDefaultSession creates a test session in the repository using defaults. -func TestDefaultSession(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper, iamRepo *iam.Repository, opt ...Option) *Session { +func TestDefaultSession(t *testing.T, conn *db.DB, wrapper wrapping.Wrapper, iamRepo *iam.Repository, opt ...Option) *Session { t.Helper() composedOf := TestSessionParams(t, conn, wrapper, iamRepo) future := timestamppb.New(time.Now().Add(time.Hour)) @@ -120,7 +119,7 @@ func TestDefaultSession(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper, i // TestSessionParams returns an initialized ComposedOf which can be used to // create a session in the repository. -func TestSessionParams(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper, iamRepo *iam.Repository) ComposedOf { +func TestSessionParams(t *testing.T, conn *db.DB, wrapper wrapping.Wrapper, iamRepo *iam.Repository) ComposedOf { t.Helper() ctx := context.Background() @@ -176,7 +175,7 @@ func TestTofu(t *testing.T) []byte { // TestWorker inserts a worker into the db to satisfy foreign key constraints. // Supports the WithServerId option. -func TestWorker(t *testing.T, conn *gorm.DB, wrapper wrapping.Wrapper, opt ...Option) *servers.Server { +func TestWorker(t *testing.T, conn *db.DB, wrapper wrapping.Wrapper, opt ...Option) *servers.Server { t.Helper() rw := db.New(conn) kms := kms.TestKms(t, conn, wrapper) diff --git a/internal/target/query.go b/internal/target/query.go index afc3b4d81..7dc5c09a4 100644 --- a/internal/target/query.go +++ b/internal/target/query.go @@ -13,7 +13,7 @@ current_libraries (library_id) as ( -- returns the current list select credential_library_id from target_credential_library - where target_id = $1 + where target_id = @target_id ), keep_libraries (library_id) as ( -- returns the KEEP list diff --git a/internal/target/repository_credential_source.go b/internal/target/repository_credential_source.go index d4f0a7ca0..2ebb5449f 100644 --- a/internal/target/repository_credential_source.go +++ b/internal/target/repository_credential_source.go @@ -2,6 +2,7 @@ package target import ( "context" + "database/sql" "fmt" "strings" @@ -353,9 +354,9 @@ type change struct { func (r *Repository) changes(ctx context.Context, targetId string, clIds []string) ([]*change, error) { const op = "target.(Repository).changes" var inClauseSpots []string - // starts at 2 because there is already a $1 in the query + // starts at 2 because there is already a @1 in the query for i := 2; i < len(clIds)+2; i++ { - inClauseSpots = append(inClauseSpots, fmt.Sprintf("$%d", i)) + inClauseSpots = append(inClauseSpots, fmt.Sprintf("@%d", i)) } inClause := strings.Join(inClauseSpots, ",") if inClause == "" { @@ -364,9 +365,9 @@ func (r *Repository) changes(ctx context.Context, targetId string, clIds []strin query := fmt.Sprintf(setChangesQuery, inClause) var params []interface{} - params = append(params, targetId) - for _, id := range clIds { - params = append(params, id) + params = append(params, sql.Named("target_id", targetId)) + for idx, id := range clIds { + params = append(params, sql.Named(fmt.Sprintf("%d", idx+2), id)) } rows, err := r.reader.Query(ctx, query, params) if err != nil { diff --git a/internal/target/repository_tcp_target_test.go b/internal/target/repository_tcp_target_test.go index 36274d029..89b34dfce 100644 --- a/internal/target/repository_tcp_target_test.go +++ b/internal/target/repository_tcp_target_test.go @@ -219,6 +219,7 @@ func TestRepository_CreateTcpTarget(t *testing.T) { func TestRepository_UpdateTcpTarget(t *testing.T) { t.Parallel() + ctx := context.Background() conn, _ := db.TestSetup(t, "postgres") rw := db.New(conn) wrapper := db.TestWrapper(t) @@ -491,7 +492,9 @@ func TestRepository_UpdateTcpTarget(t *testing.T) { foundTarget, _, _, err := repo.LookupTarget(context.Background(), target.PublicId) assert.NoError(err) assert.True(proto.Equal(targetAfterUpdate.((*TcpTarget)), foundTarget.((*TcpTarget)))) - dbassert := dbassert.New(t, conn.DB()) + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(err) + dbassert := dbassert.New(t, underlyingDB) if tt.args.description == "" { assert.Equal(foundTarget.GetDescription(), "") dbassert.IsNull(foundTarget, "description") diff --git a/internal/target/tcp_target_test.go b/internal/target/tcp_target_test.go index 1b2d4964a..faa059033 100644 --- a/internal/target/tcp_target_test.go +++ b/internal/target/tcp_target_test.go @@ -146,6 +146,7 @@ func TestTcpTarget_Delete(t *testing.T) { func TestTcpTarget_Update(t *testing.T) { t.Parallel() id := testId(t) + ctx := context.Background() conn, _ := db.TestSetup(t, "postgres") rw := db.New(conn) wrapper := db.TestWrapper(t) @@ -279,7 +280,9 @@ func TestTcpTarget_Update(t *testing.T) { require.NoError(err) assert.True(proto.Equal(updateTarget, foundTarget)) if len(tt.args.nullPaths) != 0 { - dbassert := dbassert.New(t, conn.DB()) + underlyingDB, err := conn.SqlDB(ctx) + require.NoError(err) + dbassert := dbassert.New(t, underlyingDB) for _, f := range tt.args.nullPaths { dbassert.IsNull(&foundTarget, f) } diff --git a/internal/target/testing.go b/internal/target/testing.go index 6be140c5f..a1761a659 100644 --- a/internal/target/testing.go +++ b/internal/target/testing.go @@ -7,11 +7,10 @@ import ( "github.com/hashicorp/boundary/internal/db" "github.com/hashicorp/go-uuid" - "github.com/jinzhu/gorm" "github.com/stretchr/testify/require" ) -func TestTcpTarget(t *testing.T, conn *gorm.DB, scopeId, name string, opt ...Option) *TcpTarget { +func TestTcpTarget(t *testing.T, conn *db.DB, scopeId, name string, opt ...Option) *TcpTarget { t.Helper() opt = append(opt, WithName(name)) opts := getOpts(opt...) @@ -62,7 +61,7 @@ func testId(t *testing.T) string { // TestCredentialLibrary creates a CredentialLibrary for targetId and // libraryId. -func TestCredentialLibrary(t *testing.T, conn *gorm.DB, targetId, libraryId string) *CredentialLibrary { +func TestCredentialLibrary(t *testing.T, conn *db.DB, targetId, libraryId string) *CredentialLibrary { t.Helper() require := require.New(t) rw := db.New(conn) diff --git a/internal/ui/VERSION b/internal/ui/VERSION index aa12903fd..ca661c4ef 100644 --- a/internal/ui/VERSION +++ b/internal/ui/VERSION @@ -1,4 +1,4 @@ -1321df32659b2b808ca889f053b09bee4504a368 Merge pull request #751 from hashicorp/chore-create-without-read-host +f29a6bc5d9475ee57327f4ca21aa213908bbfd01 Merge pull request #771 from hashicorp/chore-nth-check-resolutions # This file determines the version of the UI to embed in the boundary binary. # Update this file by running 'make update-ui-version' from the root of this repo. # Set UI_COMMITISH when running the above target to update to a specific version. diff --git a/internal/ui/assets.go b/internal/ui/assets.go index e2beca9db..3e3f698c7 100644 --- a/internal/ui/assets.go +++ b/internal/ui/assets.go @@ -1,3 +1,4 @@ +//go:build ui // +build ui package ui diff --git a/internal/ui/dummy.go b/internal/ui/dummy.go index 584080c66..ae0d78b9c 100644 --- a/internal/ui/dummy.go +++ b/internal/ui/dummy.go @@ -1,3 +1,4 @@ +//go:build !ui // +build !ui package ui diff --git a/packages-oss.lock/layers/layers.mk b/packages-oss.lock/layers/layers.mk index 79f896c99..033224407 100755 --- a/packages-oss.lock/layers/layers.mk +++ b/packages-oss.lock/layers/layers.mk @@ -2,38 +2,38 @@ # WARNING: Do not EDIT or MERGE this file, it is generated by packagespec. # *** -LAYER_00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16_ID := 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16 -LAYER_00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16_TYPE := base -LAYER_00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16_BASE_LAYER := -LAYER_00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16_SOURCE_INCLUDE := -LAYER_00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16_SOURCE_EXCLUDE := -LAYER_00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16_CACHE_KEY_FILE := .buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16 -LAYER_00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16_ARCHIVE_FILE := .buildcache/archives/00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16.tar.gz -$(eval $(call LAYER,$(LAYER_00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16_ID),$(LAYER_00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16_TYPE),$(LAYER_00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16_BASE_LAYER),$(LAYER_00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16_SOURCE_INCLUDE),$(LAYER_00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16_SOURCE_EXCLUDE),$(LAYER_00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16_CACHE_KEY_FILE),$(LAYER_00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16_ARCHIVE_FILE))) +LAYER_00-base-2017dceda969e0eab6fd00cab602c9a05538de9c_ID := 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c +LAYER_00-base-2017dceda969e0eab6fd00cab602c9a05538de9c_TYPE := base +LAYER_00-base-2017dceda969e0eab6fd00cab602c9a05538de9c_BASE_LAYER := +LAYER_00-base-2017dceda969e0eab6fd00cab602c9a05538de9c_SOURCE_INCLUDE := +LAYER_00-base-2017dceda969e0eab6fd00cab602c9a05538de9c_SOURCE_EXCLUDE := +LAYER_00-base-2017dceda969e0eab6fd00cab602c9a05538de9c_CACHE_KEY_FILE := .buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c +LAYER_00-base-2017dceda969e0eab6fd00cab602c9a05538de9c_ARCHIVE_FILE := .buildcache/archives/00-base-2017dceda969e0eab6fd00cab602c9a05538de9c.tar.gz +$(eval $(call LAYER,$(LAYER_00-base-2017dceda969e0eab6fd00cab602c9a05538de9c_ID),$(LAYER_00-base-2017dceda969e0eab6fd00cab602c9a05538de9c_TYPE),$(LAYER_00-base-2017dceda969e0eab6fd00cab602c9a05538de9c_BASE_LAYER),$(LAYER_00-base-2017dceda969e0eab6fd00cab602c9a05538de9c_SOURCE_INCLUDE),$(LAYER_00-base-2017dceda969e0eab6fd00cab602c9a05538de9c_SOURCE_EXCLUDE),$(LAYER_00-base-2017dceda969e0eab6fd00cab602c9a05538de9c_CACHE_KEY_FILE),$(LAYER_00-base-2017dceda969e0eab6fd00cab602c9a05538de9c_ARCHIVE_FILE))) -LAYER_01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a_ID := 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a -LAYER_01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a_TYPE := ui -LAYER_01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a_BASE_LAYER := 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16 -LAYER_01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a_SOURCE_INCLUDE := internal/ui/VERSION -LAYER_01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a_SOURCE_EXCLUDE := -LAYER_01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a_CACHE_KEY_FILE := .buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a -LAYER_01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a_ARCHIVE_FILE := .buildcache/archives/01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a.tar.gz -$(eval $(call LAYER,$(LAYER_01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a_ID),$(LAYER_01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a_TYPE),$(LAYER_01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a_BASE_LAYER),$(LAYER_01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a_SOURCE_INCLUDE),$(LAYER_01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a_SOURCE_EXCLUDE),$(LAYER_01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a_CACHE_KEY_FILE),$(LAYER_01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a_ARCHIVE_FILE))) +LAYER_01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1_ID := 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 +LAYER_01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1_TYPE := ui +LAYER_01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1_BASE_LAYER := 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c +LAYER_01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1_SOURCE_INCLUDE := internal/ui/VERSION +LAYER_01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1_SOURCE_EXCLUDE := +LAYER_01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1_CACHE_KEY_FILE := .buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 +LAYER_01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1_ARCHIVE_FILE := .buildcache/archives/01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1.tar.gz +$(eval $(call LAYER,$(LAYER_01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1_ID),$(LAYER_01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1_TYPE),$(LAYER_01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1_BASE_LAYER),$(LAYER_01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1_SOURCE_INCLUDE),$(LAYER_01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1_SOURCE_EXCLUDE),$(LAYER_01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1_CACHE_KEY_FILE),$(LAYER_01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1_ARCHIVE_FILE))) -LAYER_02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3_ID := 02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3 -LAYER_02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3_TYPE := go-modules -LAYER_02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3_BASE_LAYER := 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a -LAYER_02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3_SOURCE_INCLUDE := go.mod go.sum */go.mod */go.sum -LAYER_02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3_SOURCE_EXCLUDE := -LAYER_02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3_CACHE_KEY_FILE := .buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3 -LAYER_02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3_ARCHIVE_FILE := .buildcache/archives/02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3.tar.gz -$(eval $(call LAYER,$(LAYER_02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3_ID),$(LAYER_02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3_TYPE),$(LAYER_02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3_BASE_LAYER),$(LAYER_02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3_SOURCE_INCLUDE),$(LAYER_02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3_SOURCE_EXCLUDE),$(LAYER_02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3_CACHE_KEY_FILE),$(LAYER_02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3_ARCHIVE_FILE))) +LAYER_02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e_ID := 02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e +LAYER_02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e_TYPE := go-modules +LAYER_02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e_BASE_LAYER := 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 +LAYER_02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e_SOURCE_INCLUDE := go.mod go.sum */go.mod */go.sum +LAYER_02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e_SOURCE_EXCLUDE := +LAYER_02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e_CACHE_KEY_FILE := .buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e +LAYER_02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e_ARCHIVE_FILE := .buildcache/archives/02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e.tar.gz +$(eval $(call LAYER,$(LAYER_02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e_ID),$(LAYER_02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e_TYPE),$(LAYER_02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e_BASE_LAYER),$(LAYER_02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e_SOURCE_INCLUDE),$(LAYER_02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e_SOURCE_EXCLUDE),$(LAYER_02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e_CACHE_KEY_FILE),$(LAYER_02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e_ARCHIVE_FILE))) -LAYER_03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1_ID := 03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1 -LAYER_03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1_TYPE := copy-source -LAYER_03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1_BASE_LAYER := 02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3 -LAYER_03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1_SOURCE_INCLUDE := *.go -LAYER_03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1_SOURCE_EXCLUDE := -LAYER_03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1_CACHE_KEY_FILE := .buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1 -LAYER_03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1_ARCHIVE_FILE := .buildcache/archives/03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1.tar.gz -$(eval $(call LAYER,$(LAYER_03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1_ID),$(LAYER_03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1_TYPE),$(LAYER_03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1_BASE_LAYER),$(LAYER_03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1_SOURCE_INCLUDE),$(LAYER_03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1_SOURCE_EXCLUDE),$(LAYER_03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1_CACHE_KEY_FILE),$(LAYER_03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1_ARCHIVE_FILE))) +LAYER_03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7_ID := 03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7 +LAYER_03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7_TYPE := copy-source +LAYER_03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7_BASE_LAYER := 02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e +LAYER_03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7_SOURCE_INCLUDE := *.go +LAYER_03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7_SOURCE_EXCLUDE := +LAYER_03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7_CACHE_KEY_FILE := .buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7 +LAYER_03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7_ARCHIVE_FILE := .buildcache/archives/03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7.tar.gz +$(eval $(call LAYER,$(LAYER_03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7_ID),$(LAYER_03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7_TYPE),$(LAYER_03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7_BASE_LAYER),$(LAYER_03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7_SOURCE_INCLUDE),$(LAYER_03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7_SOURCE_EXCLUDE),$(LAYER_03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7_CACHE_KEY_FILE),$(LAYER_03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7_ARCHIVE_FILE))) diff --git a/packages-oss.lock/pkgs.yml b/packages-oss.lock/pkgs.yml index fa197ab48..8a21e83b1 100644 --- a/packages-oss.lock/pkgs.yml +++ b/packages-oss.lock/pkgs.yml @@ -1,11 +1,11 @@ # *** # WARNING: Do not EDIT or MERGE this file, it is generated by packagespec. # *** -lockid: fd66eb9f99de501d +lockid: 645fb387fb0a87de packagespec-version: 0.2.6 cache-version: 10 packages: - - packagespecid: ddd70200153c0e65302afe88a629b4440e8eebfa + - packagespecid: 2bb9488232c945d6800cc3a4a461d9b17503bccc inputs: BINARY_NAME: boundary BUILD_TAGS: ui @@ -13,42 +13,42 @@ packages: GOARCH: amd64 GOOS: darwin PRODUCT_NAME: boundary - PRODUCT_VERSION: 0.6.1 - PRODUCT_VERSION_MMP: 0.6.1 + PRODUCT_VERSION: 0.6.2 + PRODUCT_VERSION_MMP: 0.6.2 PRODUCT_VERSION_PRE: "" meta: BUILD_JOB_NAME: darwin_amd64_package - BUNDLE_NAME: boundary_0.6.1 + BUNDLE_NAME: boundary_0.6.2 builtin: BUILD_LAYERS: - type: copy-source - name: 03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1 - archive: .buildcache/archives/03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1.tar.gz + name: 03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7 + archive: .buildcache/archives/03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7.tar.gz - type: go-modules - name: 02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3 - archive: .buildcache/archives/02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3.tar.gz + name: 02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e + archive: .buildcache/archives/02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e.tar.gz - type: ui - name: 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a - archive: .buildcache/archives/01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a.tar.gz + name: 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 + archive: .buildcache/archives/01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1.tar.gz - type: base - name: 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16 - archive: .buildcache/archives/00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16.tar.gz - PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-ddd70200153c0e65302afe88a629b4440e8eebfa + name: 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c + archive: .buildcache/archives/00-base-2017dceda969e0eab6fd00cab602c9a05538de9c.tar.gz + PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-2bb9488232c945d6800cc3a4a461d9b17503bccc POST_PROCESSORS: apple-notarize av-scan circleci: BUILDER_CACHE_KEY_PREFIX_LIST: - - copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} - PACKAGE_CACHE_KEY: package-ddd70200153c0e65302afe88a629b4440e8eebfa-{{checksum ".buildcache/cache-keys/package-ddd70200153c0e65302afe88a629b4440e8eebfa"}} - build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.1 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary + - copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} + PACKAGE_CACHE_KEY: package-2bb9488232c945d6800cc3a4a461d9b17503bccc-{{checksum ".buildcache/cache-keys/package-2bb9488232c945d6800cc3a4a461d9b17503bccc"}} + build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.2 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary aliases: - type: local - path: boundary_0.6.1_darwin_amd64.zip + path: boundary_0.6.2_darwin_amd64.zip - type: public-hc-releases - path: boundary/boundary_0.6.1/boundary_0.6.1_darwin_amd64.zip - - packagespecid: dca0ba02c8e7351c77442c86523f121a8c83039e + path: boundary/boundary_0.6.2/boundary_0.6.2_darwin_amd64.zip + - packagespecid: e9f9d34c2c14f59f68c31469b7bfa994074a48c2 inputs: BINARY_NAME: boundary BUILD_TAGS: ui @@ -56,42 +56,42 @@ packages: GOARCH: "386" GOOS: freebsd PRODUCT_NAME: boundary - PRODUCT_VERSION: 0.6.1 - PRODUCT_VERSION_MMP: 0.6.1 + PRODUCT_VERSION: 0.6.2 + PRODUCT_VERSION_MMP: 0.6.2 PRODUCT_VERSION_PRE: "" meta: BUILD_JOB_NAME: freebsd_386_package - BUNDLE_NAME: boundary_0.6.1 + BUNDLE_NAME: boundary_0.6.2 builtin: BUILD_LAYERS: - type: copy-source - name: 03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1 - archive: .buildcache/archives/03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1.tar.gz + name: 03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7 + archive: .buildcache/archives/03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7.tar.gz - type: go-modules - name: 02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3 - archive: .buildcache/archives/02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3.tar.gz + name: 02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e + archive: .buildcache/archives/02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e.tar.gz - type: ui - name: 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a - archive: .buildcache/archives/01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a.tar.gz + name: 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 + archive: .buildcache/archives/01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1.tar.gz - type: base - name: 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16 - archive: .buildcache/archives/00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16.tar.gz - PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-dca0ba02c8e7351c77442c86523f121a8c83039e + name: 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c + archive: .buildcache/archives/00-base-2017dceda969e0eab6fd00cab602c9a05538de9c.tar.gz + PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-e9f9d34c2c14f59f68c31469b7bfa994074a48c2 POST_PROCESSORS: av-scan circleci: BUILDER_CACHE_KEY_PREFIX_LIST: - - copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} - PACKAGE_CACHE_KEY: package-dca0ba02c8e7351c77442c86523f121a8c83039e-{{checksum ".buildcache/cache-keys/package-dca0ba02c8e7351c77442c86523f121a8c83039e"}} - build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.1 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary + - copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} + PACKAGE_CACHE_KEY: package-e9f9d34c2c14f59f68c31469b7bfa994074a48c2-{{checksum ".buildcache/cache-keys/package-e9f9d34c2c14f59f68c31469b7bfa994074a48c2"}} + build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.2 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary aliases: - type: local - path: boundary_0.6.1_freebsd_386.zip + path: boundary_0.6.2_freebsd_386.zip - type: public-hc-releases - path: boundary/boundary_0.6.1/boundary_0.6.1_freebsd_386.zip - - packagespecid: 72b242aa7004a2a706bd894df71c002671e8e425 + path: boundary/boundary_0.6.2/boundary_0.6.2_freebsd_386.zip + - packagespecid: 3e2a1075872eae7608bf8be4b74f7291ca88d5b5 inputs: BINARY_NAME: boundary BUILD_TAGS: ui @@ -99,42 +99,42 @@ packages: GOARCH: amd64 GOOS: freebsd PRODUCT_NAME: boundary - PRODUCT_VERSION: 0.6.1 - PRODUCT_VERSION_MMP: 0.6.1 + PRODUCT_VERSION: 0.6.2 + PRODUCT_VERSION_MMP: 0.6.2 PRODUCT_VERSION_PRE: "" meta: BUILD_JOB_NAME: freebsd_amd64_package - BUNDLE_NAME: boundary_0.6.1 + BUNDLE_NAME: boundary_0.6.2 builtin: BUILD_LAYERS: - type: copy-source - name: 03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1 - archive: .buildcache/archives/03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1.tar.gz + name: 03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7 + archive: .buildcache/archives/03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7.tar.gz - type: go-modules - name: 02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3 - archive: .buildcache/archives/02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3.tar.gz + name: 02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e + archive: .buildcache/archives/02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e.tar.gz - type: ui - name: 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a - archive: .buildcache/archives/01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a.tar.gz + name: 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 + archive: .buildcache/archives/01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1.tar.gz - type: base - name: 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16 - archive: .buildcache/archives/00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16.tar.gz - PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-72b242aa7004a2a706bd894df71c002671e8e425 + name: 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c + archive: .buildcache/archives/00-base-2017dceda969e0eab6fd00cab602c9a05538de9c.tar.gz + PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-3e2a1075872eae7608bf8be4b74f7291ca88d5b5 POST_PROCESSORS: av-scan circleci: BUILDER_CACHE_KEY_PREFIX_LIST: - - copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} - PACKAGE_CACHE_KEY: package-72b242aa7004a2a706bd894df71c002671e8e425-{{checksum ".buildcache/cache-keys/package-72b242aa7004a2a706bd894df71c002671e8e425"}} - build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.1 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary + - copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} + PACKAGE_CACHE_KEY: package-3e2a1075872eae7608bf8be4b74f7291ca88d5b5-{{checksum ".buildcache/cache-keys/package-3e2a1075872eae7608bf8be4b74f7291ca88d5b5"}} + build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.2 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary aliases: - type: local - path: boundary_0.6.1_freebsd_amd64.zip + path: boundary_0.6.2_freebsd_amd64.zip - type: public-hc-releases - path: boundary/boundary_0.6.1/boundary_0.6.1_freebsd_amd64.zip - - packagespecid: 2409a41c5c5a434b5dbf77d29deb31a24c825dea + path: boundary/boundary_0.6.2/boundary_0.6.2_freebsd_amd64.zip + - packagespecid: 822b1aa9954becb7a9cb480784ff9f99783a8d23 inputs: BINARY_NAME: boundary BUILD_TAGS: ui @@ -142,42 +142,42 @@ packages: GOARCH: arm GOOS: freebsd PRODUCT_NAME: boundary - PRODUCT_VERSION: 0.6.1 - PRODUCT_VERSION_MMP: 0.6.1 + PRODUCT_VERSION: 0.6.2 + PRODUCT_VERSION_MMP: 0.6.2 PRODUCT_VERSION_PRE: "" meta: BUILD_JOB_NAME: freebsd_arm_package - BUNDLE_NAME: boundary_0.6.1 + BUNDLE_NAME: boundary_0.6.2 builtin: BUILD_LAYERS: - type: copy-source - name: 03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1 - archive: .buildcache/archives/03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1.tar.gz + name: 03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7 + archive: .buildcache/archives/03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7.tar.gz - type: go-modules - name: 02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3 - archive: .buildcache/archives/02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3.tar.gz + name: 02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e + archive: .buildcache/archives/02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e.tar.gz - type: ui - name: 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a - archive: .buildcache/archives/01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a.tar.gz + name: 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 + archive: .buildcache/archives/01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1.tar.gz - type: base - name: 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16 - archive: .buildcache/archives/00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16.tar.gz - PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-2409a41c5c5a434b5dbf77d29deb31a24c825dea + name: 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c + archive: .buildcache/archives/00-base-2017dceda969e0eab6fd00cab602c9a05538de9c.tar.gz + PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-822b1aa9954becb7a9cb480784ff9f99783a8d23 POST_PROCESSORS: av-scan circleci: BUILDER_CACHE_KEY_PREFIX_LIST: - - copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} - PACKAGE_CACHE_KEY: package-2409a41c5c5a434b5dbf77d29deb31a24c825dea-{{checksum ".buildcache/cache-keys/package-2409a41c5c5a434b5dbf77d29deb31a24c825dea"}} - build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.1 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary + - copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} + PACKAGE_CACHE_KEY: package-822b1aa9954becb7a9cb480784ff9f99783a8d23-{{checksum ".buildcache/cache-keys/package-822b1aa9954becb7a9cb480784ff9f99783a8d23"}} + build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.2 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary aliases: - type: local - path: boundary_0.6.1_freebsd_arm.zip + path: boundary_0.6.2_freebsd_arm.zip - type: public-hc-releases - path: boundary/boundary_0.6.1/boundary_0.6.1_freebsd_arm.zip - - packagespecid: 1439f62f659d115a6675bef8de63d7a576370da6 + path: boundary/boundary_0.6.2/boundary_0.6.2_freebsd_arm.zip + - packagespecid: 7fd6bd8ba41907a8ad8d09a9ed3c43fb94801f2a inputs: BINARY_NAME: boundary BUILD_TAGS: ui @@ -185,42 +185,42 @@ packages: GOARCH: "386" GOOS: linux PRODUCT_NAME: boundary - PRODUCT_VERSION: 0.6.1 - PRODUCT_VERSION_MMP: 0.6.1 + PRODUCT_VERSION: 0.6.2 + PRODUCT_VERSION_MMP: 0.6.2 PRODUCT_VERSION_PRE: "" meta: BUILD_JOB_NAME: linux_386_package - BUNDLE_NAME: boundary_0.6.1 + BUNDLE_NAME: boundary_0.6.2 builtin: BUILD_LAYERS: - type: copy-source - name: 03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1 - archive: .buildcache/archives/03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1.tar.gz + name: 03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7 + archive: .buildcache/archives/03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7.tar.gz - type: go-modules - name: 02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3 - archive: .buildcache/archives/02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3.tar.gz + name: 02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e + archive: .buildcache/archives/02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e.tar.gz - type: ui - name: 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a - archive: .buildcache/archives/01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a.tar.gz + name: 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 + archive: .buildcache/archives/01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1.tar.gz - type: base - name: 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16 - archive: .buildcache/archives/00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16.tar.gz - PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-1439f62f659d115a6675bef8de63d7a576370da6 + name: 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c + archive: .buildcache/archives/00-base-2017dceda969e0eab6fd00cab602c9a05538de9c.tar.gz + PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-7fd6bd8ba41907a8ad8d09a9ed3c43fb94801f2a POST_PROCESSORS: av-scan circleci: BUILDER_CACHE_KEY_PREFIX_LIST: - - copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} - PACKAGE_CACHE_KEY: package-1439f62f659d115a6675bef8de63d7a576370da6-{{checksum ".buildcache/cache-keys/package-1439f62f659d115a6675bef8de63d7a576370da6"}} - build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.1 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary + - copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} + PACKAGE_CACHE_KEY: package-7fd6bd8ba41907a8ad8d09a9ed3c43fb94801f2a-{{checksum ".buildcache/cache-keys/package-7fd6bd8ba41907a8ad8d09a9ed3c43fb94801f2a"}} + build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.2 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary aliases: - type: local - path: boundary_0.6.1_linux_386.zip + path: boundary_0.6.2_linux_386.zip - type: public-hc-releases - path: boundary/boundary_0.6.1/boundary_0.6.1_linux_386.zip - - packagespecid: 192814968c68e1c819d216b95925afb4099aaa07 + path: boundary/boundary_0.6.2/boundary_0.6.2_linux_386.zip + - packagespecid: 03d32b4b7349ceac506ca889be4772fe8239ecd8 inputs: BINARY_NAME: boundary BUILD_TAGS: ui @@ -228,42 +228,42 @@ packages: GOARCH: amd64 GOOS: linux PRODUCT_NAME: boundary - PRODUCT_VERSION: 0.6.1 - PRODUCT_VERSION_MMP: 0.6.1 + PRODUCT_VERSION: 0.6.2 + PRODUCT_VERSION_MMP: 0.6.2 PRODUCT_VERSION_PRE: "" meta: BUILD_JOB_NAME: linux_amd64_package - BUNDLE_NAME: boundary_0.6.1 + BUNDLE_NAME: boundary_0.6.2 builtin: BUILD_LAYERS: - type: copy-source - name: 03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1 - archive: .buildcache/archives/03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1.tar.gz + name: 03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7 + archive: .buildcache/archives/03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7.tar.gz - type: go-modules - name: 02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3 - archive: .buildcache/archives/02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3.tar.gz + name: 02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e + archive: .buildcache/archives/02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e.tar.gz - type: ui - name: 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a - archive: .buildcache/archives/01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a.tar.gz + name: 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 + archive: .buildcache/archives/01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1.tar.gz - type: base - name: 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16 - archive: .buildcache/archives/00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16.tar.gz - PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-192814968c68e1c819d216b95925afb4099aaa07 + name: 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c + archive: .buildcache/archives/00-base-2017dceda969e0eab6fd00cab602c9a05538de9c.tar.gz + PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-03d32b4b7349ceac506ca889be4772fe8239ecd8 POST_PROCESSORS: av-scan circleci: BUILDER_CACHE_KEY_PREFIX_LIST: - - copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} - PACKAGE_CACHE_KEY: package-192814968c68e1c819d216b95925afb4099aaa07-{{checksum ".buildcache/cache-keys/package-192814968c68e1c819d216b95925afb4099aaa07"}} - build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.1 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary + - copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} + PACKAGE_CACHE_KEY: package-03d32b4b7349ceac506ca889be4772fe8239ecd8-{{checksum ".buildcache/cache-keys/package-03d32b4b7349ceac506ca889be4772fe8239ecd8"}} + build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.2 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary aliases: - type: local - path: boundary_0.6.1_linux_amd64.zip + path: boundary_0.6.2_linux_amd64.zip - type: public-hc-releases - path: boundary/boundary_0.6.1/boundary_0.6.1_linux_amd64.zip - - packagespecid: b734ede0c13f22ffc1835626300d3b3226acaf53 + path: boundary/boundary_0.6.2/boundary_0.6.2_linux_amd64.zip + - packagespecid: ab3b6922ce2bd0fab200dddd6127544427b89fef inputs: BINARY_NAME: boundary BUILD_TAGS: ui @@ -271,42 +271,42 @@ packages: GOARCH: arm GOOS: linux PRODUCT_NAME: boundary - PRODUCT_VERSION: 0.6.1 - PRODUCT_VERSION_MMP: 0.6.1 + PRODUCT_VERSION: 0.6.2 + PRODUCT_VERSION_MMP: 0.6.2 PRODUCT_VERSION_PRE: "" meta: BUILD_JOB_NAME: linux_arm_package - BUNDLE_NAME: boundary_0.6.1 + BUNDLE_NAME: boundary_0.6.2 builtin: BUILD_LAYERS: - type: copy-source - name: 03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1 - archive: .buildcache/archives/03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1.tar.gz + name: 03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7 + archive: .buildcache/archives/03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7.tar.gz - type: go-modules - name: 02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3 - archive: .buildcache/archives/02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3.tar.gz + name: 02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e + archive: .buildcache/archives/02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e.tar.gz - type: ui - name: 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a - archive: .buildcache/archives/01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a.tar.gz + name: 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 + archive: .buildcache/archives/01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1.tar.gz - type: base - name: 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16 - archive: .buildcache/archives/00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16.tar.gz - PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-b734ede0c13f22ffc1835626300d3b3226acaf53 + name: 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c + archive: .buildcache/archives/00-base-2017dceda969e0eab6fd00cab602c9a05538de9c.tar.gz + PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-ab3b6922ce2bd0fab200dddd6127544427b89fef POST_PROCESSORS: av-scan circleci: BUILDER_CACHE_KEY_PREFIX_LIST: - - copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} - PACKAGE_CACHE_KEY: package-b734ede0c13f22ffc1835626300d3b3226acaf53-{{checksum ".buildcache/cache-keys/package-b734ede0c13f22ffc1835626300d3b3226acaf53"}} - build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.1 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary + - copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} + PACKAGE_CACHE_KEY: package-ab3b6922ce2bd0fab200dddd6127544427b89fef-{{checksum ".buildcache/cache-keys/package-ab3b6922ce2bd0fab200dddd6127544427b89fef"}} + build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.2 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary aliases: - type: local - path: boundary_0.6.1_linux_arm.zip + path: boundary_0.6.2_linux_arm.zip - type: public-hc-releases - path: boundary/boundary_0.6.1/boundary_0.6.1_linux_arm.zip - - packagespecid: a1ae7292c28d5e629eea144b2fafb6f234ca4ffa + path: boundary/boundary_0.6.2/boundary_0.6.2_linux_arm.zip + - packagespecid: 7f1216479517d6c6122fd8928ff44c046eb3a377 inputs: BINARY_NAME: boundary BUILD_TAGS: ui @@ -314,42 +314,42 @@ packages: GOARCH: arm64 GOOS: linux PRODUCT_NAME: boundary - PRODUCT_VERSION: 0.6.1 - PRODUCT_VERSION_MMP: 0.6.1 + PRODUCT_VERSION: 0.6.2 + PRODUCT_VERSION_MMP: 0.6.2 PRODUCT_VERSION_PRE: "" meta: BUILD_JOB_NAME: linux_arm64_package - BUNDLE_NAME: boundary_0.6.1 + BUNDLE_NAME: boundary_0.6.2 builtin: BUILD_LAYERS: - type: copy-source - name: 03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1 - archive: .buildcache/archives/03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1.tar.gz + name: 03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7 + archive: .buildcache/archives/03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7.tar.gz - type: go-modules - name: 02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3 - archive: .buildcache/archives/02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3.tar.gz + name: 02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e + archive: .buildcache/archives/02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e.tar.gz - type: ui - name: 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a - archive: .buildcache/archives/01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a.tar.gz + name: 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 + archive: .buildcache/archives/01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1.tar.gz - type: base - name: 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16 - archive: .buildcache/archives/00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16.tar.gz - PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-a1ae7292c28d5e629eea144b2fafb6f234ca4ffa + name: 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c + archive: .buildcache/archives/00-base-2017dceda969e0eab6fd00cab602c9a05538de9c.tar.gz + PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-7f1216479517d6c6122fd8928ff44c046eb3a377 POST_PROCESSORS: av-scan circleci: BUILDER_CACHE_KEY_PREFIX_LIST: - - copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} - PACKAGE_CACHE_KEY: package-a1ae7292c28d5e629eea144b2fafb6f234ca4ffa-{{checksum ".buildcache/cache-keys/package-a1ae7292c28d5e629eea144b2fafb6f234ca4ffa"}} - build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.1 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary + - copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} + PACKAGE_CACHE_KEY: package-7f1216479517d6c6122fd8928ff44c046eb3a377-{{checksum ".buildcache/cache-keys/package-7f1216479517d6c6122fd8928ff44c046eb3a377"}} + build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.2 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary aliases: - type: local - path: boundary_0.6.1_linux_arm64.zip + path: boundary_0.6.2_linux_arm64.zip - type: public-hc-releases - path: boundary/boundary_0.6.1/boundary_0.6.1_linux_arm64.zip - - packagespecid: b9d9cc299dc96f89f71285c520b4cd244879207a + path: boundary/boundary_0.6.2/boundary_0.6.2_linux_arm64.zip + - packagespecid: 7fae91402a49def23c2453fe147c262f1377eac3 inputs: BINARY_NAME: boundary BUILD_TAGS: ui @@ -357,42 +357,42 @@ packages: GOARCH: "386" GOOS: netbsd PRODUCT_NAME: boundary - PRODUCT_VERSION: 0.6.1 - PRODUCT_VERSION_MMP: 0.6.1 + PRODUCT_VERSION: 0.6.2 + PRODUCT_VERSION_MMP: 0.6.2 PRODUCT_VERSION_PRE: "" meta: BUILD_JOB_NAME: netbsd_386_package - BUNDLE_NAME: boundary_0.6.1 + BUNDLE_NAME: boundary_0.6.2 builtin: BUILD_LAYERS: - type: copy-source - name: 03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1 - archive: .buildcache/archives/03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1.tar.gz + name: 03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7 + archive: .buildcache/archives/03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7.tar.gz - type: go-modules - name: 02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3 - archive: .buildcache/archives/02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3.tar.gz + name: 02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e + archive: .buildcache/archives/02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e.tar.gz - type: ui - name: 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a - archive: .buildcache/archives/01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a.tar.gz + name: 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 + archive: .buildcache/archives/01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1.tar.gz - type: base - name: 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16 - archive: .buildcache/archives/00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16.tar.gz - PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-b9d9cc299dc96f89f71285c520b4cd244879207a + name: 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c + archive: .buildcache/archives/00-base-2017dceda969e0eab6fd00cab602c9a05538de9c.tar.gz + PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-7fae91402a49def23c2453fe147c262f1377eac3 POST_PROCESSORS: av-scan circleci: BUILDER_CACHE_KEY_PREFIX_LIST: - - copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} - PACKAGE_CACHE_KEY: package-b9d9cc299dc96f89f71285c520b4cd244879207a-{{checksum ".buildcache/cache-keys/package-b9d9cc299dc96f89f71285c520b4cd244879207a"}} - build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.1 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary + - copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} + PACKAGE_CACHE_KEY: package-7fae91402a49def23c2453fe147c262f1377eac3-{{checksum ".buildcache/cache-keys/package-7fae91402a49def23c2453fe147c262f1377eac3"}} + build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.2 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary aliases: - type: local - path: boundary_0.6.1_netbsd_386.zip + path: boundary_0.6.2_netbsd_386.zip - type: public-hc-releases - path: boundary/boundary_0.6.1/boundary_0.6.1_netbsd_386.zip - - packagespecid: 744fe90a3f2bd01206fbf95ad9d8a8db6b66d84d + path: boundary/boundary_0.6.2/boundary_0.6.2_netbsd_386.zip + - packagespecid: c9b8b9c5b6a1ab2f53599efe3792f7ebbd43a6b8 inputs: BINARY_NAME: boundary BUILD_TAGS: ui @@ -400,42 +400,42 @@ packages: GOARCH: amd64 GOOS: netbsd PRODUCT_NAME: boundary - PRODUCT_VERSION: 0.6.1 - PRODUCT_VERSION_MMP: 0.6.1 + PRODUCT_VERSION: 0.6.2 + PRODUCT_VERSION_MMP: 0.6.2 PRODUCT_VERSION_PRE: "" meta: BUILD_JOB_NAME: netbsd_amd64_package - BUNDLE_NAME: boundary_0.6.1 + BUNDLE_NAME: boundary_0.6.2 builtin: BUILD_LAYERS: - type: copy-source - name: 03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1 - archive: .buildcache/archives/03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1.tar.gz + name: 03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7 + archive: .buildcache/archives/03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7.tar.gz - type: go-modules - name: 02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3 - archive: .buildcache/archives/02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3.tar.gz + name: 02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e + archive: .buildcache/archives/02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e.tar.gz - type: ui - name: 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a - archive: .buildcache/archives/01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a.tar.gz + name: 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 + archive: .buildcache/archives/01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1.tar.gz - type: base - name: 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16 - archive: .buildcache/archives/00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16.tar.gz - PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-744fe90a3f2bd01206fbf95ad9d8a8db6b66d84d + name: 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c + archive: .buildcache/archives/00-base-2017dceda969e0eab6fd00cab602c9a05538de9c.tar.gz + PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-c9b8b9c5b6a1ab2f53599efe3792f7ebbd43a6b8 POST_PROCESSORS: av-scan circleci: BUILDER_CACHE_KEY_PREFIX_LIST: - - copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} - PACKAGE_CACHE_KEY: package-744fe90a3f2bd01206fbf95ad9d8a8db6b66d84d-{{checksum ".buildcache/cache-keys/package-744fe90a3f2bd01206fbf95ad9d8a8db6b66d84d"}} - build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.1 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary + - copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} + PACKAGE_CACHE_KEY: package-c9b8b9c5b6a1ab2f53599efe3792f7ebbd43a6b8-{{checksum ".buildcache/cache-keys/package-c9b8b9c5b6a1ab2f53599efe3792f7ebbd43a6b8"}} + build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.2 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary aliases: - type: local - path: boundary_0.6.1_netbsd_amd64.zip + path: boundary_0.6.2_netbsd_amd64.zip - type: public-hc-releases - path: boundary/boundary_0.6.1/boundary_0.6.1_netbsd_amd64.zip - - packagespecid: 489303d43b63583b456fef92eeef9806a25ef98d + path: boundary/boundary_0.6.2/boundary_0.6.2_netbsd_amd64.zip + - packagespecid: b0201f2d2d1b04f519e0d091fbe23997252c5f70 inputs: BINARY_NAME: boundary BUILD_TAGS: ui @@ -443,42 +443,42 @@ packages: GOARCH: "386" GOOS: openbsd PRODUCT_NAME: boundary - PRODUCT_VERSION: 0.6.1 - PRODUCT_VERSION_MMP: 0.6.1 + PRODUCT_VERSION: 0.6.2 + PRODUCT_VERSION_MMP: 0.6.2 PRODUCT_VERSION_PRE: "" meta: BUILD_JOB_NAME: openbsd_386_package - BUNDLE_NAME: boundary_0.6.1 + BUNDLE_NAME: boundary_0.6.2 builtin: BUILD_LAYERS: - type: copy-source - name: 03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1 - archive: .buildcache/archives/03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1.tar.gz + name: 03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7 + archive: .buildcache/archives/03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7.tar.gz - type: go-modules - name: 02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3 - archive: .buildcache/archives/02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3.tar.gz + name: 02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e + archive: .buildcache/archives/02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e.tar.gz - type: ui - name: 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a - archive: .buildcache/archives/01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a.tar.gz + name: 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 + archive: .buildcache/archives/01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1.tar.gz - type: base - name: 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16 - archive: .buildcache/archives/00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16.tar.gz - PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-489303d43b63583b456fef92eeef9806a25ef98d + name: 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c + archive: .buildcache/archives/00-base-2017dceda969e0eab6fd00cab602c9a05538de9c.tar.gz + PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-b0201f2d2d1b04f519e0d091fbe23997252c5f70 POST_PROCESSORS: av-scan circleci: BUILDER_CACHE_KEY_PREFIX_LIST: - - copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} - PACKAGE_CACHE_KEY: package-489303d43b63583b456fef92eeef9806a25ef98d-{{checksum ".buildcache/cache-keys/package-489303d43b63583b456fef92eeef9806a25ef98d"}} - build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.1 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary + - copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} + PACKAGE_CACHE_KEY: package-b0201f2d2d1b04f519e0d091fbe23997252c5f70-{{checksum ".buildcache/cache-keys/package-b0201f2d2d1b04f519e0d091fbe23997252c5f70"}} + build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.2 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary aliases: - type: local - path: boundary_0.6.1_openbsd_386.zip + path: boundary_0.6.2_openbsd_386.zip - type: public-hc-releases - path: boundary/boundary_0.6.1/boundary_0.6.1_openbsd_386.zip - - packagespecid: 394f426443d3ce6446a86a2982253a2637c061e0 + path: boundary/boundary_0.6.2/boundary_0.6.2_openbsd_386.zip + - packagespecid: 51ea70d1d613481fac829f239f1f081c5ad6c88b inputs: BINARY_NAME: boundary BUILD_TAGS: ui @@ -486,42 +486,42 @@ packages: GOARCH: amd64 GOOS: openbsd PRODUCT_NAME: boundary - PRODUCT_VERSION: 0.6.1 - PRODUCT_VERSION_MMP: 0.6.1 + PRODUCT_VERSION: 0.6.2 + PRODUCT_VERSION_MMP: 0.6.2 PRODUCT_VERSION_PRE: "" meta: BUILD_JOB_NAME: openbsd_amd64_package - BUNDLE_NAME: boundary_0.6.1 + BUNDLE_NAME: boundary_0.6.2 builtin: BUILD_LAYERS: - type: copy-source - name: 03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1 - archive: .buildcache/archives/03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1.tar.gz + name: 03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7 + archive: .buildcache/archives/03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7.tar.gz - type: go-modules - name: 02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3 - archive: .buildcache/archives/02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3.tar.gz + name: 02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e + archive: .buildcache/archives/02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e.tar.gz - type: ui - name: 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a - archive: .buildcache/archives/01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a.tar.gz + name: 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 + archive: .buildcache/archives/01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1.tar.gz - type: base - name: 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16 - archive: .buildcache/archives/00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16.tar.gz - PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-394f426443d3ce6446a86a2982253a2637c061e0 + name: 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c + archive: .buildcache/archives/00-base-2017dceda969e0eab6fd00cab602c9a05538de9c.tar.gz + PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-51ea70d1d613481fac829f239f1f081c5ad6c88b POST_PROCESSORS: av-scan circleci: BUILDER_CACHE_KEY_PREFIX_LIST: - - copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} - PACKAGE_CACHE_KEY: package-394f426443d3ce6446a86a2982253a2637c061e0-{{checksum ".buildcache/cache-keys/package-394f426443d3ce6446a86a2982253a2637c061e0"}} - build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.1 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary + - copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} + PACKAGE_CACHE_KEY: package-51ea70d1d613481fac829f239f1f081c5ad6c88b-{{checksum ".buildcache/cache-keys/package-51ea70d1d613481fac829f239f1f081c5ad6c88b"}} + build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.2 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary aliases: - type: local - path: boundary_0.6.1_openbsd_amd64.zip + path: boundary_0.6.2_openbsd_amd64.zip - type: public-hc-releases - path: boundary/boundary_0.6.1/boundary_0.6.1_openbsd_amd64.zip - - packagespecid: e13e5614c5583baf504ebe29fbf99c21f9447926 + path: boundary/boundary_0.6.2/boundary_0.6.2_openbsd_amd64.zip + - packagespecid: 19efae459acdaea98d804c26c554640ab3544553 inputs: BINARY_NAME: boundary BUILD_TAGS: ui @@ -529,42 +529,42 @@ packages: GOARCH: amd64 GOOS: solaris PRODUCT_NAME: boundary - PRODUCT_VERSION: 0.6.1 - PRODUCT_VERSION_MMP: 0.6.1 + PRODUCT_VERSION: 0.6.2 + PRODUCT_VERSION_MMP: 0.6.2 PRODUCT_VERSION_PRE: "" meta: BUILD_JOB_NAME: solaris_amd64_package - BUNDLE_NAME: boundary_0.6.1 + BUNDLE_NAME: boundary_0.6.2 builtin: BUILD_LAYERS: - type: copy-source - name: 03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1 - archive: .buildcache/archives/03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1.tar.gz + name: 03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7 + archive: .buildcache/archives/03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7.tar.gz - type: go-modules - name: 02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3 - archive: .buildcache/archives/02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3.tar.gz + name: 02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e + archive: .buildcache/archives/02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e.tar.gz - type: ui - name: 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a - archive: .buildcache/archives/01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a.tar.gz + name: 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 + archive: .buildcache/archives/01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1.tar.gz - type: base - name: 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16 - archive: .buildcache/archives/00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16.tar.gz - PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-e13e5614c5583baf504ebe29fbf99c21f9447926 + name: 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c + archive: .buildcache/archives/00-base-2017dceda969e0eab6fd00cab602c9a05538de9c.tar.gz + PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-19efae459acdaea98d804c26c554640ab3544553 POST_PROCESSORS: av-scan circleci: BUILDER_CACHE_KEY_PREFIX_LIST: - - copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} - PACKAGE_CACHE_KEY: package-e13e5614c5583baf504ebe29fbf99c21f9447926-{{checksum ".buildcache/cache-keys/package-e13e5614c5583baf504ebe29fbf99c21f9447926"}} - build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.1 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary + - copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} + PACKAGE_CACHE_KEY: package-19efae459acdaea98d804c26c554640ab3544553-{{checksum ".buildcache/cache-keys/package-19efae459acdaea98d804c26c554640ab3544553"}} + build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.2 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary aliases: - type: local - path: boundary_0.6.1_solaris_amd64.zip + path: boundary_0.6.2_solaris_amd64.zip - type: public-hc-releases - path: boundary/boundary_0.6.1/boundary_0.6.1_solaris_amd64.zip - - packagespecid: 3fc99d62bf311ae70f4e4d9fd3f2a063691f00b9 + path: boundary/boundary_0.6.2/boundary_0.6.2_solaris_amd64.zip + - packagespecid: 44f600485ac3823fa4e0dbba45763d932187225a inputs: BINARY_NAME: boundary.exe BUILD_TAGS: ui @@ -572,42 +572,42 @@ packages: GOARCH: "386" GOOS: windows PRODUCT_NAME: boundary - PRODUCT_VERSION: 0.6.1 - PRODUCT_VERSION_MMP: 0.6.1 + PRODUCT_VERSION: 0.6.2 + PRODUCT_VERSION_MMP: 0.6.2 PRODUCT_VERSION_PRE: "" meta: BUILD_JOB_NAME: windows_386_package - BUNDLE_NAME: boundary_0.6.1 + BUNDLE_NAME: boundary_0.6.2 builtin: BUILD_LAYERS: - type: copy-source - name: 03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1 - archive: .buildcache/archives/03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1.tar.gz + name: 03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7 + archive: .buildcache/archives/03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7.tar.gz - type: go-modules - name: 02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3 - archive: .buildcache/archives/02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3.tar.gz + name: 02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e + archive: .buildcache/archives/02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e.tar.gz - type: ui - name: 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a - archive: .buildcache/archives/01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a.tar.gz + name: 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 + archive: .buildcache/archives/01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1.tar.gz - type: base - name: 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16 - archive: .buildcache/archives/00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16.tar.gz - PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-3fc99d62bf311ae70f4e4d9fd3f2a063691f00b9 + name: 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c + archive: .buildcache/archives/00-base-2017dceda969e0eab6fd00cab602c9a05538de9c.tar.gz + PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-44f600485ac3823fa4e0dbba45763d932187225a POST_PROCESSORS: microsoft-notarize av-scan circleci: BUILDER_CACHE_KEY_PREFIX_LIST: - - copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} - PACKAGE_CACHE_KEY: package-3fc99d62bf311ae70f4e4d9fd3f2a063691f00b9-{{checksum ".buildcache/cache-keys/package-3fc99d62bf311ae70f4e4d9fd3f2a063691f00b9"}} - build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.1 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary.exe ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary.exe + - copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} + PACKAGE_CACHE_KEY: package-44f600485ac3823fa4e0dbba45763d932187225a-{{checksum ".buildcache/cache-keys/package-44f600485ac3823fa4e0dbba45763d932187225a"}} + build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.2 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary.exe ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary.exe aliases: - type: local - path: boundary_0.6.1_windows_386.zip + path: boundary_0.6.2_windows_386.zip - type: public-hc-releases - path: boundary/boundary_0.6.1/boundary_0.6.1_windows_386.zip - - packagespecid: 7f7bcfc7f39c7e62aeba7d94b345a3ebdf2ab7f8 + path: boundary/boundary_0.6.2/boundary_0.6.2_windows_386.zip + - packagespecid: d10bc84044e1ad705f48cd51591b05ee5e1e7dd5 inputs: BINARY_NAME: boundary.exe BUILD_TAGS: ui @@ -615,58 +615,58 @@ packages: GOARCH: amd64 GOOS: windows PRODUCT_NAME: boundary - PRODUCT_VERSION: 0.6.1 - PRODUCT_VERSION_MMP: 0.6.1 + PRODUCT_VERSION: 0.6.2 + PRODUCT_VERSION_MMP: 0.6.2 PRODUCT_VERSION_PRE: "" meta: BUILD_JOB_NAME: windows_amd64_package - BUNDLE_NAME: boundary_0.6.1 + BUNDLE_NAME: boundary_0.6.2 builtin: BUILD_LAYERS: - type: copy-source - name: 03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1 - archive: .buildcache/archives/03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1.tar.gz + name: 03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7 + archive: .buildcache/archives/03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7.tar.gz - type: go-modules - name: 02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3 - archive: .buildcache/archives/02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3.tar.gz + name: 02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e + archive: .buildcache/archives/02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e.tar.gz - type: ui - name: 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a - archive: .buildcache/archives/01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a.tar.gz + name: 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 + archive: .buildcache/archives/01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1.tar.gz - type: base - name: 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16 - archive: .buildcache/archives/00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16.tar.gz - PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-7f7bcfc7f39c7e62aeba7d94b345a3ebdf2ab7f8 + name: 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c + archive: .buildcache/archives/00-base-2017dceda969e0eab6fd00cab602c9a05538de9c.tar.gz + PACKAGE_CACHE_KEY_FILE: .buildcache/cache-keys/package-d10bc84044e1ad705f48cd51591b05ee5e1e7dd5 POST_PROCESSORS: microsoft-notarize av-scan circleci: BUILDER_CACHE_KEY_PREFIX_LIST: - - copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} - PACKAGE_CACHE_KEY: package-7f7bcfc7f39c7e62aeba7d94b345a3ebdf2ab7f8-{{checksum ".buildcache/cache-keys/package-7f7bcfc7f39c7e62aeba7d94b345a3ebdf2ab7f8"}} - build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.1 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary.exe ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary.exe + - copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} + PACKAGE_CACHE_KEY: package-d10bc84044e1ad705f48cd51591b05ee5e1e7dd5-{{checksum ".buildcache/cache-keys/package-d10bc84044e1ad705f48cd51591b05ee5e1e7dd5"}} + build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary/version; unset GOPATH; go build -v -tags 'ui' -ldflags "-X $VERSION_PKG_PATH.GitCommit=$PACKAGE_SOURCE_ID -X $VERSION_PKG_PATH.Version=0.6.2 -X $VERSION_PKG_PATH.VersionPrerelease=" -o $OUTPUT_DIR/boundary.exe ./cmd/boundary && cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME boundary.exe aliases: - type: local - path: boundary_0.6.1_windows_amd64.zip + path: boundary_0.6.2_windows_amd64.zip - type: public-hc-releases - path: boundary/boundary_0.6.1/boundary_0.6.1_windows_amd64.zip -base-image: docker.mirror.hashicorp.services/golang@sha256:448a13037d13401ad9b31fabf91d6b8a3c5c35d336cc8af760b2ab4ed85d4155 + path: boundary/boundary_0.6.2/boundary_0.6.2_windows_amd64.zip +base-image: docker.mirror.hashicorp.services/golang@sha256:2a0bd53951c1b1746c5adab10e1db1495cc6f2da0a3d21818466265e34a78597 layers: - depth: 0 final: false type: base - id: ec5342e30fcbfeb5947252a8ea679fb281052d16 - name: 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16 + id: 2017dceda969e0eab6fd00cab602c9a05538de9c + name: 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c parentname: "" parenttype: "" parentid: "" - cachekeyfile: .buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16 + cachekeyfile: .buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c sourceinclude: "" sourceexclude: "" - archivefile: .buildcache/archives/00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16.tar.gz + archivefile: .buildcache/archives/00-base-2017dceda969e0eab6fd00cab602c9a05538de9c.tar.gz dockerfile: | # syntax=docker.mirror.hashicorp.services/docker/dockerfile:1.1.7-experimental - FROM docker.mirror.hashicorp.services/golang@sha256:448a13037d13401ad9b31fabf91d6b8a3c5c35d336cc8af760b2ab4ed85d4155 + FROM docker.mirror.hashicorp.services/golang@sha256:2a0bd53951c1b1746c5adab10e1db1495cc6f2da0a3d21818466265e34a78597 COPY . ./ ENV \ GOPATH= \ @@ -687,24 +687,24 @@ layers: builtin: LAYER_LIST: - type: base - name: 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16 - archive: .buildcache/archives/00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16.tar.gz + name: 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c + archive: .buildcache/archives/00-base-2017dceda969e0eab6fd00cab602c9a05538de9c.tar.gz circleci: CACHE_KEY_PREFIX_LIST: - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} childcount: 1 - depth: 1 final: false type: ui - id: 8f7be629bbc1c7ec7af40fb527b15c30d590b13a - name: 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a - parentname: 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16 + id: f43e20c1d27527cddb9fa2f5a08420e5058396f1 + name: 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 + parentname: 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c parenttype: base - parentid: ec5342e30fcbfeb5947252a8ea679fb281052d16 - cachekeyfile: .buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a + parentid: 2017dceda969e0eab6fd00cab602c9a05538de9c + cachekeyfile: .buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 sourceinclude: internal/ui/VERSION sourceexclude: "" - archivefile: .buildcache/archives/01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a.tar.gz + archivefile: .buildcache/archives/01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1.tar.gz dockerfile: | # syntax=docker.mirror.hashicorp.services/docker/dockerfile:1.1.7-experimental ARG BASE_IMAGE @@ -724,28 +724,28 @@ layers: builtin: LAYER_LIST: - type: ui - name: 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a - archive: .buildcache/archives/01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a.tar.gz + name: 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 + archive: .buildcache/archives/01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1.tar.gz - type: base - name: 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16 - archive: .buildcache/archives/00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16.tar.gz + name: 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c + archive: .buildcache/archives/00-base-2017dceda969e0eab6fd00cab602c9a05538de9c.tar.gz circleci: CACHE_KEY_PREFIX_LIST: - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} childcount: 1 - depth: 2 final: false type: go-modules - id: daaedd9766787e3ce8f199fada1cb849024e6ca3 - name: 02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3 - parentname: 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a + id: 0542ebe70aa49ea525c7cd85313d5ba08f90441e + name: 02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e + parentname: 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 parenttype: ui - parentid: 8f7be629bbc1c7ec7af40fb527b15c30d590b13a - cachekeyfile: .buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3 + parentid: f43e20c1d27527cddb9fa2f5a08420e5058396f1 + cachekeyfile: .buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e sourceinclude: go.mod go.sum */go.mod */go.sum sourceexclude: "" - archivefile: .buildcache/archives/02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3.tar.gz + archivefile: .buildcache/archives/02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e.tar.gz dockerfile: | # syntax=docker.mirror.hashicorp.services/docker/dockerfile:1.1.7-experimental ARG BASE_IMAGE @@ -756,32 +756,32 @@ layers: builtin: LAYER_LIST: - type: go-modules - name: 02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3 - archive: .buildcache/archives/02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3.tar.gz + name: 02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e + archive: .buildcache/archives/02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e.tar.gz - type: ui - name: 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a - archive: .buildcache/archives/01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a.tar.gz + name: 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 + archive: .buildcache/archives/01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1.tar.gz - type: base - name: 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16 - archive: .buildcache/archives/00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16.tar.gz + name: 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c + archive: .buildcache/archives/00-base-2017dceda969e0eab6fd00cab602c9a05538de9c.tar.gz circleci: CACHE_KEY_PREFIX_LIST: - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} childcount: 1 - depth: 3 final: true type: copy-source - id: 869b67a2513a6ba3e9d2991876cfaed368594ba1 - name: 03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1 - parentname: 02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3 + id: 5f13b2247825f6b1ba38bb75dd62a7a15469efe7 + name: 03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7 + parentname: 02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e parenttype: go-modules - parentid: daaedd9766787e3ce8f199fada1cb849024e6ca3 - cachekeyfile: .buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1 + parentid: 0542ebe70aa49ea525c7cd85313d5ba08f90441e + cachekeyfile: .buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7 sourceinclude: '*.go' sourceexclude: "" - archivefile: .buildcache/archives/03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1.tar.gz + archivefile: .buildcache/archives/03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7.tar.gz dockerfile: | # syntax=docker.mirror.hashicorp.services/docker/dockerfile:1.1.7-experimental ARG BASE_IMAGE @@ -791,21 +791,21 @@ layers: builtin: LAYER_LIST: - type: copy-source - name: 03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1 - archive: .buildcache/archives/03-copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1.tar.gz + name: 03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7 + archive: .buildcache/archives/03-copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7.tar.gz - type: go-modules - name: 02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3 - archive: .buildcache/archives/02-go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3.tar.gz + name: 02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e + archive: .buildcache/archives/02-go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e.tar.gz - type: ui - name: 01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a - archive: .buildcache/archives/01-ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a.tar.gz + name: 01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1 + archive: .buildcache/archives/01-ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1.tar.gz - type: base - name: 00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16 - archive: .buildcache/archives/00-base-ec5342e30fcbfeb5947252a8ea679fb281052d16.tar.gz + name: 00-base-2017dceda969e0eab6fd00cab602c9a05538de9c + archive: .buildcache/archives/00-base-2017dceda969e0eab6fd00cab602c9a05538de9c.tar.gz circleci: CACHE_KEY_PREFIX_LIST: - - copy-source_869b_{{checksum ".buildcache/cache-keys/copy-source-869b67a2513a6ba3e9d2991876cfaed368594ba1"}} - - go-modules_daae_{{checksum ".buildcache/cache-keys/go-modules-daaedd9766787e3ce8f199fada1cb849024e6ca3"}} - - ui_8f7b_{{checksum ".buildcache/cache-keys/ui-8f7be629bbc1c7ec7af40fb527b15c30d590b13a"}} - - base_ec53_{{checksum ".buildcache/cache-keys/base-ec5342e30fcbfeb5947252a8ea679fb281052d16"}} + - copy-source_5f13_{{checksum ".buildcache/cache-keys/copy-source-5f13b2247825f6b1ba38bb75dd62a7a15469efe7"}} + - go-modules_0542_{{checksum ".buildcache/cache-keys/go-modules-0542ebe70aa49ea525c7cd85313d5ba08f90441e"}} + - ui_f43e_{{checksum ".buildcache/cache-keys/ui-f43e20c1d27527cddb9fa2f5a08420e5058396f1"}} + - base_2017_{{checksum ".buildcache/cache-keys/base-2017dceda969e0eab6fd00cab602c9a05538de9c"}} childcount: 0 diff --git a/packages-oss.yml b/packages-oss.yml index f40201554..28b2445ed 100644 --- a/packages-oss.yml +++ b/packages-oss.yml @@ -10,7 +10,7 @@ config: inputs: defaults: PRODUCT_NAME: boundary - PRODUCT_VERSION: 0.6.1 + PRODUCT_VERSION: 0.6.2 BUILD_TAGS: ui CGO_ENABLED: 0 @@ -50,8 +50,8 @@ package-aliases: template: >- boundary/{{.BUNDLE_NAME}}/{{.BUNDLE_NAME}}_{{.GOOS}}_{{.GOARCH}}.zip -# golang:1.16.7-buster -base-image: "docker.mirror.hashicorp.services/golang@sha256:448a13037d13401ad9b31fabf91d6b8a3c5c35d336cc8af760b2ab4ed85d4155" +# golang:1.17.1-buster +base-image: "docker.mirror.hashicorp.services/golang@sha256:2a0bd53951c1b1746c5adab10e1db1495cc6f2da0a3d21818466265e34a78597" layers: - name: base diff --git a/sdk/go.mod b/sdk/go.mod index 0bd8bbd26..197901e1d 100644 --- a/sdk/go.mod +++ b/sdk/go.mod @@ -3,10 +3,35 @@ module github.com/hashicorp/boundary/sdk go 1.15 require ( + github.com/fatih/color v1.12.0 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.6 // indirect + github.com/hashicorp/eventlogger v0.1.0 + github.com/hashicorp/eventlogger/filters/encrypt v0.1.3 + github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-kms-wrapping v0.6.6 + github.com/hashicorp/go-retryablehttp v0.7.0 // indirect github.com/hashicorp/go-secure-stdlib/configutil v0.1.2 github.com/hashicorp/go-secure-stdlib/strutil v0.1.1 + github.com/json-iterator/go v1.1.10 // indirect + github.com/kr/pretty v0.2.1 // indirect + github.com/mattn/go-isatty v0.0.13 // indirect + github.com/posener/complete v1.2.3 // indirect + github.com/smartystreets/assertions v1.0.0 // indirect + github.com/smartystreets/goconvey v1.6.4 // indirect + github.com/stretchr/objx v0.2.0 // indirect github.com/stretchr/testify v1.7.0 + go.opencensus.io v0.22.6 // indirect + golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 // indirect + golang.org/x/net v0.0.0-20210510120150-4163338589ed // indirect + golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93 // indirect + golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect + golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect + golang.org/x/tools v0.1.3 // indirect + google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6 // indirect google.golang.org/grpc v1.40.0 google.golang.org/protobuf v1.27.1 + gopkg.in/ini.v1 v1.51.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/sdk/go.sum b/sdk/go.sum index 57823026c..e2de2fcfe 100644 --- a/sdk/go.sum +++ b/sdk/go.sum @@ -9,19 +9,29 @@ cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.56.0 h1:WRz29PgAsVEyPSDHyk+0fpEkwEFyfhHn+JbksT6gIL4= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0 h1:Dg9iHVQfrhq82rUNu9ZxUDrJLaxFUe/HlCVaLyRruq8= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v36.2.0+incompatible h1:09cv2WoH0g6jl6m2iT+R9qcIPZKhXEL0sbmLhxP895s= github.com/Azure/azure-sdk-for-go v36.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= @@ -133,8 +143,9 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc= +github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/frankban/quicktest v1.10.0 h1:Gfh+GAJZOAoKZsIZeZbdn2JF10kN1XHNvjsvQK8gVkE= github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= @@ -153,8 +164,9 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/go-test/deep v1.0.2 h1:onZX1rnHT3Wv6cqNgYyFOOlgVKJrksuCMCRvJStbMYw= github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/go-test/deep v1.0.4 h1:u2CU3YKy9I2pmu9pX0eq50wCgjfGIt539SqR7FbHiho= +github.com/go-test/deep v1.0.4/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= @@ -169,11 +181,14 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -183,8 +198,9 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0 h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -193,16 +209,24 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= @@ -217,9 +241,14 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFb github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/eventlogger v0.1.0 h1:S6xc4gZVzewuDUP4R4Ngko419h/CGDuV/b4ADL3XLik= +github.com/hashicorp/eventlogger v0.1.0/go.mod h1:a3IXf1aEJfpCPzseTOrwKj4fVW/Qn3oEmpQeaIznzH0= +github.com/hashicorp/eventlogger/filters/encrypt v0.1.3 h1:RKYUGplnpDoE/Cj2vupQqUJS/wWBVvmpxEYeEpGL88s= +github.com/hashicorp/eventlogger/filters/encrypt v0.1.3/go.mod h1:8rcez7Kw1zanB0/074qnOuGu7zxmNh9Xr2ZI+K4xVIA= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= @@ -229,6 +258,7 @@ github.com/hashicorp/go-hclog v0.16.2 h1:K4ev2ib4LdQETX5cSZBG0DVLk1jwGqSPXBjdah3 github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.1.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-kms-wrapping v0.6.4/go.mod h1:pRK4UPSmNLEAjLE2qVz7nvS4NTZyyypQCn2G4q7vkps= github.com/hashicorp/go-kms-wrapping v0.6.5/go.mod h1:9aLqFi2fqK1WMCyTe9bVjB0X6XxCxD+oINL1ovxpgJE= github.com/hashicorp/go-kms-wrapping v0.6.6 h1:S2lw/8CFAw5kcztPD9iABG8ekjOs5san9C2oZrY6Syw= github.com/hashicorp/go-kms-wrapping v0.6.6/go.mod h1:9aLqFi2fqK1WMCyTe9bVjB0X6XxCxD+oINL1ovxpgJE= @@ -240,13 +270,16 @@ github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9 github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.6.2/go.mod h1:gEx6HMUGxYYhJScX7W1Il64m6cc2C1mDaW3NQ9sY1FY= -github.com/hashicorp/go-retryablehttp v0.6.6 h1:HJunrbHTDDbBb/ay4kxa1n+dLmttUlnP3V9oNE4hmsM= github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= +github.com/hashicorp/go-retryablehttp v0.7.0 h1:eu1EI/mbirUgP5C8hVsTNaGZreBDlYiwC1FZWkvQPQ4= +github.com/hashicorp/go-retryablehttp v0.7.0/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-secure-stdlib/awsutil v0.1.1/go.mod h1:QRJZ7siKie+SZJB9jLbfKrs0Gd0yPWMtbneg0iU1PrY= github.com/hashicorp/go-secure-stdlib/awsutil v0.1.2 h1:AEcLbDoaRC9JMmtZXsuCykztH53rvHsQFnwhoKtpNQM= github.com/hashicorp/go-secure-stdlib/awsutil v0.1.2/go.mod h1:QRJZ7siKie+SZJB9jLbfKrs0Gd0yPWMtbneg0iU1PrY= +github.com/hashicorp/go-secure-stdlib/base62 v0.1.1/go.mod h1:EdWO6czbmthiwZ3/PUsDV+UD1D5IRU4ActiaWGwt0Yw= github.com/hashicorp/go-secure-stdlib/configutil v0.1.2 h1:ai0P91rxlyGWkYUH/zFr7mduW2Q+2FMrXawkLM8e7NU= github.com/hashicorp/go-secure-stdlib/configutil v0.1.2/go.mod h1:EN1DJMjv9y5e/uRAuP2WPibAox5KHEiq2BjZl00aNPQ= github.com/hashicorp/go-secure-stdlib/listenerutil v0.1.1 h1:HlTofNQN49DTzPCMVDppp+AVxMNVWaHUElpUYC0TRRE= @@ -293,8 +326,9 @@ github.com/jmespath/go-jmespath v0.3.0 h1:OS12ieG61fsCg5+qLJ+SsW9NicxNkg3b25OyT2 github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= @@ -306,27 +340,31 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1yA= +github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.2 h1:PvH+lL2B7IQ101xQL63Of8yFS2y+aDlsFcsqNc+u/Kw= github.com/mitchellh/cli v1.1.2/go.mod h1:6iaV0fGdElS6dPBx0EApTxHrcWvmJphyh2n8YBLPPZ4= -github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= @@ -336,8 +374,11 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= +github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= +github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -370,8 +411,9 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= @@ -390,6 +432,7 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= @@ -398,18 +441,21 @@ github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvH github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a h1:pa8hGb/2YqsZKovtsgrwcDH1RZhVbTKCjLp47XpqCDs= +github.com/smartystreets/assertions v1.0.0 h1:UVQPSSmc3qtTi+zPPkCXvZX9VvW/xT/NsRvKfwY81a8= +github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -423,13 +469,21 @@ github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ github.com/yandex-cloud/go-genproto v0.0.0-20200722140432-762fe965ce77/go.mod h1:HEUYX/p8966tMUHHT+TsS0hF/Ca/NYwqprC5WXSDMfE= github.com/yandex-cloud/go-sdk v0.0.0-20200722140627-2194e5077f13/go.mod h1:LEdAMqa1v/7KYe4b13ALLkonuDxLph57ibUb50ctvJk= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.6 h1:BdkrbWrzDlV9dnbzoP7sfN+dHheJ4J9JOaYxcUDL+ok= +go.opencensus.io v0.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/goleak v1.0.0 h1:qsup4IcBdlmsnGfqyLl4Ntn3C2XCCuKAE7DwHpScyUo= +go.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -440,8 +494,9 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a h1:vclmkQCjlDX5OydZ9wv8rBCcS0QyQY66Mpf/7BZbInM= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 h1:/UOmuWzQfxxo9UtlXMwuQU8CMgg1eZXqTRwkSQJWKOI= +golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -463,6 +518,7 @@ golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= @@ -471,6 +527,10 @@ golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -485,6 +545,7 @@ golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -493,17 +554,30 @@ golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200320220750-118fecf932d8/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210510120150-4163338589ed h1:p9UgmWI9wKpfYmgaV/IZKGdXc5qEK45tDwwwDyjS26I= +golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93 h1:alLDrZkL34Y2bnGHfvC1CYBRBXCXgx8AC2vY4MRtYX4= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -511,6 +585,9 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -540,20 +617,37 @@ golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980 h1:OjiUf46hAmXblsZdnoSXsEUSKU8r1UEzcL5RVZ4gO9Y= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 h1:NusfzzA6yGQ+ua51ck7E3omNUX/JuqbFSaRGqU8CcLI= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjToGsyY4j24pTs2ScHnX7s= +golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -574,6 +668,7 @@ golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -588,7 +683,20 @@ golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20210101214203-2dba1e4ea05c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.3 h1:L69ShwSZEyCsLKoAxDKeMvLDZkumEe8gXUZAjab0tX8= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -603,15 +711,21 @@ google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsb google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0 h1:cG03eaksBzhfSIk7JRGctfp3lanklcOM/mTGvow7BbQ= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0 h1:yfrXXP61wVuLb0vBcG6qaOoIoqYEzOQS8jum51jkv2w= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -629,11 +743,22 @@ google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200323114720-3f67cca34472/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6 h1:4Xw2NwItrJOFR5s6PnK98PI6Bgw1LhMP1j/rO5WP0S4= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -647,7 +772,10 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0 h1:AGJ0Ih4mHjSeibYkFGh1dD9KJ/eOtZ93I6hoHhukQ5Q= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= @@ -659,8 +787,10 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= @@ -672,8 +802,9 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/ini.v1 v1.42.0 h1:7N3gPTt50s8GuLortA00n8AqRTk75qOP98+mTPpgzRk= gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w= gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= @@ -684,10 +815,12 @@ gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -696,6 +829,8 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +mvdan.cc/gofumpt v0.1.1/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/sdk/pbs/controller/api/resources/authmethods/auth_method.pb.go b/sdk/pbs/controller/api/resources/authmethods/auth_method.pb.go index c5a8220a3..24176d980 100644 --- a/sdk/pbs/controller/api/resources/authmethods/auth_method.pb.go +++ b/sdk/pbs/controller/api/resources/authmethods/auth_method.pb.go @@ -32,31 +32,31 @@ type AuthMethod struct { unknownFields protoimpl.UnknownFields // Output only. The ID of the Auth Method. - Id string `protobuf:"bytes,10,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,10,opt,name=id,proto3" json:"id,omitempty" class:"public"` // @gotags: `class:"public"` // The ID of the Scope of which this Auth Method is a part. - ScopeId string `protobuf:"bytes,20,opt,name=scope_id,proto3" json:"scope_id,omitempty"` + ScopeId string `protobuf:"bytes,20,opt,name=scope_id,proto3" json:"scope_id,omitempty" class:"public"` // @gotags: `class:"public"` // Output only. Scope information for this Auth method. - Scope *scopes.ScopeInfo `protobuf:"bytes,30,opt,name=scope,proto3" json:"scope,omitempty"` + Scope *scopes.ScopeInfo `protobuf:"bytes,30,opt,name=scope,proto3" json:"scope,omitempty" class:"public"` // @gotags: `class:"public"` // Optional name for identification purposes. - Name *wrapperspb.StringValue `protobuf:"bytes,40,opt,name=name,proto3" json:"name,omitempty"` + Name *wrapperspb.StringValue `protobuf:"bytes,40,opt,name=name,proto3" json:"name,omitempty" class:"public"` // @gotags: `class:"public"` // Optional user-set description for identification purposes. - Description *wrapperspb.StringValue `protobuf:"bytes,50,opt,name=description,proto3" json:"description,omitempty"` + Description *wrapperspb.StringValue `protobuf:"bytes,50,opt,name=description,proto3" json:"description,omitempty" class:"public"` // @gotags: `class:"public"` // Output only. The time this resource was created. - CreatedTime *timestamppb.Timestamp `protobuf:"bytes,60,opt,name=created_time,proto3" json:"created_time,omitempty"` + CreatedTime *timestamppb.Timestamp `protobuf:"bytes,60,opt,name=created_time,proto3" json:"created_time,omitempty" class:"public"` // @gotags: `class:"public"` // Output only. The time this resource was last updated. - UpdatedTime *timestamppb.Timestamp `protobuf:"bytes,70,opt,name=updated_time,proto3" json:"updated_time,omitempty"` + UpdatedTime *timestamppb.Timestamp `protobuf:"bytes,70,opt,name=updated_time,proto3" json:"updated_time,omitempty" class:"public"` // @gotags: `class:"public"` // Version is used in mutation requests, after the initial creation, to ensure this resource has not changed. // The mutation will fail if the version does not match the latest known good version. - Version uint32 `protobuf:"varint,80,opt,name=version,proto3" json:"version,omitempty"` + Version uint32 `protobuf:"varint,80,opt,name=version,proto3" json:"version,omitempty" class:"public"` // @gotags: `class:"public"` // The Auth Method type. - Type string `protobuf:"bytes,90,opt,name=type,proto3" json:"type,omitempty"` + Type string `protobuf:"bytes,90,opt,name=type,proto3" json:"type,omitempty" class:"public"` // @gotags: `class:"public"` // The attributes that are applicable for the specific Auth Method type. Attributes *structpb.Struct `protobuf:"bytes,100,opt,name=attributes,proto3" json:"attributes,omitempty"` // Output only. Whether this auth method is the primary auth method for it's scope. // To change this value update the primary_auth_method_id field on the scope. - IsPrimary bool `protobuf:"varint,110,opt,name=is_primary,proto3" json:"is_primary,omitempty"` + IsPrimary bool `protobuf:"varint,110,opt,name=is_primary,proto3" json:"is_primary,omitempty" class:"public"` // @gotags: `class:"public"` // Output only. The available actions on this resource for this user. - AuthorizedActions []string `protobuf:"bytes,300,rep,name=authorized_actions,proto3" json:"authorized_actions,omitempty"` + AuthorizedActions []string `protobuf:"bytes,300,rep,name=authorized_actions,proto3" json:"authorized_actions,omitempty" class:"public"` // @gotags: `class:"public"` // Output only. The authorized actions for the scope's collections. AuthorizedCollectionActions map[string]*structpb.ListValue `protobuf:"bytes,310,rep,name=authorized_collection_actions,proto3" json:"authorized_collection_actions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } diff --git a/sdk/pbs/controller/api/resources/authmethods/auth_method_taggable.go b/sdk/pbs/controller/api/resources/authmethods/auth_method_taggable.go new file mode 100644 index 000000000..26c729eac --- /dev/null +++ b/sdk/pbs/controller/api/resources/authmethods/auth_method_taggable.go @@ -0,0 +1,98 @@ +package authmethods + +import ( + "fmt" + + "github.com/hashicorp/eventlogger/filters/encrypt" +) + +// Tags implements the encrypt.Taggable interface which allows +// AuthMethod map fields to be classified for the encrypt filter. +func (req *AuthMethod) Tags() ([]encrypt.PointerTag, error) { + tags := make([]encrypt.PointerTag, 0, len(req.AuthorizedCollectionActions)) + for k := range req.AuthorizedCollectionActions { + tags = append(tags, encrypt.PointerTag{ + Pointer: fmt.Sprintf("/AuthorizedCollectionActions/%s", k), + Classification: encrypt.PublicClassification, + }) + } + if req.Attributes != nil { + switch req.Type { + case "oidc": + oidcTags := []encrypt.PointerTag{ + // public fields + { + Pointer: "/Attributes/Fields/state", + Classification: encrypt.PublicClassification, + }, + { + Pointer: "/Attributes/Fields/issuer", + Classification: encrypt.PublicClassification, + }, + { + Pointer: "/Attributes/Fields/client_id", + Classification: encrypt.PublicClassification, + }, + { + Pointer: "/Attributes/Fields/client_secret_hmac", + Classification: encrypt.PublicClassification, + }, + { + Pointer: "/Attributes/Fields/max_age", + Classification: encrypt.PublicClassification, + }, + { + Pointer: "/Attributes/Fields/signing_algorithms", + Classification: encrypt.PublicClassification, + }, + { + Pointer: "/Attributes/Fields/api_url_prefix", + Classification: encrypt.PublicClassification, + }, + { + Pointer: "/Attributes/Fields/callback_url", + Classification: encrypt.PublicClassification, + }, + { + Pointer: "/Attributes/Fields/allowed_audiences", + Classification: encrypt.PublicClassification, + }, + { + Pointer: "/Attributes/Fields/claims_scopes", + Classification: encrypt.PublicClassification, + }, + { + Pointer: "/Attributes/Fields/account_claim_maps", + Classification: encrypt.PublicClassification, + }, + { + Pointer: "/Attributes/Fields/disable_discovered_config_validation", + Classification: encrypt.PublicClassification, + }, + { + Pointer: "/Attributes/Fields/dry_run", + Classification: encrypt.PublicClassification, + }, + // secrets + { + Pointer: "/Attributes/Fields/client_secret", + Classification: encrypt.SecretClassification, + }, + } + tags = append(tags, oidcTags...) + case "password": + pwTags := []encrypt.PointerTag{ + { + Pointer: "/Attributes/Fields/min_login_name_length", + Classification: encrypt.PublicClassification, + }, + { + Pointer: "/Attributes/Fields/min_password_length", + Classification: encrypt.PublicClassification, + }, + } + tags = append(tags, pwTags...) + } + } + return tags, nil +} diff --git a/sdk/pbs/controller/api/resources/authmethods/auth_method_taggable_test.go b/sdk/pbs/controller/api/resources/authmethods/auth_method_taggable_test.go new file mode 100644 index 000000000..865deab88 --- /dev/null +++ b/sdk/pbs/controller/api/resources/authmethods/auth_method_taggable_test.go @@ -0,0 +1,183 @@ +package authmethods + +import ( + "context" + "encoding/json" + "testing" + "time" + + "github.com/hashicorp/boundary/sdk/wrapper" + "github.com/hashicorp/eventlogger" + "github.com/hashicorp/eventlogger/filters/encrypt" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/types/known/structpb" + "google.golang.org/protobuf/types/known/wrapperspb" +) + +func TestAuthMethod_Tags(t *testing.T) { + ctx := context.Background() + now := time.Now() + wrapper := wrapper.TestWrapper(t) + testEncryptingFilter := &encrypt.Filter{ + Wrapper: wrapper, + HmacSalt: []byte("salt"), + HmacInfo: []byte("info"), + } + + tests := []struct { + name string + testEvent *eventlogger.Event + wantEvent *eventlogger.Event + }{ + { + name: "validate-oidc-filtering", + testEvent: &eventlogger.Event{ + Type: "test", + CreatedAt: now, + Payload: &AuthMethod{ + Id: "id", + ScopeId: "scope-id", + Name: &wrapperspb.StringValue{Value: "name"}, + Description: &wrapperspb.StringValue{Value: "description"}, + Type: "oidc", + Attributes: &structpb.Struct{ + Fields: map[string]*structpb.Value{ + "state": structpb.NewStringValue("public-state"), + "issuer": structpb.NewStringValue("public-issuer"), + "client_id": structpb.NewStringValue("public-client_id"), + "client_secret_hmac": structpb.NewStringValue("public-client_secret_hmac"), + "max_age": structpb.NewStringValue("public-max_age"), + "signing_algorithms": structpb.NewStringValue("public-signing_algorithms"), + "api_url_prefix": structpb.NewStringValue("public-api_url_prefix"), + "callback_url": structpb.NewStringValue("public-callback_url"), + "allowed_audiences": structpb.NewStringValue("public-allowed_audiences"), + "claims_scopes": structpb.NewStringValue("public-claims_scopes"), + "account_claim_maps": structpb.NewStringValue("public-account_claim_maps"), + "disable_discovered_config_validation": structpb.NewStringValue("public-disable_discovered_config_validation"), + "dry_run": structpb.NewStringValue("public-dry_run"), + "client_secret": structpb.NewStringValue("secret-client_secret"), + }, + }, + AuthorizedActions: []string{"action-1", "action-2"}, + AuthorizedCollectionActions: map[string]*structpb.ListValue{ + "auth-methods": { + Values: []*structpb.Value{ + structpb.NewStringValue("create"), + structpb.NewStringValue("list"), + }, + }, + }, + }, + }, + wantEvent: &eventlogger.Event{ + Type: "test", + CreatedAt: now, + Payload: &AuthMethod{ + Id: "id", + ScopeId: "scope-id", + Name: &wrapperspb.StringValue{Value: "name"}, + Description: &wrapperspb.StringValue{Value: "description"}, + Type: "oidc", + Attributes: &structpb.Struct{ + Fields: map[string]*structpb.Value{ + "state": structpb.NewStringValue("public-state"), + "issuer": structpb.NewStringValue("public-issuer"), + "client_id": structpb.NewStringValue("public-client_id"), + "client_secret_hmac": structpb.NewStringValue("public-client_secret_hmac"), + "max_age": structpb.NewStringValue("public-max_age"), + "signing_algorithms": structpb.NewStringValue("public-signing_algorithms"), + "api_url_prefix": structpb.NewStringValue("public-api_url_prefix"), + "callback_url": structpb.NewStringValue("public-callback_url"), + "allowed_audiences": structpb.NewStringValue("public-allowed_audiences"), + "claims_scopes": structpb.NewStringValue("public-claims_scopes"), + "account_claim_maps": structpb.NewStringValue("public-account_claim_maps"), + "disable_discovered_config_validation": structpb.NewStringValue("public-disable_discovered_config_validation"), + "dry_run": structpb.NewStringValue("public-dry_run"), + "client_secret": structpb.NewStringValue(""), + }, + }, + AuthorizedActions: []string{"action-1", "action-2"}, + AuthorizedCollectionActions: map[string]*structpb.ListValue{ + "auth-methods": { + Values: []*structpb.Value{ + structpb.NewStringValue("create"), + structpb.NewStringValue("list"), + }, + }, + }, + }, + }, + }, + { + name: "validate-password-filtering", + testEvent: &eventlogger.Event{ + Type: "test", + CreatedAt: now, + Payload: &AuthMethod{ + Id: "id", + ScopeId: "scope-id", + Name: &wrapperspb.StringValue{Value: "name"}, + Description: &wrapperspb.StringValue{Value: "description"}, + Type: "oidc", + Attributes: &structpb.Struct{ + Fields: map[string]*structpb.Value{ + "min_login_name_length": structpb.NewStringValue("public-min_login_name_length"), + "min_password_length": structpb.NewStringValue("public-min_password_length"), + }, + }, + AuthorizedActions: []string{"action-1", "action-2"}, + AuthorizedCollectionActions: map[string]*structpb.ListValue{ + "auth-methods": { + Values: []*structpb.Value{ + structpb.NewStringValue("create"), + structpb.NewStringValue("list"), + }, + }, + }, + }, + }, + wantEvent: &eventlogger.Event{ + Type: "test", + CreatedAt: now, + Payload: &AuthMethod{ + Id: "id", + ScopeId: "scope-id", + Name: &wrapperspb.StringValue{Value: "name"}, + Description: &wrapperspb.StringValue{Value: "description"}, + Type: "oidc", + Attributes: &structpb.Struct{ + Fields: map[string]*structpb.Value{ + "min_login_name_length": structpb.NewStringValue("public-min_login_name_length"), + "min_password_length": structpb.NewStringValue("public-min_password_length"), + }, + }, + AuthorizedActions: []string{"action-1", "action-2"}, + AuthorizedCollectionActions: map[string]*structpb.ListValue{ + "auth-methods": { + Values: []*structpb.Value{ + structpb.NewStringValue("create"), + structpb.NewStringValue("list"), + }, + }, + }, + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert, require := assert.New(t), require.New(t) + got, err := testEncryptingFilter.Process(ctx, tt.testEvent) + require.NoError(err) + require.NotNil(got) + actualJson, err := json.Marshal(got) + require.NoError(err) + t.Log(string(actualJson)) + + wantJson, err := json.Marshal(tt.wantEvent) + require.NoError(err) + assert.JSONEq(string(wantJson), string(actualJson)) + }) + } +} diff --git a/sdk/pbs/controller/api/resources/scopes/scope.pb.go b/sdk/pbs/controller/api/resources/scopes/scope.pb.go index f9765e66b..9cb8291b1 100644 --- a/sdk/pbs/controller/api/resources/scopes/scope.pb.go +++ b/sdk/pbs/controller/api/resources/scopes/scope.pb.go @@ -30,15 +30,15 @@ type ScopeInfo struct { unknownFields protoimpl.UnknownFields // Output only. The ID of the Scope. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" class:"public"` // @gotags: `class:"public"` // Output only. The type of the Scope. - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty" class:"public"` // @gotags: `class:"public"` // Output only. The name of the Scope, if any. - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty" class:"public"` // @gotags: `class:"public"` // Output only. The description of the Scope, if any. - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty" class:"public"` // @gotags: `class:"public"` // Output only. The ID of the parent Scope, if any. This field will be empty if this is the "global" scope. - ParentScopeId string `protobuf:"bytes,5,opt,name=parent_scope_id,proto3" json:"parent_scope_id,omitempty"` + ParentScopeId string `protobuf:"bytes,5,opt,name=parent_scope_id,proto3" json:"parent_scope_id,omitempty" class:"public"` // @gotags: `class:"public"` } func (x *ScopeInfo) Reset() { @@ -115,29 +115,29 @@ type Scope struct { unknownFields protoimpl.UnknownFields // Output only. The ID of the Scope. - Id string `protobuf:"bytes,10,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,10,opt,name=id,proto3" json:"id,omitempty" class:"public"` // @gotags: `class:"public"` // The ID of the Scope this resource is in. If this is the "global" Scope this field will be empty. - ScopeId string `protobuf:"bytes,20,opt,name=scope_id,proto3" json:"scope_id,omitempty"` + ScopeId string `protobuf:"bytes,20,opt,name=scope_id,proto3" json:"scope_id,omitempty" class:"public"` // @gotags: `class:"public"` // Output only. Scope information for this resource. Scope *ScopeInfo `protobuf:"bytes,30,opt,name=scope,proto3" json:"scope,omitempty"` // Optional name for identification purposes. - Name *wrapperspb.StringValue `protobuf:"bytes,40,opt,name=name,proto3" json:"name,omitempty"` + Name *wrapperspb.StringValue `protobuf:"bytes,40,opt,name=name,proto3" json:"name,omitempty" class:"public"` // @gotags: `class:"public"` // Optional user-set descripton for identification purposes. - Description *wrapperspb.StringValue `protobuf:"bytes,50,opt,name=description,proto3" json:"description,omitempty"` + Description *wrapperspb.StringValue `protobuf:"bytes,50,opt,name=description,proto3" json:"description,omitempty" class:"public"` // @gotags: `class:"public"` // Output only. The time this resource was created. - CreatedTime *timestamppb.Timestamp `protobuf:"bytes,60,opt,name=created_time,proto3" json:"created_time,omitempty"` + CreatedTime *timestamppb.Timestamp `protobuf:"bytes,60,opt,name=created_time,proto3" json:"created_time,omitempty" class:"public"` // @gotags: `class:"public"` // Output only. The time this resource was last updated. - UpdatedTime *timestamppb.Timestamp `protobuf:"bytes,70,opt,name=updated_time,proto3" json:"updated_time,omitempty"` + UpdatedTime *timestamppb.Timestamp `protobuf:"bytes,70,opt,name=updated_time,proto3" json:"updated_time,omitempty" class:"public"` // @gotags: `class:"public"` // Version is used in mutation requests, after the initial creation, to ensure this resource has not changed. // The mutation will fail if the version does not match the latest known good version. - Version uint32 `protobuf:"varint,80,opt,name=version,proto3" json:"version,omitempty"` + Version uint32 `protobuf:"varint,80,opt,name=version,proto3" json:"version,omitempty" class:"public"` // @gotags: `class:"public"` // The type of the resource. - Type string `protobuf:"bytes,90,opt,name=type,proto3" json:"type,omitempty"` + Type string `protobuf:"bytes,90,opt,name=type,proto3" json:"type,omitempty" class:"public"` // @gotags: `class:"public"` // The ID of the primary auth method for this scope. A primary auth method // is allowed to vivify users when new accounts are created and is the source for the users account info - PrimaryAuthMethodId *wrapperspb.StringValue `protobuf:"bytes,100,opt,name=primary_auth_method_id,proto3" json:"primary_auth_method_id,omitempty"` + PrimaryAuthMethodId *wrapperspb.StringValue `protobuf:"bytes,100,opt,name=primary_auth_method_id,proto3" json:"primary_auth_method_id,omitempty" class:"public"` // @gotags: `class:"public"` // Output only. The available actions on this resource for this user. - AuthorizedActions []string `protobuf:"bytes,300,rep,name=authorized_actions,proto3" json:"authorized_actions,omitempty"` + AuthorizedActions []string `protobuf:"bytes,300,rep,name=authorized_actions,proto3" json:"authorized_actions,omitempty" class:"public"` // @gotags: `class:"public"` // Output only. The authorized actions for the scope's collections. AuthorizedCollectionActions map[string]*structpb.ListValue `protobuf:"bytes,310,rep,name=authorized_collection_actions,proto3" json:"authorized_collection_actions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } diff --git a/sdk/pbs/controller/api/resources/scopes/scope_taggable.go b/sdk/pbs/controller/api/resources/scopes/scope_taggable.go new file mode 100644 index 000000000..06271a2c4 --- /dev/null +++ b/sdk/pbs/controller/api/resources/scopes/scope_taggable.go @@ -0,0 +1,20 @@ +package scopes + +import ( + "fmt" + + "github.com/hashicorp/eventlogger/filters/encrypt" +) + +// Tags implements the encrypt.Taggable interface which allows +// Scope map fields to be classified for the encrypt filter. +func (req *Scope) Tags() ([]encrypt.PointerTag, error) { + tags := make([]encrypt.PointerTag, 0, len(req.AuthorizedCollectionActions)) + for k := range req.AuthorizedCollectionActions { + tags = append(tags, encrypt.PointerTag{ + Pointer: fmt.Sprintf("/AuthorizedCollectionActions/%s", k), + Classification: encrypt.PublicClassification, + }) + } + return tags, nil +} diff --git a/sdk/pbs/controller/api/resources/scopes/scope_taggable_test.go b/sdk/pbs/controller/api/resources/scopes/scope_taggable_test.go new file mode 100644 index 000000000..fdb31b0b8 --- /dev/null +++ b/sdk/pbs/controller/api/resources/scopes/scope_taggable_test.go @@ -0,0 +1,94 @@ +package scopes + +import ( + "context" + "encoding/json" + "testing" + "time" + + "github.com/hashicorp/boundary/sdk/wrapper" + "github.com/hashicorp/eventlogger" + "github.com/hashicorp/eventlogger/filters/encrypt" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/types/known/structpb" + "google.golang.org/protobuf/types/known/wrapperspb" +) + +func TestScope_Tags(t *testing.T) { + ctx := context.Background() + now := time.Now() + wrapper := wrapper.TestWrapper(t) + testEncryptingFilter := &encrypt.Filter{ + Wrapper: wrapper, + HmacSalt: []byte("salt"), + HmacInfo: []byte("info"), + } + + tests := []struct { + name string + testEvent *eventlogger.Event + wantEvent *eventlogger.Event + }{ + { + name: "validate-filtering", + testEvent: &eventlogger.Event{ + Type: "test", + CreatedAt: now, + Payload: &Scope{ + Id: "id", + ScopeId: "scope-id", + Name: &wrapperspb.StringValue{Value: "name"}, + Description: &wrapperspb.StringValue{Value: "description"}, + Type: "type", + PrimaryAuthMethodId: &wrapperspb.StringValue{Value: "primary-auth-method-id"}, + AuthorizedActions: []string{"action-1", "action-2"}, + AuthorizedCollectionActions: map[string]*structpb.ListValue{ + "auth-methods": { + Values: []*structpb.Value{ + structpb.NewStringValue("create"), + structpb.NewStringValue("list"), + }, + }, + }, + }, + }, + wantEvent: &eventlogger.Event{ + Type: "test", + CreatedAt: now, + Payload: &Scope{ + Id: "id", + ScopeId: "scope-id", + Name: &wrapperspb.StringValue{Value: "name"}, + Description: &wrapperspb.StringValue{Value: "description"}, + Type: "type", + PrimaryAuthMethodId: &wrapperspb.StringValue{Value: "primary-auth-method-id"}, + AuthorizedActions: []string{"action-1", "action-2"}, + AuthorizedCollectionActions: map[string]*structpb.ListValue{ + "auth-methods": { + Values: []*structpb.Value{ + structpb.NewStringValue("create"), + structpb.NewStringValue("list"), + }, + }, + }, + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert, require := assert.New(t), require.New(t) + got, err := testEncryptingFilter.Process(ctx, tt.testEvent) + require.NoError(err) + require.NotNil(got) + actualJson, err := json.Marshal(got) + require.NoError(err) + t.Log(string(actualJson)) + + wantJson, err := json.Marshal(tt.wantEvent) + require.NoError(err) + assert.JSONEq(string(wantJson), string(actualJson)) + }) + } +} diff --git a/sdk/wrapper/testing.go b/sdk/wrapper/testing.go new file mode 100644 index 000000000..f44b2921d --- /dev/null +++ b/sdk/wrapper/testing.go @@ -0,0 +1,33 @@ +package wrapper + +import ( + "crypto/rand" + "encoding/base64" + "testing" + + wrapping "github.com/hashicorp/go-kms-wrapping" + "github.com/hashicorp/go-kms-wrapping/wrappers/aead" +) + +// TestWrapper initializes an AEAD wrapping.Wrapper for testing +func TestWrapper(t *testing.T) wrapping.Wrapper { + rootKey := make([]byte, 32) + n, err := rand.Read(rootKey) + if err != nil { + t.Fatal(err) + } + if n != 32 { + t.Fatal(n) + } + root := aead.NewWrapper(nil) + _, err = root.SetConfig(map[string]string{ + "key_id": base64.StdEncoding.EncodeToString(rootKey), + }) + if err != nil { + t.Fatal(err) + } + if err := root.SetAESGCMKeyBytes(rootKey); err != nil { + t.Fatal(err) + } + return root +} diff --git a/testing/dbtest/docs.go b/testing/dbtest/docs.go index ada0d0321..546d004b4 100644 --- a/testing/dbtest/docs.go +++ b/testing/dbtest/docs.go @@ -12,7 +12,7 @@ // require.NoError(t, c()) // }) // // use u to get a connection to the new database -// dBase, err := sql.Open("postgres", u) +// dBase, err := common.SqlOpen("postgres", u) // // By default this uses a template that already has all of the boundary // migrations run. If a test needs a database without any migrations, like in diff --git a/testing/dbtest/template.go b/testing/dbtest/template.go index d7ecd88da..5a3a9892e 100644 --- a/testing/dbtest/template.go +++ b/testing/dbtest/template.go @@ -1,14 +1,15 @@ package dbtest import ( - "database/sql" "fmt" "math/rand" "os" "time" // postgres dialect - _ "github.com/lib/pq" + + "github.com/hashicorp/boundary/internal/db/common" + _ "github.com/jackc/pgx/v4/stdlib" ) var testDBPort = "5432" @@ -75,7 +76,10 @@ func startUsingTemplate(dialect string, opt ...Option) (cleanup func() error, re return func() error { return nil }, "", "", fmt.Errorf("unsupported dialect: %s", dialect) } - db, err := sql.Open(dialect, fmt.Sprintf("postgres://boundary:boundary@127.0.0.1:%s/boundary?sslmode=disable", testDBPort)) + if dialect == "postgres" { + dialect = "pgx" + } + db, err := common.SqlOpen(dialect, fmt.Sprintf("postgres://boundary:boundary@127.0.0.1:%s/boundary?sslmode=disable", testDBPort)) if err != nil { return func() error { return nil }, "", "", fmt.Errorf("could not connect to source database: %w", err) } @@ -103,7 +107,7 @@ func startUsingTemplate(dialect string, opt ...Option) (cleanup func() error, re return dropDatabase(dialect, dbname) } - tdb, err := sql.Open(dialect, url) + tdb, err := common.SqlOpen(dialect, url) if err != nil { return func() error { return nil }, "", "", fmt.Errorf("could not create test database: %w", err) } @@ -130,7 +134,7 @@ func dropDatabase(dialect, dbname string) error { return fmt.Errorf("empty dbname") } - db, err := sql.Open(dialect, fmt.Sprintf("postgres://boundary:boundary@127.0.0.1:%s/boundary?sslmode=disable", testDBPort)) + db, err := common.SqlOpen(dialect, fmt.Sprintf("postgres://boundary:boundary@127.0.0.1:%s/boundary?sslmode=disable", testDBPort)) if err != nil { return err } diff --git a/testing/dbtest/template_test.go b/testing/dbtest/template_test.go index dcf305199..786edceae 100644 --- a/testing/dbtest/template_test.go +++ b/testing/dbtest/template_test.go @@ -1,10 +1,10 @@ package dbtest_test import ( - "database/sql" "errors" "testing" + "github.com/hashicorp/boundary/internal/db/common" "github.com/hashicorp/boundary/testing/dbtest" "github.com/stretchr/testify/require" ) @@ -56,7 +56,7 @@ func TestStartUsingTemplate(t *testing.T) { } else { require.NoError(t, err) - db, err := sql.Open(tt.dialect, u) + db, err := common.SqlOpen(tt.dialect, u) require.NoError(t, err) require.NoError(t, db.Ping()) db.Close() @@ -64,7 +64,7 @@ func TestStartUsingTemplate(t *testing.T) { require.NoError(t, c()) // ensure that database is gone after calling c - db, _ = sql.Open(tt.dialect, u) + db, _ = common.SqlOpen(tt.dialect, u) require.Error(t, db.Ping()) } }) diff --git a/tools/tools.go b/tools/tools.go index 3d29c1a44..a93a46d55 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -1,3 +1,4 @@ +//go:build tools // +build tools // This file ensures tool dependencies are kept in sync. This is the diff --git a/version/cgo.go b/version/cgo.go index 2ed493a1f..91d3dd97b 100644 --- a/version/cgo.go +++ b/version/cgo.go @@ -1,3 +1,4 @@ +//go:build cgo // +build cgo package version diff --git a/website/components/branded-cta/branded-cta.module.css b/website/components/branded-cta/branded-cta.module.css index 8a5a56de1..2ef985706 100644 --- a/website/components/branded-cta/branded-cta.module.css +++ b/website/components/branded-cta/branded-cta.module.css @@ -1,20 +1,16 @@ .brandedCta { padding: 88px 0; + background-image: url('/img/cta-bg.svg'); background-color: var(--boundary-secondary); - background-image: url('./img/bg-pattern.svg'); - background-position: bottom right; + background-position: bottom right -350px; background-repeat: no-repeat; - @media (--small) { - background-position: bottom 0 right -130px; + @media (--medium-up) { + background-position: bottom right -250px; } - @media (438px <= width < 600px) { - background-position: bottom 0 right -260px; - } - - @media (width < 438px) { - background-position: bottom 0 right -170px; + @media (--large) { + background-position: bottom right -150px; } } diff --git a/website/components/branded-cta/img/bg-pattern.svg b/website/components/branded-cta/img/bg-pattern.svg deleted file mode 100644 index ba1b8d186..000000000 --- a/website/components/branded-cta/img/bg-pattern.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/website/components/branded-cta/index.jsx b/website/components/branded-cta/index.jsx index 45153a47e..1d4318072 100644 --- a/website/components/branded-cta/index.jsx +++ b/website/components/branded-cta/index.jsx @@ -34,6 +34,7 @@ export default function BrandedCta({ heading, content, links }) { }} title={link.text} url={link.url} + icon={link.icon} /> ) })} diff --git a/website/components/homepage-hero/HomepageHero.module.css b/website/components/homepage-hero/HomepageHero.module.css index 1ff791961..9cc49d3e6 100644 --- a/website/components/homepage-hero/HomepageHero.module.css +++ b/website/components/homepage-hero/HomepageHero.module.css @@ -3,11 +3,11 @@ background-repeat: no-repeat; background-color: var(--boundary-secondary); background-image: url(/img/hero-pattern.svg); - background-position: bottom right; + background-position: bottom -50px right -100px; @media (max-width: 767px) { padding: 88px 0; - background-position: bottom 0 right -130px; + background-position: bottom -130px right -130px; } & :global(.g-hero) { diff --git a/website/components/how-boundary-works/index.jsx b/website/components/how-boundary-works/index.jsx new file mode 100644 index 000000000..8286c7f0a --- /dev/null +++ b/website/components/how-boundary-works/index.jsx @@ -0,0 +1,28 @@ +import s from './style.module.css' + +export default function HowBoundaryWorks({ heading, description, items, img }) { + return ( +
+
+
+

{heading}

+

{description}

+
    + {items.map((item, index) => { + // Index is stable + // eslint-disable-next-line react/no-array-index-key + return ( +
  • + {item} +
  • + ) + })} +
+
+
+ {img.alt} +
+
+
+ ) +} diff --git a/website/components/how-boundary-works/style.module.css b/website/components/how-boundary-works/style.module.css new file mode 100644 index 000000000..76d3e2c15 --- /dev/null +++ b/website/components/how-boundary-works/style.module.css @@ -0,0 +1,70 @@ +.root { + composes: g-grid-container from global; +} + +.inner { + --columns: 1; + + display: grid; + grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); + grid-gap: 48px 32px; + padding: 48px 32px; + background-color: var(--white); + box-shadow: 0 8px 12px rgba(37, 38, 45, 0.08); + border-radius: 1px; + + @media (--medium-up) { + --columns: 2; + + padding: 100px 75px; + } +} + +.heading { + margin: 0; + composes: g-type-display-3 from global; +} + +.description { + margin: 32px 0 0; + composes: g-type-body-small from global; +} + +.items { + list-style: none; + margin: 15px 0 0; + padding: 0; +} + +.item { + position: relative; + display: flex; + align-items: center; + padding-top: 24px; + padding-bottom: 24px; + color: var(--gray-2); + composes: g-type-display-5 from global; + + &::before { + content: ''; + flex-shrink: 0; + display: block; + margin-right: 20px; + width: 8px; + height: 8px; + border-radius: 9999px; + background-color: #c4c4c4; + } + + & + .item { + border-top: 2px solid var(--gray-6); + } +} + +.media { + align-self: center; + justify-self: center; + & img { + max-width: 100%; + } +} diff --git a/website/components/how-it-works/feature/feature.module.css b/website/components/how-it-works/feature/feature.module.css index a3edf3dd7..b841a38b1 100644 --- a/website/components/how-it-works/feature/feature.module.css +++ b/website/components/how-it-works/feature/feature.module.css @@ -6,4 +6,9 @@ & > p { margin-bottom: 32px; } + + & a { + color: inherit; + text-decoration: underline; + } } diff --git a/website/components/how-it-works/feature/index.jsx b/website/components/how-it-works/feature/index.jsx index 43b0d195d..79e621c5e 100644 --- a/website/components/how-it-works/feature/index.jsx +++ b/website/components/how-it-works/feature/index.jsx @@ -18,7 +18,7 @@ export default function Feature({ return (
-

{title}

+

{title}

{description}

{logos ? : null}
diff --git a/website/components/how-it-works/feature/logo-list/index.jsx b/website/components/how-it-works/feature/logo-list/index.jsx index 5d354906c..2e2d284c6 100644 --- a/website/components/how-it-works/feature/logo-list/index.jsx +++ b/website/components/how-it-works/feature/logo-list/index.jsx @@ -9,14 +9,10 @@ export default function LogoList({ logos }) { // eslint-disable-next-line react/no-array-index-key key={stableIdx} > - {logo.alt} + {logo.alt} ))} - -

- Integrations coming soon -

) } diff --git a/website/components/how-it-works/how-boundary-works-diagram/how-boundary-works-diagram.module.css b/website/components/how-it-works/how-boundary-works-diagram/how-boundary-works-diagram.module.css index b621dd0ff..3cfa91d9e 100644 --- a/website/components/how-it-works/how-boundary-works-diagram/how-boundary-works-diagram.module.css +++ b/website/components/how-it-works/how-boundary-works-diagram/how-boundary-works-diagram.module.css @@ -1,190 +1,32 @@ .root { - --transition-time: 0.7s; + display: grid; @media (--medium-up) { position: sticky; top: calc(50vh - (249px)); } + & > * { + grid-area: 1 / 1; + opacity: 0; + transition: opacity ease-in 0.5s; + + &:last-child { + opacity: 1; + } + } + + @media (--medium-up) { + & > *:last-child { + opacity: 0; + } + + & > *.active { + opacity: 1; + } + } + & > svg { width: 100%; } - - & .boundaryLetter, - & .spacer, - & .iconBg { - fill: var(--white); - } - - & .iconLines, - & .iconBg { - stroke-linecap: round; - stroke-width: 1.5px; - stroke-linejoin: round; - } - - & .boundaryFill, - & .arrowHead { - fill: var(--boundary, #ec585d); - } - - & .arrowHead, - & .arrowSegment, - & .spacer { - transition: var(--transition-time) ease; - transition-property: opacity; - } - - & .arrowSegment { - stroke-width: 2px; - stroke: var(--boundary, #ec585d); - stroke-miterlimit: 10; - stroke-linecap: round; - fill: none; - } - - & .dropShadow { - opacity: 0.08; - mix-blend-mode: multiply; - } - - & .iconLines { - stroke: var(--white); - fill: none; - transition: var(--transition-time) ease; - transition-property: stroke; - } - - & .subtitle { - fill: #b6b8c3; - } - - & .iconBg { - stroke: #e5e6ec; - stroke-width: 1px; - transition: var(--transition-time) ease; - transition-property: fill, stroke; - } - - & .authenticate { - & .iconBg { - fill: var(--white); - } - - & .iconLines { - stroke: #e5e6ec; - stroke-width: 1px; - } - } - - & .authorize { - & .spacer { - opacity: 0; - } - - & .iconBg { - fill: var(--black); - stroke: var(--black); - } - - & .iconLines { - stroke: #e5e6ec; - } - } - - & .access { - & .spacer { - opacity: 0; - } - - & .iconBg { - fill: var(--black); - stroke: var(--black); - } - - & .vaultIcon { - fill: var(--white); - } - } - - & .hostsAndServices { - opacity: 1; - transform: translate(0, 0); - transition: var(--transition-time) ease; - transition-property: opacity, transform; - - & .leadingLine { - fill: none; - stroke-linecap: round; - stroke-miterlimit: 10; - stroke-width: 1.5px; - stroke: var(--black); - } - } - - & .arrowOne .arrowHead, - & .arrowTwo .arrowHead { - @media (--small) { - opacity: 0; - } - } - - & .inactive { - & .arrowHead, - & .arrowSegment, - & .spacer { - @media (--medium-up) { - opacity: 0; - } - } - - &.authorize { - & .spacer { - @media (--medium-up) { - opacity: 1; - } - } - - & .iconBg { - @media (--medium-up) { - fill: var(--white); - stroke: #e5e6ec; - } - } - - & .iconLines { - @media (--medium-up) { - stroke: #b6b8c3; - } - } - } - - &.access { - & .spacer { - @media (--medium-up) { - opacity: 1; - } - } - - & .iconBg { - @media (--medium-up) { - fill: var(--white); - stroke: var(--white); - } - } - - & .vaultIcon { - @media (--medium-up) { - fill: var(--black); - } - } - } - - &.hostsAndServices { - @media (--medium-up) { - opacity: 0; - transform: translate(0, 10px); - } - } - } } diff --git a/website/components/how-it-works/how-boundary-works-diagram/index.jsx b/website/components/how-it-works/how-boundary-works-diagram/index.jsx index c33faf3e2..04ead2f35 100644 --- a/website/components/how-it-works/how-boundary-works-diagram/index.jsx +++ b/website/components/how-it-works/how-boundary-works-diagram/index.jsx @@ -3,291 +3,442 @@ import classnames from 'classnames' export default function HowBoundaryWorksDiagram({ activeExampleIndex }) { return ( -
- - - - +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + - {/* Hosts & Services */} - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - {/* Top-right arrow segment, always active */} - - - {/* Arrow (Example 1) */} - - - - - - - {/* Arrow (Example 2) */} - - - - - - - - {/* Arrow (Example 3) */} - - - - - - - - {/* Boundary logo */} - - - - - - - - {/* Users */} - - - - - - - - - - {/* Authenticate */} - - - - - - - - - - - - - - {/* Authorize */} - - - - - - - - - - - {/* Access */} - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + +
) diff --git a/website/components/how-it-works/how-it-works.module.css b/website/components/how-it-works/how-it-works.module.css index 77dfc1a9c..89a190f4f 100644 --- a/website/components/how-it-works/how-it-works.module.css +++ b/website/components/how-it-works/how-it-works.module.css @@ -1,60 +1,89 @@ .root { - padding: 88px 0; + composes: g-grid-container from global; + padding-top: 88px; + padding-bottom: 88px; - & .headerWrapper { - & h2 { - text-align: center; - margin-top: 0; - margin-bottom: 32px; - @media (--small) { - margin-bottom: 0; - } - } + @media (--medium-up) { + padding-top: 160px; + padding-bottom: 160px; + } +} - & p { - max-width: 818px; - text-align: center; - margin-left: auto; - margin-right: auto; - color: var(--gray-2); - } +.intro { + --columns: 1; + + padding-top: 88px; + padding-bottom: 88px; + border-top: 1px solid var(--gray-6); + display: grid; + column-gap: 32px; + grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); + row-gap: 32px; + + @media (--medium-up) { + --columns: 12; + + padding-top: 140px; + padding-bottom: 140px; + } +} + +.introTitle { + margin: 0; + grid-column: 1 / -1; + composes: g-type-display-2 from global; + + @media (--medium-up) { + grid-column: 1 / 6; + } +} + +.introDescription { + grid-column: 1 / -1; + composes: g-type-body-large from global; + + @media (--medium-up) { + grid-column: 7 / -1; + } + + & :first-child { + margin-top: 0; + } + + & :last-child { + margin-bottom: 0; } } .contentContainer { - display: flex; - justify-content: space-between; + --columns: 1; + position: relative; + display: grid; + grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); + grid-gap: 32px; - @media (--small) { - flex-direction: column; - } - - & > ul { - max-width: 470px; - margin-left: 128px; - padding: 0; - - @media (width < 1120px) { - margin-left: 64px; - } - - @media (width < 1024px) { - margin-left: 40px; - } - - @media (--small) { - margin-left: 0; - } + @media (--medium-up) { + --columns: 12; } } .diagram { - width: 591px; - max-width: 100%; + grid-column: 1 / -1; + + @media (--medium-up) { + grid-column: 1 / 6; + } } .features { + padding: 0; + grid-column: 1 / -1; + + @media (--medium-up) { + grid-column: 7 / -1; + } + & > li { list-style: none; diff --git a/website/components/how-it-works/index.jsx b/website/components/how-it-works/index.jsx index 8ca3c736b..6bddfa0ed 100644 --- a/website/components/how-it-works/index.jsx +++ b/website/components/how-it-works/index.jsx @@ -1,5 +1,4 @@ import s from './how-it-works.module.css' -import classNames from 'classnames' import HowBoundaryWorksDiagram from './how-boundary-works-diagram' import Feature from './feature' import { useState } from 'react' @@ -12,11 +11,11 @@ export default function HowItWorks({ title, description, features }) { return (
-
-

{title}

-

{description}

+
+

{title}

+
{description}
-
+
diff --git a/website/components/why-boundary/index.jsx b/website/components/why-boundary/index.jsx new file mode 100644 index 000000000..68856c364 --- /dev/null +++ b/website/components/why-boundary/index.jsx @@ -0,0 +1,22 @@ +import s from './style.module.css' + +export default function WhyBoundary({ heading, items }) { + return ( +
+

{heading}

+
    + {items.map((item, index) => { + return ( + // Index is stable + // eslint-disable-next-line react/no-array-index-key +
  • + {item.heading} +

    {item.heading}

    +

    {item.description}

    +
  • + ) + })} +
+
+ ) +} diff --git a/website/components/why-boundary/style.module.css b/website/components/why-boundary/style.module.css new file mode 100644 index 000000000..06be9dcb4 --- /dev/null +++ b/website/components/why-boundary/style.module.css @@ -0,0 +1,33 @@ +.root { + composes: g-grid-container from global; +} + +.heading { + margin: 0; + composes: g-type-display-2 from global; +} + +.items { + --columns: 1; + + list-style: none; + padding: 0; + margin: 90px 0 0; + display: grid; + grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); + grid-gap: 48px 32px; + + @media (--medium-up) { + --columns: 3; + } +} + +.itemHeading { + margin: 38px 0 0; + composes: g-type-display-4 from global; +} + +.itemDescription { + margin: 12px 0 0; + composes: g-type-body from global; +} diff --git a/website/content/docs/getting-started/index.mdx b/website/content/docs/getting-started/index.mdx index 3d891f85d..c3ad7f31e 100644 --- a/website/content/docs/getting-started/index.mdx +++ b/website/content/docs/getting-started/index.mdx @@ -15,8 +15,7 @@ The examples in Getting Started all revolve around running in `dev mode`. There 1. [Docker](https://docs.docker.com/get-docker/) is installed 1. A route to download the [Postgres Docker image](https://hub.docker.com/_/postgres) is available or a local image cache is available 1. A [Boundary binary](https://www.boundaryproject.io/downloads) in your `$PATH` -1. Optionally, an [installation of Boundary Desktop](/docs/api-clients/desktop#install-boundary-desktop) if you want to use the - desktop examples +1. Optionally, an [installation of Boundary Desktop](https://learn.hashicorp.com/tutorials/boundary/getting-started-desktop-app) if you want to use the desktop examples ## What is Dev Mode? diff --git a/website/data/alert-banner.js b/website/data/alert-banner.js index 62ffbfca2..2fe3f3bad 100644 --- a/website/data/alert-banner.js +++ b/website/data/alert-banner.js @@ -2,11 +2,12 @@ export const ALERT_BANNER_ACTIVE = true // https://github.com/hashicorp/web-components/tree/master/packages/alert-banner export default { - tag: 'Event', - url: 'https://hashiconf.com/global/?utm_campaign=22Q3_WW_HASHICONFGLOBAL_EVENT-USER&utm_source=CorpBanner&utm_medium=EVT&utm_offer=EVENT-USER', - text: 'Join us for HashiConf Global - product updates, technical sessions, workshops & more', - linkText: 'Register now', - // Set the expirationDate prop with a datetime string (e.g. '2020-01-31T12:00:00-07:00') - // if you'd like the component to stop showing at or after a certain date - expirationDate: '2021-10-01T12:00:00-07:00', + tag: 'Oct 19-21', + url: + 'https://hashiconf.com/global/?utm_campaign=22Q3_WW_HASHICONFGLOBAL_EVENT-USER&utm_source=CorpBanner&utm_medium=EVT&utm_offer=EVENT-USER', + text: 'The countdown to HashiConf Global is on. View the full schedule now.', + linkText: 'View Schedule', + // Set the expirationDate prop with a datetime string (e.g. '2020-01-31T12:00:00-07:00') + // if you'd like the component to stop showing at or after a certain date + expirationDate: '2021-10-19T12:00:00-07:00', } diff --git a/website/data/docs-nav-data.json b/website/data/docs-nav-data.json index eb4fb0faf..f7164abb7 100644 --- a/website/data/docs-nav-data.json +++ b/website/data/docs-nav-data.json @@ -76,7 +76,12 @@ }, { "title": "Desktop", + "hidden": true, "path": "api-clients/desktop" + }, + { + "title": "Desktop", + "href": "https://learn.hashicorp.com/tutorials/boundary/getting-started-desktop-app" } ] }, diff --git a/website/data/version.js b/website/data/version.js index 737e4d1f5..0a61b90f5 100644 --- a/website/data/version.js +++ b/website/data/version.js @@ -1,2 +1,2 @@ -export const VERSION = '0.6.1' +export const VERSION = '0.6.2' export const DESKTOP_VERSION = '1.3.0' diff --git a/website/pages/_document.js b/website/pages/_document.js index c96c2d8ff..9f061de14 100644 --- a/website/pages/_document.js +++ b/website/pages/_document.js @@ -9,7 +9,7 @@ export default class MyDocument extends Document { render() { return ( - + diff --git a/website/pages/home/img/how-boundary-works.svg b/website/pages/home/img/how-boundary-works.svg new file mode 100644 index 000000000..39a1539d0 --- /dev/null +++ b/website/pages/home/img/how-boundary-works.svg @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/website/pages/home/img/icons/activity.svg b/website/pages/home/img/icons/activity.svg new file mode 100644 index 000000000..c55b7ef36 --- /dev/null +++ b/website/pages/home/img/icons/activity.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/website/pages/home/img/icons/code-white.svg b/website/pages/home/img/icons/code-white.svg new file mode 100644 index 000000000..d487e25ff --- /dev/null +++ b/website/pages/home/img/icons/code-white.svg @@ -0,0 +1,4 @@ + + + + diff --git a/website/pages/home/img/features/config-as-code.svg b/website/pages/home/img/icons/config-as-code.svg similarity index 100% rename from website/pages/home/img/features/config-as-code.svg rename to website/pages/home/img/icons/config-as-code.svg diff --git a/website/pages/home/img/features/identity-based-access.svg b/website/pages/home/img/icons/identity-based-access.svg similarity index 100% rename from website/pages/home/img/features/identity-based-access.svg rename to website/pages/home/img/icons/identity-based-access.svg diff --git a/website/pages/home/img/icons/layers-white.svg b/website/pages/home/img/icons/layers-white.svg new file mode 100644 index 000000000..a358a32d1 --- /dev/null +++ b/website/pages/home/img/icons/layers-white.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/website/pages/home/img/icons/layers.svg b/website/pages/home/img/icons/layers.svg new file mode 100644 index 000000000..b63c1eab4 --- /dev/null +++ b/website/pages/home/img/icons/layers.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/website/pages/home/img/icons/lock.svg b/website/pages/home/img/icons/lock.svg new file mode 100644 index 000000000..9c8aec7af --- /dev/null +++ b/website/pages/home/img/icons/lock.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/website/pages/home/img/features/managing-dynamic-environments.svg b/website/pages/home/img/icons/managing-dynamic-environments.svg similarity index 100% rename from website/pages/home/img/features/managing-dynamic-environments.svg rename to website/pages/home/img/icons/managing-dynamic-environments.svg diff --git a/website/pages/home/img/features/platform-agnosticity.svg b/website/pages/home/img/icons/platform-agnosticity.svg similarity index 100% rename from website/pages/home/img/features/platform-agnosticity.svg rename to website/pages/home/img/icons/platform-agnosticity.svg diff --git a/website/pages/home/img/icons/refresh-white.svg b/website/pages/home/img/icons/refresh-white.svg new file mode 100644 index 000000000..11c0ef427 --- /dev/null +++ b/website/pages/home/img/icons/refresh-white.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/website/pages/home/img/features/session-management.svg b/website/pages/home/img/icons/session-management.svg similarity index 100% rename from website/pages/home/img/features/session-management.svg rename to website/pages/home/img/icons/session-management.svg diff --git a/website/pages/home/img/features/session-visibility.svg b/website/pages/home/img/icons/session-visibility.svg similarity index 100% rename from website/pages/home/img/features/session-visibility.svg rename to website/pages/home/img/icons/session-visibility.svg diff --git a/website/pages/home/img/icons/star.svg b/website/pages/home/img/icons/star.svg new file mode 100644 index 000000000..131b23c0f --- /dev/null +++ b/website/pages/home/img/icons/star.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/website/pages/home/img/icons/terminal.svg b/website/pages/home/img/icons/terminal.svg new file mode 100644 index 000000000..4e096dc5b --- /dev/null +++ b/website/pages/home/img/icons/terminal.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/website/pages/home/img/icons/user.svg b/website/pages/home/img/icons/user.svg new file mode 100644 index 000000000..77adbbb1d --- /dev/null +++ b/website/pages/home/img/icons/user.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/website/pages/home/img/logos/custom.svg b/website/pages/home/img/logos/custom.svg new file mode 100644 index 000000000..ba422144c --- /dev/null +++ b/website/pages/home/img/logos/custom.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/website/pages/home/img/logos/github-black.svg b/website/pages/home/img/logos/github-black.svg new file mode 100644 index 000000000..ae48cb8c8 --- /dev/null +++ b/website/pages/home/img/logos/github-black.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/website/pages/home/img/logos/mongo-db.svg b/website/pages/home/img/logos/mongo-db.svg new file mode 100644 index 000000000..c86870e4e --- /dev/null +++ b/website/pages/home/img/logos/mongo-db.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/website/pages/home/img/logos/my-sql-color.svg b/website/pages/home/img/logos/my-sql-color.svg new file mode 100644 index 000000000..af973e341 --- /dev/null +++ b/website/pages/home/img/logos/my-sql-color.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/website/pages/home/img/logos/postgresql.png b/website/pages/home/img/logos/postgresql.png new file mode 100644 index 000000000..21fc2eafa Binary files /dev/null and b/website/pages/home/img/logos/postgresql.png differ diff --git a/website/pages/home/img/logos/ssh.svg b/website/pages/home/img/logos/ssh.svg new file mode 100644 index 000000000..227757b47 --- /dev/null +++ b/website/pages/home/img/logos/ssh.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/website/pages/home/img/logos/unknown.svg b/website/pages/home/img/logos/unknown.svg new file mode 100644 index 000000000..a76989238 --- /dev/null +++ b/website/pages/home/img/logos/unknown.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/website/pages/home/img/red-usecase-accessprivileges.png b/website/pages/home/img/red-usecase-accessprivileges.png deleted file mode 100644 index 511292dfe..000000000 Binary files a/website/pages/home/img/red-usecase-accessprivileges.png and /dev/null differ diff --git a/website/pages/home/img/red-usecase-compliancewithoutoverhead.png b/website/pages/home/img/red-usecase-compliancewithoutoverhead.png new file mode 100644 index 000000000..c96c53bc6 Binary files /dev/null and b/website/pages/home/img/red-usecase-compliancewithoutoverhead.png differ diff --git a/website/pages/home/img/red-usecase-integratedsystem.png b/website/pages/home/img/red-usecase-integratedsystem.png new file mode 100644 index 000000000..a46b4c62e Binary files /dev/null and b/website/pages/home/img/red-usecase-integratedsystem.png differ diff --git a/website/pages/home/img/red-usecase-sessionvisibility.png b/website/pages/home/img/red-usecase-sessionvisibility.png deleted file mode 100644 index a0cba5f6f..000000000 Binary files a/website/pages/home/img/red-usecase-sessionvisibility.png and /dev/null differ diff --git a/website/pages/home/index.jsx b/website/pages/home/index.jsx index 5c0b5ff5c..7d446f624 100644 --- a/website/pages/home/index.jsx +++ b/website/pages/home/index.jsx @@ -1,7 +1,8 @@ import BrandedCta from 'components/branded-cta' import HomepageHero from 'components/homepage-hero' import HowItWorks from 'components/how-it-works' -import SectionBreakCta from 'components/section-break-cta' +import HowBoundaryWorks from 'components/how-boundary-works' +import WhyBoundary from 'components/why-boundary' import ProductFeaturesList from '@hashicorp/react-product-features-list' import UseCases from '@hashicorp/react-use-cases' @@ -44,21 +45,33 @@ export default function HomePage() { /> +

+ In the shift to the cloud, organizations need secure access to + targets beyond their own perimeter. +

+

+ Boundary provides a secure way to access hosts and critical + systems without having to manage credentials or expose your + network, and is entirely open source. +

+ + } features={[ { - title: 'Authenticate', + title: 'Authenticate & authorize', description: - 'Authenticate with any trusted identity provider you are already using. No need to distribute new credentials and manage them.', + 'Authenticate with any trusted identity provider you are already using and authorize access based on granular, logical roles and services.', logos: [ { alt: 'GitHub', - url: require('./img/logos/github-gray.svg?url'), + url: require('./img/logos/github-black.svg?url'), }, { alt: 'AWS', - url: require('./img/logos/aws-gray.svg?url'), + url: require('./img/logos/aws-color.svg?url'), }, { alt: 'Microsoft Azure', @@ -78,14 +91,14 @@ export default function HomePage() { }, { alt: 'More integrations', - url: require('./img/logos/more-gray.svg?url'), + url: require('./img/logos/custom.svg?url'), }, ], }, { - title: 'Authorize', + title: 'Connect', description: - 'Authorize access based on logical roles and services, instead of physical IP addresses. Manage dynamic infrastructure and integrate service registries so hosts and service catalogs are kept up-to-date.', + 'Manage dynamic infrastructure and integrate service registries so hosts and service catalogs are kept up-to-date.', logos: [ { alt: 'Consul', @@ -112,78 +125,102 @@ export default function HomePage() { url: require('./img/logos/kubernetes-color.svg?url'), }, { - url: require('./img/logos/more-gray.svg?url'), alt: 'More integrations', + url: require('./img/logos/custom.svg?url'), }, ], }, { title: 'Access', - description: - 'Automate credential injection to securely access services and hosts with HashiCorp Vault. Reduce risk of leaking credentials with dynamic secrets and just-in-time credentials.', + description: ( + <> + Reduce risk of leaking credentials with dynamic secrets and + just-in-time credentials. Automate credential brokering to + securely access services and hosts with{' '} + + HashiCorp Vault + + . + + ), + logos: [ + { + alt: 'Postgresql', + url: require('./img/logos/postgresql.png?url'), + width: 36, + }, + { + alt: 'SSH', + url: require('./img/logos/ssh.svg?url'), + width: 42, + }, + { + alt: 'Mongo DB', + url: require('./img/logos/mongo-db.svg?url'), + }, + { + alt: 'AWS', + url: require('./img/logos/aws-color.svg?url'), + }, + { + alt: 'Unknown', + url: require('./img/logos/unknown.svg?url'), + }, + { + alt: 'MySQL', + url: require('./img/logos/my-sql-color.svg?url'), + }, + { + alt: 'More integrations', + url: require('./img/logos/custom.svg?url'), + }, + ], }, ]} /> -
-
-

Use cases

- -
-
+
+ +
-
- + -
+
+
+
+

Use cases

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/website/public/img/hero-pattern.svg b/website/public/img/hero-pattern.svg index 2fadb6b29..0f266be7b 100644 --- a/website/public/img/hero-pattern.svg +++ b/website/public/img/hero-pattern.svg @@ -1 +1,56 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/website/redirects.js b/website/redirects.js index 91848ed79..a1326a120 100644 --- a/website/redirects.js +++ b/website/redirects.js @@ -29,6 +29,12 @@ module.exports = [ destination: '/docs/api-clients/desktop#connect', permanent: false, }, + { + source: '/docs/api-clients/desktop', + destination: + 'https://learn.hashicorp.com/tutorials/boundary/getting-started-desktop-app', + permanent: true, + }, ///////////////////////////////// // DOMAIN MODEL CONCEPTS