-
Notifications
You must be signed in to change notification settings - Fork 222
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
Improvements for APT keys management #351
Conversation
bkabrda
commented
Apr 22, 2021
- By default, get keys from keys.datadoghq.com, not Ubuntu keyserver
- Always add the DATADOG_APT_KEY_CURRENT.public key (contains key used to sign current repodata)
- Add 'signed-by' option to all sources list lines
- On Debian >= 9 and Ubuntu >= 16, only add keys to /usr/share/keyrings/datadog-archive-keyring.gpg
- On older systems, also add the same keyring to /etc/apt/trusted.gpg.d
* By default, get keys from keys.datadoghq.com, not Ubuntu keyserver * Always add the DATADOG_APT_KEY_CURRENT.public key (contains key used to sign current repodata) * Add 'signed-by' option to all sources list lines * On Debian >= 9 and Ubuntu >= 16, only add keys to /usr/share/keyrings/datadog-archive-keyring.gpg * On older systems, also add the same keyring to /etc/apt/trusted.gpg.d
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.
just one small content suggestion
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.
The main thing that's worrying me is that the role cannot be idempotent (since we always perform at least one action, importing the current key, each run). While that does reflect the truth, it may not sit well with customers (we've already had issues open because our role would show as doing a change every run).
However, making the role idempotent seems to be a non-trivial effort: one way to do it could be to import the key, and check if something was really imported or changed in the GPG command output (and if not, mark the task as not changed
), but I don't know how feasible / easy that is in practice.
Co-authored-by: Kylian Serrania <[email protected]>
@KSerrania that's a good point about idempotency. I think perhaps this might be doable, I'll try to take a look. |
@KSerrania I think I managed to implement a reasonable solution. Here's the comment that I included in the code:
|