go-tpm-tools icon indicating copy to clipboard operation
go-tpm-tools copied to clipboard

Refactor verifier for issue #418

Open Ruide opened this issue 1 year ago • 8 comments
trafficstars

See Issue #418

This PR makes the following changes:

  • move package verifier out of package launcher. Package verifier is responsible to request to Verifier services, thus it is not only useful to package launcher.
  • remove cloudLogger in package agent. Package agent is responsible for setting up evidence management for launcher, and launcher does not need the cloudLog flag option.
  • refactor token command to depend on package verifier and remove its dependency on agent package.
  • move rest_network_test.go test to agent_test. Not doing so lead to cyclic dependencies.
  • move package oci to package verifier. Because oci is part of request to Verifier services.
  • create package util for hosting common functions related to package verifier
  • move fake_attestation_server, fake_metadata, fake_oauth2_server to package util. Because they are common functions for unit testing related to Google verifier service.
  • extract common functions, GetAttestation function, GetRegion, GetRESTClient, to util. Because token command and package agent have these duplicate functions. And add unit test for the extracted functions.

Ruide avatar Mar 05 '24 19:03 Ruide

/gcbrun

Ruide avatar Mar 05 '24 19:03 Ruide

/gcbrun

Ruide avatar Mar 05 '24 20:03 Ruide

/gcbrun

Ruide avatar Mar 07 '24 02:03 Ruide

Hi @alexmwu ! Could you take a look?

Ruide avatar Mar 11 '24 20:03 Ruide

Hi @alexmwu , I have added the description. Thanks for the comment!

Ruide avatar Mar 13 '24 01:03 Ruide

/gcbrun

Ruide avatar Mar 14 '24 00:03 Ruide

/gcbrun

Ruide avatar Mar 14 '24 21:03 Ruide

/gcbrun

Ruide avatar Mar 14 '24 22:03 Ruide

/gcbrun

Ruide avatar Mar 15 '24 21:03 Ruide