NOISSUE - Add path to expected PCR values#398
Conversation
| @@ -25,7 +25,12 @@ import ( | |||
| const defGuestFeatures = 0x1 | |||
|
|
|||
| func (ms *managerService) FetchAttestationPolicy(_ context.Context, computationId string) ([]byte, error) { | |||
There was a problem hiding this comment.
can we write the output of the attestation policy bin to std out rather than json. that way manager can read and parse the command output and not worry about location of the output json fille
There was a problem hiding this comment.
Ok, I will change this.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #398 +/- ##
==========================================
+ Coverage 56.67% 56.71% +0.04%
==========================================
Files 59 59
Lines 5078 5099 +21
==========================================
+ Hits 2878 2892 +14
- Misses 1900 1906 +6
- Partials 300 301 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| return fmt.Errorf("error: %s", outputString) | ||
| } | ||
|
|
||
| fmt.Println(outputString) |
| @@ -12,6 +12,7 @@ The service is configured using the environment variables from the following tab | |||
| | COCOS_JAEGER_TRACE_RATIO | The ratio of traces to sample. | 1.0 | | |||
| | MANAGER_INSTANCE_ID | The instance ID for the manager service. | | | |||
| | MANAGER_ATTESTATION_POLICY_BINARY | The file path for the attestation policy and igvmmeassure binaries. | ../../build | | |||
There was a problem hiding this comment.
we can have an env var for each
| stdout := bufio.NewWriter(&stdoutBuffer) | ||
| stderr := bufio.NewWriter(&stderrBuffer) | ||
|
|
||
| attestPolicyCmd, err := cmdconfig.NewCmdConfig("sudo", options, stderr, stdout) |
There was a problem hiding this comment.
run returns output of stdout so no need to pass the buffer in the newmethod
| AttestationPolicyBinary string `env:"MANAGER_ATTESTATION_POLICY_BINARY" envDefault:"../../build"` | ||
| IgvmMeasureBinary string `env:"MANAGER_IGVMMEASURE_BINARY" envDefault:"../../build"` |
There was a problem hiding this comment.
| AttestationPolicyBinary string `env:"MANAGER_ATTESTATION_POLICY_BINARY" envDefault:"../../build"` | |
| IgvmMeasureBinary string `env:"MANAGER_IGVMMEASURE_BINARY" envDefault:"../../build"` | |
| AttestationPolicyBinary string `env:"MANAGER_ATTESTATION_POLICY_BINARY" envDefault:"../../build/attestation_policy"` | |
| IgvmMeasureBinary string `env:"MANAGER_IGVMMEASURE_BINARY" envDefault:"../../build/igvmmeasure"` |
What type of PR is this?
This is a feature, because this PR introduces an env variable to the Manager that points to the PCR expected values JSON file.
What does this do?
This PR introduces an env variable to the Manager that points to the PCR expected values JSON file.
Which issue(s) does this PR fix/relate to?
No issue.
Have you included tests for your changes?
Tests have been updated.
Did you document any new/modified feature?
Yes.
Notes