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

Merged
merged 10 commits into from
Dec 5, 2024

Conversation

tejasdrolia
Copy link
Contributor

@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

Preview Give feedback

Desired reviewers

@mention

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

Maintainer checklist

Preview Give feedback

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
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.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Copy link
Member

@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)

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@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

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
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

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@tejasdrolia
Copy link
Contributor Author

tejasdrolia commented Nov 29, 2024

@MarkEWaite @basil
Can you guys help in getting this PR merged?

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@fcojfernandez
Copy link
Member

@jenkinsci/core-pr-reviewers any chance to get help to get this merged?

@res0nance res0nance added ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted labels Dec 4, 2024
@res0nance
Copy link
Contributor

LGTM, I've set the ready for merge label. I'll be away for a few days but someone else can feel free to merge this in 24 hours if nothing comes up. Else I'll merge this when I'm back

@krisstern krisstern merged commit 0f0b023 into jenkinsci:master Dec 5, 2024
16 checks passed
Copy link

welcome bot commented Dec 5, 2024

Congratulations on getting your very first Jenkins core pull request merged 🎉🥳

This is a fantastic achievement, and we're thrilled to have you as part of our community! Thank you for your valuable input, and we look forward to seeing more of your contributions in the future!

We would like to invite you to join the community chats and forums to meet other Jenkins contributors 😊
Don't forget to check out the participation page to learn more about how to contribute to Jenkins.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet