feature and fixes sync from development branch#519
Merged
Conversation
* Add these new vars for safer badfishing - BADFISH_PASSWORD - BADFISH_USERNAME - BADFISH_NEW_PASSWORD - BADFISH_OLD_PASSWORD * Update venv example for PYTHONPATH fixes: #496
* incorpoate some suggestions from @stephane-chazelas
* This is clumsy and very unlikely these values will be an env variable. * Nothing keeps people from securing it with a temporary export but it is not in scope for using stored env vars which tend to be static or change rarely and thus makes more sense to concentrate on for this feature.
feat: support auth via env vars
* find_session_uri masks a proper error message when someone passes incorrect credentials (either by vars or user/pass). * response body seems to be a JSON object and not a redfish root object and we are not generating a useful error, instead the user gets a traceback that masks the real cause. before (see #517) after -=>>PYTHONPATH="./src" python3 src/badfish/main.py -H mgmt-d23-h31-000-r650.example.com -u root -p awrongpassword --power-state - WARNING - Passing secrets via command line arguments can be unsafe. Consider using environment variables (BADFISH_USERNAME, BADFISH_PASSWORD). - ERROR - Failed to authenticate. Verify your credentials for mgmt-d23-h31-000-r650.example.com * Also remove asyncio import from tests/test_main_coverage.py as it wasn't being utilized. fixes: #517
fix: Incorrect credentials are masked by traceback
chore: fix debug logger typo
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.
fixes: #496
fixes: #517