-
Notifications
You must be signed in to change notification settings - Fork 486
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
Grafana Agent still unable to install on FIPS-mode CentOS 9 #4419
Comments
Here's a comparison of a signed package from the CentOS repos and the Grafana Agent Flow $ rpm -v --checksig vim-enhanced-8.2.2637-20.el9.x86_64.rpm
vim-enhanced-8.2.2637-20.el9.x86_64.rpm:
Header V3 RSA/SHA256 Signature, key ID 8483c65d: OK
Header SHA256 digest: OK
Header SHA1 digest: OK
Payload SHA256 digest: OK
V3 RSA/SHA256 Signature, key ID 8483c65d: OK
$ rpm -v --checksig grafana-agent-flow-0.34.3-1.amd64.rpm
grafana-agent-flow-0.34.3-1.amd64.rpm:
Header V4 RSA/SHA512 Signature, key ID 2cf3c0c6: OK
Header SHA256 digest: OK
Header SHA1 digest: OK
Payload SHA256 digest: OK |
Looking at other projects, it may also need |
Can you check against the boringcrypto suffixed images/binaries? |
@mattdurham doing a Looking at 566b5b9, I don't see any changes to packaging. Since it's failing on installation, I don't think that even if there was a binary built with boringcrypto and packaged in an RPM it would help this stage of the problem. The problem appears to be with the RPM, not the executable. |
I tried to reproduce this locally by creating a GPG key and building and signing an RPM with the The error from trying to install grafana-agent-flow might be instructive [root@fips-test ~]# rpm -i grafana-agent-flow-0.35.1-1.amd64.rpm
error: unpacking of archive failed on file /etc/grafana-agent-flow.river;64c165ff: cpio: Digest mismatch
error: grafana-agent-flow-0.35.1-1.x86_64: install failed Interestingly, the |
I think it is the lack of [root@fips-test ~]# rpm -qp --qf "%{filedigestalgo}\n" grafana-agent-flow-0.35.1-1.amd64.rpm
(none)
[root@fips-test ~]# rpm -qp --qf "%{filedigestalgo}\n" grafana-10.0.3-1.x86_64.rpm
8
[root@fips-test ~]# rpm -qp --qf "%{filedigestalgo}\n" hello-world-1.0.0-1.el9.noarch.rpm
8 Setting |
Closes grafana#4419, relates to grafana#4267 Signed-off-by: Andrew Imeson <[email protected]>
Closes grafana#4419, relates to grafana#4267 Signed-off-by: Andrew Imeson <[email protected]>
Closes grafana#4419, relates to grafana#4267 Signed-off-by: Andrew Imeson <[email protected]>
Closes grafana#4419, relates to grafana#4267 Signed-off-by: Andrew Imeson <[email protected]>
Something didn't work with my change (#4611 / #4622) [root@fips-test ~]# rpm -qp --qf "%{filedigestalgo}\n" grafana-agent-flow-0.35.2-1.amd64.rpm
(none) I know that the change worked when building from a CentOS 9 box, because if I set The documentation on this stuff is scattered, and most of it isn't from the RPM project 😖 I guess I'll have to build the container that the RPMs are building in and try and reproduce from there - unless there is some other hypothesis. |
The RPMs that get published are re-signed by the publish process, which might be making your change a no-op. @julienduchesne knows the most about the RPM publish process, but he's on PTO until the 31st. |
@rfratto I think the GPG signing is completely separate from the file digest creation (you can have the latter without the former), but I can't say for sure. I built the build-image/Dockerfile, setup the rpmmacros file, built my test package, and it's properly setting the file digest, so I remain confused. |
I take that back - I'll set this aside for a while and wait for Julien to take a look when he's back. |
Seems like the fix didn't work in #4268 since the digest is not OK either on the releases on this repo or on packages.grafana.net. Using @andrewimeson's command: julienduchesne@Juliens-MacBook-Pro ~ % rpm -qp --qf "%{filedigestalgo}\n" ~/Downloads/rpm_Packages_grafana-agent-0.34.3-1.amd64.rpm
(none)
julienduchesne@Juliens-MacBook-Pro ~ % rpm -qp --qf "%{filedigestalgo}\n" ~/Downloads/rpm_Packages_grafana-agent-0.35.2-1.amd64.rpm
(none)
julienduchesne@Juliens-MacBook-Pro ~ % rpm -qp --qf "%{filedigestalgo}\n" ~/Downloads/grafana-agent-0.35.2-1.amd64.rpm
(none) The first two files are from packages.grafana.net and the last one is from the repo's Github release. I've verified that there is no re-signing in our internal process uploading from Github releases -> packages.grafana.net so once the sig is fixed in the release process here: https://github.com/grafana/agent/blob/main/packaging/grafana-agent/rpm/gpg-sign.sh, then it should work |
@andrewimeson How did you try to test your fix? If you run |
@rfratto I tried it by building the I'll try with it with |
I am having a hard time getting a build environment working with the This may be exceeding my ability to troubleshoot given my lack of knowledge on the interworking of the Grafana agent build system. |
I just tested it, and the installation of v0.35.4 now works! Thank you! |
What's wrong?
This was first reported in #4267, and an attempt to fix was made in #4268, but the release since that PR was merged still is not able to be installed on a FIPS-mode EL system.
Steps to reproduce
# On a test CentOS 9 Stream box, enable FIPS mode (warning, irreversible) fips-mode-setup --enable shutdown -r now
And then with an
/etc/yum.repos.d/grafana.repo
with GPG checking turned on or off:System information
CentOS 9 Stream kernel 5.14.0-333.el9.x86_64
Software version
Grafana Flow Agent 0.34.3-1
Configuration
No response
Logs
No response
The text was updated successfully, but these errors were encountered: