Enforce configured peer requirements in accountreq helper for all reqs - #587
Open
jonasbardino wants to merge 1 commit into
Conversation
…forces any configured mandatory peer requirements even if the request handled lacks valid peer fields. Extends the unit test suite with regression tests to cover a few cases of invalid or missing peers in combination with mandatory peer configuration. Also makes sure that the various renewal and password reset tests cover the relevant 'temporal' account status rather than the empty default (interpreted as 'active'). Fast-forward a few unit tests to use the latest usersupp helpers to limit code duplication.
jonasbardino
marked this pull request as ready for review
July 5, 2026 13:49
Martin-Rehr
approved these changes
Jul 28, 2026
Martin-Rehr
left a comment
Contributor
There was a problem hiding this comment.
The changes looks sane but it seems like there is an issue in mig/lib/janitor.py:319:
if accept_account_req(req_id, configuration, peer_id, ...):
_logger.info("accepted authorized %r access renew" % client_id)
else:
_logger.warning("failed authorized %r access renew" % client_id)
accept_account_req returns a 2-tuple a non-empty tuple is evaluated to True, so the else is never reached ?
Contributor
Author
Yes, I've already found and fixed it in 630acfa but thanks. We can pull that particular fix in here as well to fast-track it if you like? |
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
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.
Make sure the
accept_account_reqhelper fromaccountreqalways enforces any configured peer requirements even if the request handled lacks valid peer fields. This may or may not fix the issues reported in #586.Extends the unit test suite with regression tests to cover a few cases of invalid or missing peers in combination with mandatory peer configuration.
Also makes sure that the various renewal and password reset tests cover the relevant 'temporal' account status rather than the empty default (interpreted as 'active').
Fast-forward a few unit tests to use the latest
usersupphelpers to limit code duplication.