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

[JENKINS-74858] Added validation for Password length in FIPS mode #9995

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

tejasdrolia
Copy link

@tejasdrolia tejasdrolia commented Nov 20, 2024

See JENKINS-74858.

Made changes to ensure that an exisiting user is now unable to alter the password to less than 14 characters in length when operating in FIPS mode.

Testing done

Automated Unit Testing
Implemented unit tests to verify FIPS compliance for password changes:

  1. Ensured that passwords shorter than 14 characters are rejected when FIPS mode is enabled.
  2. Verified that mismatched passwords between user.password and user.password2 trigger appropriate errors.

Manual Testing
Did Manual testing to verify my changes to ensure that everything is working properly.


Without FIPS mode: Shorter password is being accepted.
Screenshot 2024-11-20 at 12 37 33 PM


With FIPS mode: Shorter password is not being accepted.
Screenshot 2024-11-20 at 12 41 00 PM
Screenshot 2024-11-20 at 12 41 09 PM

Proposed changelog entries

  • Added Password validation to ensure that existing users cannot create a password of less than 14 characters in length(when in FIPS mode).

Proposed upgrade guidelines

N/A

Submitter checklist

Desired reviewers

@mention

Before the changes are marked as ready-for-merge:

Maintainer checklist

Copy link

welcome bot commented Nov 20, 2024

Yay, your first pull request towards Jenkins core was created successfully! Thank you so much!

A contributor will provide feedback soon. Meanwhile, you can join the chats and community forums to connect with other Jenkins users, developers, and maintainers.

Copy link
Member

@daniel-beck daniel-beck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice if newly added tests covered the success case (long + matching password) in addition to not relying on mocks.

Copy link
Contributor

@fcojfernandez fcojfernandez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have spotless issues, just execute mvn clean install -DskipTests to see and fix them

(haven't see them clearly in the CI logs, but they seem to be related to my comments about the empty line and the wildcard)

@tejasdrolia tejasdrolia changed the title JENKINS-74858 | Added validation for Password length in FIPS mode [JENKINS-74858] Added validation for Password length in FIPS mode Nov 20, 2024
Copy link

@pankajy-dev pankajy-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

6 participants