terraform/internal/getproviders
Martin Atkins ef64df950c getproviders: Prepare for having multiple valid hashes per package
As we continue iterating towards saving valid hashes for a package in a
depsfile lock file after installation and verifying them on future
installation, this prepares getproviders for the possibility of having
multiple valid hashes per package.

This will arise in future commits for two reasons:
- We will need to support both the legacy "zip hash" hashing scheme and
  the new-style content-based hashing scheme because currently the
  registry protocol is only able to produce the legacy scheme, but our
  other installation sources prefer the content-based scheme. Therefore
  packages will typically have a mixture of hashes of both types.
- Installing from an upstream registry will save the hashes for the
  packages across all supported platforms, rather than just the current
  platform, and we'll consider all of those valid for future installation
  if we see both successful matching of the current platform checksum and
  a signature verification for the checksums file as a whole.

This also includes some more preparation for the second case above in that
signatureAuthentication now supports AcceptableHashes and returns all of
the zip-based hashes it can find in the checksums file. This is a bit of
an abstraction leak because previously that authenticator considered its
"document" to just be opaque bytes, but we want to make sure that we can
only end up trusting _all_ of the hashes if we've verified that the
document is signed. Hopefully we'll make this better in a future commit
with some refactoring, but that's deferred for now in order to minimize
disruption to existing codepaths while we work towards a provider locking
MVP.
2020-09-24 14:01:54 -07:00
..
testdata internal/getproviders: Allow basedir for local search to be symlink 2020-08-18 14:28:50 -07:00
doc.go internal/getproviders: Query a provider registry 2020-01-10 09:41:27 -08:00
errors.go internal/getproviders: HTTPMirrorSource implementation 2020-08-26 13:18:08 -07:00
filesystem_mirror_source.go internal/getproviders: decode and return any registry warnings (#25337) 2020-06-25 10:49:48 -04:00
filesystem_mirror_source_test.go internal/getproviders: Allow PackageMeta to carry acceptable hashes 2020-09-24 14:01:54 -07:00
filesystem_search.go internal/getproviders: Allow basedir for local search to be symlink 2020-08-18 14:28:50 -07:00
filesystem_search_test.go internal/getproviders: Allow basedir for local search to be symlink 2020-08-18 14:28:50 -07:00
hash.go getproviders: Prepare for having multiple valid hashes per package 2020-09-24 14:01:54 -07:00
hash_test.go getproviders: Add a real type Hash for package hashes 2020-09-24 14:01:54 -07:00
http_mirror_source.go getproviders: Add a real type Hash for package hashes 2020-09-24 14:01:54 -07:00
http_mirror_source_test.go getproviders: Prepare for having multiple valid hashes per package 2020-09-24 14:01:54 -07:00
legacy_lookup.go command: Add redirect support to 0.13upgrade 2020-08-31 14:53:35 -04:00
legacy_lookup_test.go command: Add redirect support to 0.13upgrade 2020-08-31 14:53:35 -04:00
memoize_source.go internal/getproviders: decode and return any registry warnings (#25337) 2020-06-25 10:49:48 -04:00
memoize_source_test.go internal/getproviders: decode and return any registry warnings (#25337) 2020-06-25 10:49:48 -04:00
mock_source.go internal/getproviders: Allow PackageMeta to carry acceptable hashes 2020-09-24 14:01:54 -07:00
multi_source.go internal/getproviders: decode and return any registry warnings (#25337) 2020-06-25 10:49:48 -04:00
multi_source_test.go internal/getproviders: decode and return any registry warnings (#25337) 2020-06-25 10:49:48 -04:00
package_authentication.go getproviders: Prepare for having multiple valid hashes per package 2020-09-24 14:01:54 -07:00
package_authentication_test.go getproviders: Prepare for having multiple valid hashes per package 2020-09-24 14:01:54 -07:00
public_keys.go internal: Verify provider signatures on install 2020-04-17 13:57:19 -04:00
registry_client.go internal/getproviders: Allow PackageMeta to carry acceptable hashes 2020-09-24 14:01:54 -07:00
registry_client_test.go getproviders: Prepare for having multiple valid hashes per package 2020-09-24 14:01:54 -07:00
registry_source.go command: Add redirect support to 0.13upgrade 2020-08-31 14:53:35 -04:00
registry_source_test.go getproviders: Prepare for having multiple valid hashes per package 2020-09-24 14:01:54 -07:00
source.go internal/getproviders: decode and return any registry warnings (#25337) 2020-06-25 10:49:48 -04:00
types.go getproviders: Prepare for having multiple valid hashes per package 2020-09-24 14:01:54 -07:00