-
Notifications
You must be signed in to change notification settings - Fork 33
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
Epmrpp 87165 logger #323
Epmrpp 87165 logger #323
Changes from 10 commits
07f3361
6b772d9
92ca1fa
b678751
75fd071
6af1169
8d0f4cf
645f375
f8921a3
d920531
a1b2a65
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Copyright 2024 EPAM Systems | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.epam.reportportal.auth.integration.parameter; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
import org.springframework.security.crypto.argon2.Argon2PasswordEncoder; | ||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; | ||
import org.springframework.security.crypto.password.PasswordEncoder; | ||
import org.springframework.security.crypto.password.Pbkdf2PasswordEncoder; | ||
import org.springframework.security.crypto.password.Pbkdf2PasswordEncoder.SecretKeyFactoryAlgorithm; | ||
import org.springframework.security.crypto.scrypt.SCryptPasswordEncoder; | ||
|
||
/** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
* @author <a href="mailto:[email protected]">Andrei Piankouski</a> | ||
*/ | ||
public class CustomPasswordEncoderFactory { | ||
|
||
public static Map<String, PasswordEncoder> createDelegatingPasswordEncoder() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
Map<String, PasswordEncoder> encoders = new HashMap<>(); | ||
encoders.put("bcrypt", new BCryptPasswordEncoder()); | ||
encoders.put("ldap", new org.springframework.security.crypto.password.LdapShaPasswordEncoder()); | ||
Check failure Code scanning / SonarCloud Passwords should not be stored in plaintext or with a fast hashing algorithm High
Use secure "PasswordEncoder" implementation. See more on SonarCloud
|
||
encoders.put("md4", new org.springframework.security.crypto.password.Md4PasswordEncoder()); | ||
Check failure Code scanning / SonarCloud Passwords should not be stored in plaintext or with a fast hashing algorithm High
Use secure "PasswordEncoder" implementation. See more on SonarCloud
|
||
encoders.put("md5", new org.springframework.security.crypto.password.MessageDigestPasswordEncoder("MD5")); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Check failure Code scanning / SonarCloud Passwords should not be stored in plaintext or with a fast hashing algorithm High
Use secure "PasswordEncoder" implementation. See more on SonarCloud
|
||
encoders.put("noop", org.springframework.security.crypto.password.NoOpPasswordEncoder.getInstance()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Check failure Code scanning / SonarCloud Passwords should not be stored in plaintext or with a fast hashing algorithm High
Use secure "PasswordEncoder" implementation. See more on SonarCloud
|
||
encoders.put("pbkdf2", new Pbkdf2PasswordEncoder()); | ||
Pbkdf2PasswordEncoder PBKDF2_SHA256 = new Pbkdf2PasswordEncoder(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
PBKDF2_SHA256.setAlgorithm(SecretKeyFactoryAlgorithm.PBKDF2WithHmacSHA256); | ||
encoders.put("pbkdf2_sha256", PBKDF2_SHA256); | ||
Pbkdf2PasswordEncoder PBKDF2_SHA512 = new Pbkdf2PasswordEncoder(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
PBKDF2_SHA512.setAlgorithm(SecretKeyFactoryAlgorithm.PBKDF2WithHmacSHA512); | ||
encoders.put("pbkdf2_sha512", new Pbkdf2PasswordEncoder()); | ||
encoders.put("scrypt", new SCryptPasswordEncoder()); | ||
Check failure Code scanning / SonarCloud Passwords should not be stored in plaintext or with a fast hashing algorithm High
Use secure "PasswordEncoder" implementation. See more on SonarCloud
|
||
encoders.put("sha-1", new org.springframework.security.crypto.password.MessageDigestPasswordEncoder("SHA-1")); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Check failure Code scanning / SonarCloud Passwords should not be stored in plaintext or with a fast hashing algorithm High
Use secure "PasswordEncoder" implementation. See more on SonarCloud
|
||
encoders.put("sha-256", | ||
new org.springframework.security.crypto.password.MessageDigestPasswordEncoder("SHA-256")); | ||
Check failure Code scanning / SonarCloud Passwords should not be stored in plaintext or with a fast hashing algorithm High
Use secure "PasswordEncoder" implementation. See more on SonarCloud
|
||
encoders.put("sha256", new org.springframework.security.crypto.password.StandardPasswordEncoder()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Check failure Code scanning / SonarCloud Passwords should not be stored in plaintext or with a fast hashing algorithm High
Use secure "PasswordEncoder" implementation. See more on SonarCloud
|
||
encoders.put("argon2", new Argon2PasswordEncoder()); | ||
return encoders; | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is longer than 100 characters (found 124).