Display a banner in the JI regarding the noble migration #7348
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.
Status
Ready for review
Description of Changes
Display a banner in the JI regarding the noble migration
This is largely copied from the same functionality that was implemented during the focal migration (ecfecea).
There are two banners that can be seen:
OS_PAST_EOL is in effect after April 2, 2025 if the system is still
running on focal. The Source Interface automatically disables itself and
the Journalist Interface will display a banner informing journalists to
contact their administrator.
OS_NEEDS_MIGRATION_FIXES will display a notice in the Journalist
Interface if the check script has run and found issues that need
resolution. It doesn't affect the Source Interface.
The banners point at https://securedrop.org/focal-eol, which will be
set up as a redirect to the relevant documentation.
Both checks are done during startup, which means if the state changes
(e.g. disk space is freed up or a systemd unit fails), the banner state
will only change after the nightly reboot.
Disable "protocol" check from html_lint.py
This actively dissuades from using HTTPS URLs, favoring
protocol-relative ones. Even ignoring HTTPS-only URLs as a best
practice, given most onion services are hosted as HTTP sites,
they'd become HTTP links instead of HTTPS.
So let's just suppress this rule and link to the correct protocol.
Refs #7322
Testing
How should the reviewer test this PR?
/etc/securedrop-noble-migration.json
in the dev container with a false value, the migration banner will be triggeredFOCAL_ENDOFLIFE
date in server_os.py to 2024 or some other past date, the EOL banner will be triggered.Deployment
Any special considerations for deployment? n/a
Checklist
make lint
) and tests (make test
) pass in the development container