forked from freedomofpress/securedrop-workstation-keyring
-
Notifications
You must be signed in to change notification settings - Fork 0
Version 0.3.0 #1
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
Open
deeplow
wants to merge
19
commits into
QubesOS-contrib:main
Choose a base branch
from
freedomofpress:0.3.0-qubes-contrib-pr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Version 0.3.0 #1
deeplow
wants to merge
19
commits into
QubesOS-contrib:main
from
freedomofpress:0.3.0-qubes-contrib-pr
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bump developer key (Cory) to make FPF's CI happy
Replace baseurl: use Qubes release instead of fedora
fix malformed codeowners file
Necessary due to the following Qubes Builder error:
13:58:50 [qb.fetch.securedrop-workstation-keyring.fetch] --> Verifying tags or commits...
13:58:50 [qb.fetch.securedrop-workstation-keyring.fetch] ---> No tag pointing at b9e0e3a
13:58:50 [qb.fetch.securedrop-workstation-keyring.fetch] ERROR: CalledProcessError(1, ['git', '-c', 'gpg.program=/usr/bin/gpg', '-c', 'gpg.minTrustLevel=fully', 'verify-commit', '--raw', '--', 'b9e0e3a5cbbee22ab85ad1aa8e5a3f9461534321']); stderr: error: gpg.ssh.allowedSignersFile needs to be configured and exist for ssh signature verification
13:58:50 [qb.fetch.securedrop-workstation-keyring.fetch]
13:58:50 [qb.fetch.securedrop-workstation-keyring.fetch] ---> Invalid commit b9e0e3a.
[...]
Fixes #49
Initialize empty git SSH signers file
Reduce the need to duplicate code that manages package RPM keys that otherwise could lead to the introduction of bugs.
According to systemd.timer man page the default timer accuracy is 1 minute. This needed to be overridden to a value closer to our set delay for it to more accurately trigger at the previously set --on-action=5s. Refs #36
Makes all systemd timers through 'sh -c' both for consistency but also to make sure all logic falls within system timers and not regular post-inst execution. This also removes '||:' at the end, in order to flag any problems.
Previously the systemd-timers triggered by the RPM scriptlets would only run once. If unsuccessful (i.e. the RPM transaction is still occurring, and the RPM key DB is locked) they would never have an effect. A timeout was also added to ensure there is a time limit. By allowing multiple retries until successful we further guarantee successful execution. Fixes #36
Especially under testing conditions (where packages are installed and uninstalled), it was possible that some timers would be hanging and interfering with future tests. This commit solves this issue by making checking keys before removing them. The only exception is importing a key in case of upgrade - this is because when a key is modified (e.g. expiration bump) it keeps the same key ID, but still needs to be imported, in order for the RPM to be aware of the updated version. Therefore, in these cases, the key is imported unconditionally.
Previously it was unclear which key IDs one was supposed to replace upon key rotation. This separates out the logic pertaining to old keys and the one related to new keys. This separation also makes it clear what is expected to happen during a package upgrade that replaces the key with a new one versus one where it simply updates a key (e.g. new signatures / new expiration date). NOTES: 1. Since the workstation has never had to rotate the old key ID is just a placeholder (gpg-pubkey-000000-000000). This should still work as it is simply trying to removing something that never existed. 2. This does not address situations where the user is upgrading from one key directly to another, but skipping a key rotation. This is an unlikely scenario as keys are only rarely expected to be rotated and such an outdated system would need a reinstall to be safe to use.
Some of the macros were duplicated, which leads to potentially forgetting to change something. This uses parameterized macros to follow the DRY principle.
Improve RPM key management accuracy
noop to test revised branch protections
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This includes two relevant fixes:
qubes-dom0-update. This is based on some of Marek's feedback on for Qubes Contrib's own keyring$releaseverin repo file to support inplace upgrades — Even thought we had previously noticed the possible need to do this, at the time it was not clear the dark magic behind inplace upgrade and following the pattern Qubes Contrb's own keyring would suffice (to have the builder replace@DIST@with the OS version). It turned out this wouldn't work for our case, and so we need the$releasever.It also includes some other changes (
.github/CODEOWNERS,scripts/build-rpm.shandsd-qubes-builder/*) which are not relevant really relevant, but they are more artifacts of some internal development we've done (to keep both repos in sync). If they cause any trouble, please let me know.At Freedom of the Press Foundation, we have tested this with an in-place upgrade successfully from Qubes 4.2 to 4.3.
After this gets merged, this package is ready for release for both Qubes 4.2 and 4.3 (CC @fepitre)