-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial policy management implementation
Add a new service node, "management". Implement API for updating and querying policies via this node. Signed-off-by: Sergei Trofimov <[email protected]>
- Loading branch information
Showing
24 changed files
with
940 additions
and
11 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
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
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
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
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,28 @@ | ||
# Management service container. | ||
# The context for building this image is assumed to be the Veraison deployment | ||
# directory (/tmp/veraison is the default for make build). | ||
FROM debian as veraison-management | ||
|
||
RUN apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install \ | ||
--assume-yes \ | ||
--no-install-recommends \ | ||
uuid-runtime \ | ||
&& uuidgen | tr -d - > /etc/machine-id \ | ||
&& apt-get clean \ | ||
&& apt-get autoremove --assume-yes \ | ||
&& rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/* | ||
|
||
RUN groupadd -g 616 veraison && \ | ||
useradd -m -g veraison --system veraison | ||
|
||
USER veraison | ||
|
||
WORKDIR /opt/veraison | ||
|
||
ADD --chown=veraison:nogroup plugins plugins | ||
ADD --chown=veraison:nogroup config.yaml management-service service-entrypoint ./ | ||
|
||
ENTRYPOINT ["/opt/veraison/service-entrypoint"] | ||
CMD ["/opt/veraison/management-service"] | ||
|
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
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,3 @@ | ||
package policy | ||
|
||
executables = APPROVED_RT |
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,9 @@ | ||
package policy | ||
|
||
executables = APPROVED_RT { | ||
some i | ||
|
||
evidence["psa-software-components"][i]["measurement-type"] == "BL" | ||
|
||
semver_cmp(evidence["psa-software-components"][i].version, "3.5") >= 0 | ||
} else = UNSAFE_RT |
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
Oops, something went wrong.