terraform/internal
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
..
copydir internal/copydir: Factor out our recursive directory copy for reuse 2020-03-25 11:29:48 -07:00
depsfile getproviders: Add a real type Hash for package hashes 2020-09-24 14:01:54 -07:00
earlyconfig addrs: ImpliedProviderForUnqualifiedType function 2020-04-06 09:24:23 -07:00
getproviders getproviders: Prepare for having multiple valid hashes per package 2020-09-24 14:01:54 -07:00
initwd internal/initwd: allow tests to pass when $PWD contains symlinks (#26015) 2020-08-27 10:02:22 -04:00
modsdir internal/modsdir: Fix Dropped Error (#24600) 2020-06-04 10:26:26 -04:00
providercache getproviders: Add a real type Hash for package hashes 2020-09-24 14:01:54 -07:00
tfplugin5 Add support for provider metadata to modules. (#22583) 2020-03-05 16:53:24 -08:00