Skip to content
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

Add support for FIPS-Mode backends #2031

Merged
merged 1 commit into from Dec 19, 2019
Merged

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Dec 17, 2019

If host is running in fips mode, then RHEL8.2 and beyond container images
will come with a directory /usr/share/crypto-policies/back-ends/FIPS.
This directory needs to be bind mounted over /etc/crypto-policies/back-ends in
order to make all tools in the container follow the FIPS Mode rules.

Signed-off-by: Daniel J Walsh dwalsh@redhat.com

@rhatdan
Copy link
Member Author

rhatdan commented Dec 17, 2019

@rhatdan rhatdan changed the title Add support for FIPS-Mode backends [WIP] Add support for FIPS-Mode backends Dec 18, 2019
@rhatdan
Copy link
Member Author

rhatdan commented Dec 18, 2019

Need someone from @simo5 to confirm file/directory paths.

@rhatdan
Copy link
Member Author

rhatdan commented Dec 18, 2019

@t8m PTAL

@rhatdan
Copy link
Member Author

rhatdan commented Dec 18, 2019

@mjahoda PTAL

@t8m
Copy link

t8m commented Dec 19, 2019

LGTM. The paths in the patch look correct.

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

If host is running in fips mode, then RHEL8.2 and beyond container images
will come with a directory /usr/share/crypto-policies/back-ends/FIPS.
This directory needs to be bind mounted over /etc/crypto-policies/back-ends in
order to make all tools in the container follow the FIPS Mode rules.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
@rhatdan rhatdan changed the title [WIP] Add support for FIPS-Mode backends Add support for FIPS-Mode backends Dec 19, 2019
@rhatdan rhatdan merged commit e6815a1 into containers:master Dec 19, 2019
Destination: secretsDir,
Type: "bind",
Options: []string{"bind", "rprivate"},
}
*mounts = append(*mounts, m)
}

srcBackendDir := "/usr/share/crypto-policies/back-ends/FIPS"
destDir := "/etc/crypto-policies/back-ends"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rhatdan would it make sense to add the above two variables into containers.conf at some point?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I'm not a big fan of having a directory defined like this in a middle of a function somewhere, but personal twitch.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if containers.conf is the right place. The place to extend would be mounts.conf I guess. but we would need some changes to how this is parsed.

Currently
SRC:DEST

But SRC is on the host and DEST is in the container

This patch basically does SRC in the container to DEST in the container.

Mounts.conf also copies SRC into container local storage and then mounts Container Local Storage at DEST.

The HPC guys want additional volumes "bind" mounted into automatically into the containers.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just added

# List of additional volumes. Specified as
# "<directory-on-host>:<derectory-in-container>:<options>", for example: 
# "/db:/var/lib/db:ro".
# If it is empty or commented out, no volumes will be added
# additional_volumes = []

To containers.conf, but this does not solve the issue we have here either.

@TomSweeneyRedHat
Copy link
Member

Late to the party, couple small things for future consideration.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants