Skip to content
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

Added strict validation for username and password in backend. #4670

Conversation

aryan-bhokare
Copy link
Contributor

@aryan-bhokare aryan-bhokare commented May 23, 2024

Proposed changes

Added validation for username and password in backend.
Following #4650

Types of changes

What types of changes does your code introduce to Litmus? Put an x in the boxes that apply

  • New feature (non-breaking change which adds functionality)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices applies)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc
  • I have signed the commit for DCO to be passed.
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added necessary documentation (if appropriate)

Dependency

  • Please add the links to the dependent PR need to be merged before this (if any).

Special notes for your reviewer:

Signed-off-by: aryan <aryan1bhokare@gmail.com>
Signed-off-by: aryan <aryan1bhokare@gmail.com>
@aryan-bhokare aryan-bhokare force-pushed the backend-validation-username-password branch from bef75aa to edaa0cf Compare May 23, 2024 13:08
Signed-off-by: aryan <aryan1bhokare@gmail.com>
@aryan-bhokare aryan-bhokare force-pushed the backend-validation-username-password branch from edaa0cf to 3d2c6c1 Compare May 23, 2024 13:10
Signed-off-by: aryan <aryan1bhokare@gmail.com>
Signed-off-by: aryan <aryan1bhokare@gmail.com>
@aryan-bhokare aryan-bhokare force-pushed the backend-validation-username-password branch from 2b85b38 to 2e5b970 Compare May 24, 2024 09:54
@SarthakJain26
Copy link
Contributor

@aryan-bhokare, can you please add an ENV to enable/disable the strict password validation. This ENV (ENABLE_STRICT_PASSWORD_POLICY) will be true by default, i.e. strict password policy check will be implemented, but user can toggle that off based on the use case.

aryan-bhokare and others added 4 commits June 19, 2024 18:26
Co-authored-by: Vedant Shrotria <vedant.shrotria@harness.io>
Signed-off-by: Aryan Bhokare <92683836+aryan-bhokare@users.noreply.github.com>
Co-authored-by: Vedant Shrotria <vedant.shrotria@harness.io>
Signed-off-by: Aryan Bhokare <92683836+aryan-bhokare@users.noreply.github.com>
Signed-off-by: aryan <aryan1bhokare@gmail.com>
aryan-bhokare and others added 2 commits June 25, 2024 17:34
Signed-off-by: Aryan Bhokare <92683836+aryan-bhokare@users.noreply.github.com>
Signed-off-by: aryan <aryan1bhokare@gmail.com>
@Saranya-jena Saranya-jena merged commit 9d2c93a into litmuschaos:master Jun 27, 2024
18 checks passed
andoriyaprashant pushed a commit to andoriyaprashant/litmus that referenced this pull request Jul 6, 2024
…chaos#4670)

* Added strict validation for username and password in backend.

Signed-off-by: aryan <aryan1bhokare@gmail.com>

* fixed silly mistake

Signed-off-by: aryan <aryan1bhokare@gmail.com>

* some requested changes.

Signed-off-by: aryan <aryan1bhokare@gmail.com>

* modified tests

Signed-off-by: aryan <aryan1bhokare@gmail.com>

* small change

Signed-off-by: aryan <aryan1bhokare@gmail.com>

* Update message string in chaoscenter/authentication/api/handlers/doc.go

Co-authored-by: Vedant Shrotria <vedant.shrotria@harness.io>
Signed-off-by: Aryan Bhokare <92683836+aryan-bhokare@users.noreply.github.com>

* Update error message chaoscenter/authentication/pkg/utils/sanitizers.go

Co-authored-by: Vedant Shrotria <vedant.shrotria@harness.io>
Signed-off-by: Aryan Bhokare <92683836+aryan-bhokare@users.noreply.github.com>

* Modified swagger with requested changes.

Signed-off-by: aryan <aryan1bhokare@gmail.com>

* added negative tests for requested functions and fixed some conflicts.

Signed-off-by: aryan <aryan1bhokare@gmail.com>

---------

Signed-off-by: aryan <aryan1bhokare@gmail.com>
Signed-off-by: Aryan Bhokare <92683836+aryan-bhokare@users.noreply.github.com>
Co-authored-by: Vedant Shrotria <vedant.shrotria@harness.io>
Co-authored-by: Saranya Jena <saranya.jena@harness.io>
Signed-off-by: andoriyaprashant <prashantandoriya@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants