Merge pull request #1986 from mhajas/master
KEYCLOAK-2127 Use add-user script for admin user creating
This commit is contained in:
commit
9840c47970
3 changed files with 92 additions and 6 deletions
|
@ -90,12 +90,6 @@ public abstract class AbstractKeycloakTest {
|
|||
|
||||
driverSettings();
|
||||
|
||||
if (!suiteContext.isAdminPasswordUpdated()) {
|
||||
log.debug("updating admin password");
|
||||
updateMasterAdminPassword();
|
||||
suiteContext.setAdminPasswordUpdated(true);
|
||||
}
|
||||
|
||||
importTestRealms();
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
[ {
|
||||
"realm" : "master",
|
||||
"users" : [ {
|
||||
"username" : "admin",
|
||||
"enabled" : true,
|
||||
"credentials" : [ {
|
||||
"type" : "password",
|
||||
"hashedSaltedValue" : "6K5rvcPu3dXndZOhpzLAVbFtcdlUhbGCrUyV0NNzeS61IdhMpjH8Mf4y/Ag/vHZkw4Ayvtvb9/1iMNOzxR0M6g==",
|
||||
"salt" : "/6M1jTMUB0uR8EOkksFn/A==",
|
||||
"hashIterations" : 100000,
|
||||
"algorithm" : "pbkdf2"
|
||||
} ],
|
||||
"realmRoles" : [ "admin" ]
|
||||
} ],
|
||||
"identityFederationEnabled" : false
|
||||
} ]
|
|
@ -91,6 +91,7 @@
|
|||
<auth.server.management.port.jmx>${auth.server.management.port.jmx}</auth.server.management.port.jmx>
|
||||
<auth.server.ssl.required>${auth.server.ssl.required}</auth.server.ssl.required>
|
||||
<startup.timeout.sec>${startup.timeout.sec}</startup.timeout.sec>
|
||||
<jboss.server.config.dir>${project.build.directory}/undertow-configuration</jboss.server.config.dir>
|
||||
</systemPropertyVariables>
|
||||
<properties>
|
||||
<property>
|
||||
|
@ -127,6 +128,31 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>2.7</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-admin-user-json-file</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/undertow-configuration</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/test/resources</directory>
|
||||
<includes>
|
||||
<include>keycloak-add-user.json</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
@ -413,6 +439,31 @@
|
|||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>2.7</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-admin-user-json-file</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${auth.server.wildfly.home}/standalone/configuration</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/test/resources</directory>
|
||||
<includes>
|
||||
<include>keycloak-add-user.json</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
@ -473,6 +524,31 @@
|
|||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>2.7</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-admin-user-json-file</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${auth.server.eap6.home}/standalone/configuration</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/test/resources</directory>
|
||||
<includes>
|
||||
<include>keycloak-add-user.json</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
|
Loading…
Reference in a new issue