terraform/internal/providercache
Alisdair McDiarmid a5b3d497cc internal: Verify provider signatures on install
Providers installed from the registry are accompanied by a list of
checksums (the "SHA256SUMS" file), which is cryptographically signed to
allow package authentication. The process of verifying this has multiple
steps:

- First we must verify that the SHA256 hash of the package archive
  matches the expected hash. This could be done for local installations
  too, in the future.
- Next we ensure that the expected hash returned as part of the registry
  API response matches an entry in the checksum list.
- Finally we verify the cryptographic signature of the checksum list,
  using the public keys provided by the registry.

Each of these steps is implemented as a separate PackageAuthentication
type. The local archive installation mechanism uses only the archive
checksum authenticator, and the HTTP installation uses all three in the
order given.

The package authentication system now also returns a result value, which
is used by command/init to display the result of the authentication
process.

There are three tiers of signature, each of which is presented
differently to the user:

- Signatures from the embedded HashiCorp public key indicate that the
  provider is officially supported by HashiCorp;
- If the signing key is not from HashiCorp, it may have an associated
  trust signature, which indicates that the provider is from one of
  HashiCorp's trusted partners;
- Otherwise, if the signature is valid, this is a community provider.
2020-04-17 13:57:19 -04:00
..
testdata internal: Verify provider signatures on install 2020-04-17 13:57:19 -04:00
cached_provider.go internal/providercache: Hashing of contents of cached packages 2020-04-06 09:24:23 -07:00
cached_provider_test.go internal/providercache: Hashing of contents of cached packages 2020-04-06 09:24:23 -07:00
dir.go internal/{getproviders,providercache}: improved trace logging 2020-03-25 13:50:00 -07:00
dir_modify.go internal: Verify provider signatures on install 2020-04-17 13:57:19 -04:00
dir_modify_test.go internal: Verify provider signatures on install 2020-04-17 13:57:19 -04:00
dir_test.go provider source tests: added test suite to exercise hyphenated providers (#24685) 2020-04-16 15:54:33 -04:00
doc.go providercache: A package to encapsulate management of provider cache dirs 2020-03-25 11:29:48 -07:00
installer.go internal: Verify provider signatures on install 2020-04-17 13:57:19 -04:00
installer_events.go internal: Verify provider signatures on install 2020-04-17 13:57:19 -04:00
lock_file.go internal/providercache: Fix positions on selections file/dir 2020-04-06 09:24:23 -07:00
package_install.go internal: Verify provider signatures on install 2020-04-17 13:57:19 -04:00