jenkins-infra / helpdesk

Open your Infrastructure related issues here for the Jenkins project
https://github.com/jenkins-infra/helpdesk/issues/new/choose
17 stars 10 forks source link

[packer-images] Datadog public GPG rotated for 2024 #4178

Closed dduportal closed 4 months ago

dduportal commented 4 months ago

Service(s)

Other

Summary

All the Linux builds (VM, containers, x86, arm64) of https://github.com/jenkins-infra/packer-images/ are failing since a few days with the following error:

2024-07-15T09:28:31Z: ==&gt; azure-arm.ubuntu: W: GPG error: <a href='https://apt.datadoghq.com'>https://apt.datadoghq.com</a> stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E6266D4AC0962C7D
2024-07-15T09:28:31Z: ==&gt; azure-arm.ubuntu: E: The repository '<a href='https://apt.datadoghq.com'>https://apt.datadoghq.com</a> stable Release' is not signed.

As per https://docs.datadoghq.com/agent/guide/linux-key-rotation-2024/?tab=debianubuntu, datadog did rotate their public PGP key in June 2024 so we have to update our local copy in https://github.com/jenkins-infra/packer-images/blob/main/gpg-keys/datadog.gpg

⚠️ This issue prevents us to release a new version of the all-in-one images


Note: @smerle33 did propose to add anupdatecli manifest to automate this change through a PR. It's a good idea but the hard part is to find a smart shell command to retrieve the new key as the filename or ID changes on each year:

=> no obvious technique, will need some hack (parsing https://keys.datadoghq.com/, datadog API if any endpoint with these infos, or eventually a shell which extracts the ID of the key from their "latest" debian package and takes care of generating the new URL for download?

Reproduction steps

No response

smerle33 commented 4 months ago

Note: @smerle33 did propose to add anupdatecli manifest to automate this change through a PR. It's a good idea but the hard part is to find a smart shell command to retrieve the new key as the filename or ID changes on each year:

* 2023 Debian key URL: [keys.datadoghq.com/DATADOG_APT_KEY_F14F620E.public](https://keys.datadoghq.com/DATADOG_APT_KEY_F14F620E.public)

* 2024 Debian key URL: [keys.datadoghq.com/DATADOG_APT_KEY_C0962C7D.public](https://keys.datadoghq.com/DATADOG_APT_KEY_C0962C7D.public)

=> no obvious technique, will need some hack (parsing keys.datadoghq.com, datadog API if any endpoint with these infos, or eventually a shell which extracts the ID of the key from their "latest" debian package and takes care of generating the new URL for download?

I would have used : https://keys.datadoghq.com/DATADOG_APT_KEY_CURRENT.public

smerle33 commented 4 months ago

worked done with https://github.com/jenkins-infra/packer-images/pull/1282