-
-
Notifications
You must be signed in to change notification settings - Fork 239
[806][FIX] Ensure passwords are aphanumeric #840
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
base: develop
Are you sure you want to change the base?
Conversation
Special characters in passwords may break some functionality. Celery seems to have an issue with special characters (either `+` or `/`) that cause the worker to exit without displaying any errors. Attempts to URL-escape the password seem to fail since the value is interpolated at some point and Python throws an exception since some `%XX` escape codes are not valid syntax. This change reimplements the `validate_config` function to check that the POSTGRES password / admin password and IRIS secret key / password salt are long (longer than 30 characters) alphanumeric strings. It should not affect users of the "scripts/iris_helper.sh" helper script since the values generated by it are 32 characters long. The old implementation was removed because the function was not called and the check `section not in self` looks invalid. Closes dfir-iris#806 Signed-off-by: Darius Mihai <[email protected]>
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Hi @darius-m Thanks for this PR (and all the other ones, really helpful) - for this one I'm afraid we'd stuck some users that are already using IRIS and don't have the required password length. It's a bit of a breaking change since change the DB password isn't that straightforward. |
Hi @whikernel I assumed the length may be an issue, and unfortunately I don't have a good idea how this should be handled. As a stop-gap, I added the environment variable that defines the minimum length, but it's not ideal either. I think the length requirement can be removed, if it can cause too many issues; the important part is making sure (various) special characters are avoided to not break Celery. Also, the character set can be tweaked using regexes; instead of |
Special characters in passwords may break some functionality. Celery seems to have an issue with special characters (either
+
or/
) that cause the worker to exit without displaying any errors. Attempts to URL-escape the password seem to fail since the value is interpolated at some point and Python throws an exception since some%XX
escape codes are not valid syntax.This change reimplements the
validate_config
function to check that the POSTGRES password / admin password and IRIS secret key / password salt are long (longer than 30 characters) alphanumeric strings. It should not affect users of the "scripts/iris_helper.sh" helper script since the values generated by it are 32 characters long.The old implementation was removed because the function was not called and the check
section not in self
looks invalid.Closes #806