-
Notifications
You must be signed in to change notification settings - Fork 305
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
commit: Optionally translate ima xattr #2272
Conversation
The security.ima extended attribute can only be written by root, but there is the user.ima attribute that can be set by e.g. ima-evm-utils. Allowing translation from user.ima to security.ima means that the tree can be prepared with user.ima attributes, and after translation, stored as security.ima in the tree. This would result in a deployed security.ima attribute without needing to run the tree compose as root. Signed-off-by: Patrick Uiterwijk <[email protected]>
Hi @puiterwijk. Thanks for your PR. I'm waiting for a ostreedev member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
Note you can also do this also via the xattr callback. For example this is how rpm-ostree sets file caps when importing RPMs: https://github.com/coreos/rpm-ostree/blob/e88a736e55eeb91ced5619c4ee9119d4cf705068/src/libpriv/rpmostree-importer.cxx#L818-L833. Though if |
Yeah I am OK with this, but I'd also like to see high level support in this in rpm-ostree i.e. declarative in the manifest something like:
(and support for passing the key in the kernel keyring or via file descriptor too) It looks like this would require today forking off Anyways WDYT about just generalizing this so that e.g. all |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgwalters, puiterwijk The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@cgwalters There's actually a libimaevm, which has |
The travis tests failures look to show a lot of infra flakes (can't reach a gnome repo). For jenkins CI I see:
I do see the above jenkins failure in a few other PRs such as:
which may indicate this is a known failing test and not directly related to this change. @cgwalters @lucab @travier @kelvinfan001 would one of you mind taking a look and verifying? |
Is there a way to force a retest? |
For Jenkins it's logging in and clicking retry; done now. But let's reach a conclusion on the high level interface; I think I'd lean most towards
and we could also just hardcode doing that in rpm-ostree by default probably. (ostree is intended to be a flexible shared library, opinionated where necessary; rpm-ostree is more opinionated) |
As for why the transactionality test is failing...well it's almost certainly not related to this PR but it's concerning. It's possible it's related to a newer rpm-ostree or something else. I still really want to implement "reverse dependency testing" i.e. have FCOS CI run the ostree tests, including this. |
CI failure seems to be a race/regression in rpm-ostree, tracked at coreos/rpm-ostree#2531. For the short term, I managed to get a ✔️ by adding some retries around the racing logic in #2276. |
Bump for continued conversation 😃 |
Thanks, @ashcrow for the ping. Given that @cgwalters wants the generic translation, I'm now instead adding this to rpm-ostree as something that's read from the treefile instead. |
I opened the rpm-ostree PR (as WIP since I still need to finish tests) at coreos/rpm-ostree#2563 |
The security.ima extended attribute can only be written by root, but
there is the user.ima attribute that can be set by e.g. ima-evm-utils.
Allowing translation from user.ima to security.ima means that the tree
can be prepared with user.ima attributes, and after translation, stored
as security.ima in the tree.
This would result in a deployed security.ima attribute without needing
to run the tree compose as root.
Signed-off-by: Patrick Uiterwijk [email protected]