-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding initial support for Eviden Trustway HSM #162
Open
mauricioharley
wants to merge
6
commits into
openstack-k8s-operators:main
Choose a base branch
from
mauricioharley:add_hsm_trustway_support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+355
−0
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bd70200
Adding script to customize images for Eviden Trustway
f82b988
Adding script to customize images for Eviden Trustway
a312ef2
Adding script to customize images for Eviden Trustway
874c9ef
Initial support for Eviden Trustway HSM
9bc47ad
Initial support for Eviden Trustway HSM
f3197c6
Initial support for Eviden Trustway HSM
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,45 @@ | ||
# Automation Scripts | ||
|
||
## Build Custom Container Images | ||
|
||
This script is meant to be used when the environment where Barbican will work has an HSM (Hardware Security Module) in place. | ||
Since Barbican is able to store secrets when an HSM is present, it needs to be made aware of such presence. Two components | ||
are directly affected by the presence of an HSM: Barbican API and Barbican Worker. The default container images do not have | ||
any HSM client software embedded in them since each manufacturer may have specifics on how their software can be distributed. | ||
|
||
Therefore, the container images need to be customized to include such client software. Depending on the vendor, the installation | ||
procedures might differ. You need to run the script corresponding to the vendor you use. | ||
|
||
### Eviden Trustway (previously, ATOS) | ||
|
||
For the Eviden (previously, ATOS) Trustway HSMs, you will use the `build_custom_image-eviden.sh` script. The usage is as follows: | ||
|
||
```bash | ||
$ bash build_custom_image-eviden.sh <source_registry_host> <namespace> <barbican-api_image_tag> <barbican-worker_image_tag> <eviden_iso_file> <destination_registry_host> | ||
``` | ||
|
||
where: | ||
* `source_registry_host`: corresponds to the FQDN (Fully Qualified Domain Name) of the registry that holds the default container images. | ||
Example: quay.io. | ||
* `namespace`: it's an internal repository organization that matches the OpenStack distribution with an operating system. Example: `podified-antelope-centos9`. | ||
* `barbican-api_image_tag`: because OpenStack container images may not have the usual `latest` tag, you may need to manually obtain and provide the newest tag. Example: `75c508097e39a3423d9f2eef86648c4e`. | ||
* `barbican-worker_image_tag`: something similar happens for the Barbican Worker image. Example: `71849c7583fa95ee18dcc0c73c93569d`. | ||
* `eviden_iso_file`: this is the filename of the ISO file holding the Eviden HSM client software. Example: `Proteccio3.00.03.iso`. **Please put it in the same directory as this script.** | ||
* `destination_registry_host`: corresponds to the FQDN (Fully Qualified Domain Name) of the registry that will store the customized container images. | ||
Example: hub.docker.com. | ||
|
||
>**Note 1**<br> | ||
**You need to edit the `build_custom_image-eviden.sh` script to include your username on the container registry. <br> This is necessary since one of the final steps the script takes is to push the new customized image to the registry.** | ||
|
||
>**Note 2**<br> | ||
**You must install both, `podman` and `buildah` for this script to successfully execute.** | ||
|
||
The script proceeds as follows: | ||
1. Pulls with `podman` the container images of Barbican API and Barbican Worker from the provided registry host. | ||
2. Creates a temporary directory and mounts the ISO client file on it. | ||
3. Creates two `Dockerfile`s (`Dockerfile.barbican-api` and `Dockerfile.barbican-worker`), for the two new container images. These files have instructions to copy and invoke the Eviden's installation script. | ||
4. Builds the new images with `buildah`. At this stage, temporary containers will be created to execute the client software installation. | ||
5. Pushes the new image to the registry host you provided as parameter. **For this sake, the script needs to be edited to have your username on this registry host.** | ||
6. Unmounts the ISO client software and deletes the temporary directory created on step 2. | ||
|
||
After this script successfully runs, you can start your Barbican operator deployment. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should consider grouping these into their own key. e.g.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. $CERT_CONTENTS_HERE will receive the OpenShift secret name that actually stores the certificate.
This file was automatically generated by a pre-commit hook. I'll check how this could be translated into the specification file.