-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli: create default policy setting file, rego and manifest on generate
If files do not exist yet, generate will write default files.
- Loading branch information
Showing
8 changed files
with
87 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
package main | ||
|
||
import ( | ||
_ "embed" | ||
) | ||
|
||
const ( | ||
coordRootPEMFilename = "coordinator-root.pem" | ||
coordIntermPEMFilename = "mesh-root.pem" | ||
manifestFilename = "manifest.json" | ||
rulesFilename = "rules.rego" | ||
verifyDir = "./verify" | ||
) | ||
|
||
var ( | ||
//go:embed genpolicy-msft.json | ||
defaultGenpolicySettings []byte | ||
//go:embed rules.rego | ||
defaultRules []byte | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package manifest | ||
|
||
// Default returns a default manifest. | ||
func Default() Manifest { | ||
return Manifest{ | ||
Policies: map[HexString][]string{ | ||
"2b3422e2e44c933f5a2bea3d25fc36502951cfac3bd07ea2033936b4b72b5c65": { | ||
"workload.edg-coco", | ||
"*.edg-coco", | ||
}, | ||
"3638d61e7c8701e19e819751eb61e2e353f25f68374443d03428c8acc39ed3e9": { | ||
"workload.edg-coco", | ||
"*.edg-coco", | ||
}, | ||
}, | ||
ReferenceValues: ReferenceValues{ | ||
SNP: SNPReferenceValues{ | ||
MinimumTCB: SNPTCB{ | ||
BootloaderVersion: 3, | ||
TEEVersion: 0, | ||
SNPVersion: 8, | ||
MicrocodeVersion: 115, | ||
}, | ||
TrustedIDKeyHashes: []HexString{ | ||
"b2bcf1b11d9fb3f2e4e7979546844d26c30255fff0775f3af56f8295f361a7d1a34a54516d41abfff7320763a5b701d8", | ||
"22087e0b99b911c9cffccfd9550a054531c105d46ed6d31f948eae56bd2defa4887e2fc4207768ec610aa232ac7490c4", | ||
}, | ||
}, | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters