Repository navigation
Update to mokkari 4.10.0 and remove Basic Auth support - #277
Merged
Merged
Conversation
mokkari 4.10.0 deprecates username/password (Basic Auth) authentication, so metron-tagger now authenticates only with an API token. - Bump mokkari to >=4.10.0 (including the redis extra) - Talker now takes the API token as its first argument; `username` is an optional keyword used only to key the Redis rate limiter and is no longer sent to Metron - The CLI prompts only for an API token and explains where to generate one; the username/password prompt and token-migration offer are removed - Drop the `password` and `token_migration_prompted` settings and scrub them from existing settings.ini files on load, so stored plaintext passwords are deleted - Remove the now-unused MetronTaggerSettings.remove_option() - Update tests and the README Redis FAQ BREAKING CHANGE: users still on username/password will be prompted for an API token the next time they run --online or --id.
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.
Summary
mokkari 4.10.0 deprecates username/password (Basic Auth) authentication, and mokkari 5.0 will remove it. This PR updates to mokkari 4.10.0 and makes metron-tagger authenticate only with a Metron API token.
Changes
pyproject.toml/uv.lock: Requiresmokkari>=4.10.0, including theredisextra.talker.py:Talker(api_token, metron_info, comic_info, *, username=None, redis_url=None). Only the token is passed tomokkari.api().usernameis still accepted, but only to key the Redis rate limiter. It's never sent to Metron.cli.py: If no token is configured, the CLI explains where to generate one (Metron profile page → "API Tokens") and prompts for it. Removes the username/password prompt and the one-time offer to switch to a token.run.py: Passesmetron.auth_tokentoTalker, plusmetron.userfor the Redis limiter.settings.py: Removes thepasswordandtoken_migration_prompteddefaults. AddsOBSOLETE_OPTIONS, which removes these keys from existingsettings.inifiles on load, so a plaintext password saved by an older version is deleted.useris kept. Removes the now-unusedremove_option()method.README.md: The Redis FAQ no longer describes token auth as optional.Talkerconstructor calls and the CLI credential tests for token-only auth. Removed the password/migration settings tests. Added a test that obsolete options are removed from an existing settings file.Breaking change
Users still on username/password will be asked for an API token the next time they run
--onlineor--id, and their stored password is removed fromsettings.ini. Users who want Redis rate limiting still needuserset.