Skip to content

Commit a068079

Browse files
committed
Run trustee as non-privileged container
1) the paths /opt/confidential-container and /opt/confidential-container/kbs/repository/default are mounted as RW volumes in memory to allow trustee components to have full access to the filesystem 2) some refactoring around the volumes creation Signed-off-by: Leonardo Milleri <[email protected]>
1 parent c1c0c3f commit a068079

File tree

4 files changed

+415
-349
lines changed

4 files changed

+415
-349
lines changed

config/samples/all-in-one/kbs-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ data:
3131
}
3232
},
3333
"policy_engine_config": {
34-
"policy_path": "/opa/confidential-containers/kbs/policy.rego"
34+
"policy_path": "/opt/confidential-containers/opa/policy.rego"
3535
}
3636
}

internal/controller/common.go

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,19 @@ const (
3939
// KBS service name
4040
KbsServiceName = "kbs-service"
4141

42+
// Root path for KBS file system
43+
rootPath = "/opt"
44+
45+
confidentialContainers = "confidential-containers"
46+
47+
defaultRepository = "default"
48+
49+
confidentialContainersPath = rootPath + "/" + confidentialContainers
50+
51+
repositoryPath = confidentialContainersPath + "/kbs/repository"
52+
4253
// Default KBS Resources Path
43-
kbsResourcesPath = "/opt/confidential-containers/kbs/repository/default"
54+
kbsResourcesPath = repositoryPath + "/" + defaultRepository
4455

4556
// Default KBS config path
4657
kbsDefaultConfigPath = "/etc"
@@ -52,7 +63,7 @@ const (
5263
rvpsDefaultConfigPath = "/etc"
5364

5465
// Default RVPS reference values Path
55-
rvpsReferenceValuesPath = "/opt/confidential-containers/rvps"
66+
rvpsReferenceValuesPath = confidentialContainersPath + "/rvps"
5667
)
5768

5869
func contains(list []string, s string) bool {

0 commit comments

Comments
 (0)