Merge pull request #1815 from abstractj/KEYCLOAK-2064
KEYCLOAK-2064: Update pax-web to make use of SecureRandom
This commit is contained in:
commit
ee0dd7e200
1 changed files with 3 additions and 2 deletions
|
@ -1,9 +1,9 @@
|
|||
package org.keycloak.adapters.osgi;
|
||||
|
||||
import java.net.URL;
|
||||
import java.security.SecureRandom;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import org.eclipse.jetty.security.ConstraintMapping;
|
||||
import org.eclipse.jetty.util.security.Constraint;
|
||||
|
@ -133,7 +133,8 @@ public class PaxWebIntegrationService {
|
|||
Constraint constraint = constraintMapping.getConstraint();
|
||||
String[] roles = constraint.getRoles();
|
||||
// name property is unavailable on constraint object :/
|
||||
String name = "Constraint-" + new Random().nextInt();
|
||||
|
||||
String name = "Constraint-" + new SecureRandom().nextInt(Integer.MAX_VALUE);
|
||||
|
||||
int dataConstraint = constraint.getDataConstraint();
|
||||
String dataConstraintStr;
|
||||
|
|
Loading…
Reference in a new issue