diff --git a/bundled-war-example/README.md b/bundled-war-example/README.md deleted file mode 100755 index 269f1596ae..0000000000 --- a/bundled-war-example/README.md +++ /dev/null @@ -1,16 +0,0 @@ -Self Bootstrapping Keycloak Server and Bundled Application -========================================================== - -This is an example of bundling the Keycloak server with an app within the same WAR in an EAP 6.x environment. - -* On bootup, a default realm is imported from WEB-INF/testrealm.json if it doesn't exist yet. -* On bootup, the adapter config is created on the fly and configured with the testrealm imported. -* The application is secured with keycloak (see jboss-web.xml) -* web.xml security constraints are set for the secured URLs that are secured by keycloak -* Because of weirdness with Resteasy 2.3.x, any secured JAX-RS urls from the application must have a security -constraint that denies all as they will be reachable in two places. Under the Keycloak REST url "/rest" and under the -application's REST url "/database". -* Adapter config can be modified on the fly by getting the AdapterDeploymentContext from a servlet context attribute. -* You must specify a host-port context param so that the auth url for AdapterConfig can be set correctly. - -* Run this demo by going to http://localhost:8080/app-bundle. Then click on the url. \ No newline at end of file diff --git a/bundled-war-example/pom.xml b/bundled-war-example/pom.xml deleted file mode 100755 index 3797f58e4f..0000000000 --- a/bundled-war-example/pom.xml +++ /dev/null @@ -1,283 +0,0 @@ - - - - keycloak-parent - org.keycloak - 1.0-beta-1-SNAPSHOT - - - 4.0.0 - app-bundle - war - Keycloak Server and App Bundle EAP 6.x - - - - - org.bouncycastle - bcprov-jdk16 - - - org.keycloak - keycloak-core - ${project.version} - - - org.keycloak - keycloak-adapter-core - ${project.version} - - - org.keycloak - keycloak-jboss-adapter-core - ${project.version} - - - org.keycloak - keycloak-as7-adapter - ${project.version} - - - net.iharder - base64 - - - org.keycloak - keycloak-core-jaxrs - ${project.version} - - - org.keycloak - keycloak-services - ${project.version} - - - com.google.zxing - javase - - - org.keycloak - keycloak-model-api - ${project.version} - - - org.keycloak - keycloak-model-jpa - ${project.version} - - - org.keycloak - keycloak-audit-api - ${project.version} - - - org.keycloak - keycloak-audit-jpa - ${project.version} - - - org.keycloak - keycloak-audit-jboss-logging - ${project.version} - - - - org.keycloak - keycloak-social-core - ${project.version} - - - org.keycloak - keycloak-social-github - ${project.version} - - - org.keycloak - keycloak-social-google - ${project.version} - - - org.keycloak - keycloak-social-twitter - ${project.version} - - - org.twitter4j - twitter4j-core - - - org.keycloak - keycloak-social-facebook - ${project.version} - - - - org.keycloak - keycloak-forms-common-freemarker - ${project.version} - - - org.freemarker - freemarker - - - org.keycloak - keycloak-forms-common-themes - ${project.version} - - - org.keycloak - keycloak-account-api - ${project.version} - - - org.keycloak - keycloak-account-freemarker - ${project.version} - - - org.keycloak - keycloak-login-api - ${project.version} - - - org.keycloak - keycloak-login-freemarker - ${project.version} - - - org.keycloak - keycloak-js-adapter - ${project.version} - - - - org.keycloak - keycloak-authentication-api - ${project.version} - - - org.keycloak - keycloak-authentication-model - ${project.version} - - - org.keycloak - keycloak-authentication-picketlink - ${project.version} - - - org.picketlink - picketlink-common - - - org.picketlink - picketlink-idm-api - - - org.picketlink - picketlink-idm-impl - - - org.picketlink - picketlink-idm-simple-schema - - - - - org.keycloak - keycloak-timer-api - ${project.version} - - - org.keycloak - keycloak-timer-basic - ${project.version} - - - - - org.keycloak - keycloak-picketlink-api - ${project.version} - - - org.keycloak - keycloak-picketlink-realm - ${project.version} - - - org.jboss.spec.javax.servlet - jboss-servlet-api_3.0_spec - provided - - - - org.jboss.resteasy - resteasy-jaxrs - ${resteasy.version} - provided - - - org.jboss.resteasy - resteasy-multipart-provider - ${resteasy.version} - provided - - - org.jboss.resteasy - async-http-servlet-3.0 - ${resteasy.version} - provided - - - org.jboss.resteasy - jaxrs-api - ${resteasy.version} - provided - - - org.jboss.resteasy - resteasy-jackson-provider - ${resteasy.version} - provided - - - - - javax.enterprise - cdi-api - 1.1 - provided - - - - - - app-bundle - - - org.jboss.as.plugins - jboss-as-maven-plugin - 7.5.Final - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - - - - diff --git a/bundled-war-example/src/main/java/org/keycloak/example/CustomerDatabaseClient.java b/bundled-war-example/src/main/java/org/keycloak/example/CustomerDatabaseClient.java deleted file mode 100755 index 79bbeb8204..0000000000 --- a/bundled-war-example/src/main/java/org/keycloak/example/CustomerDatabaseClient.java +++ /dev/null @@ -1,72 +0,0 @@ -package org.keycloak.example; - -import org.apache.http.HttpEntity; -import org.apache.http.HttpResponse; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpGet; -import org.keycloak.KeycloakSecurityContext; -import org.keycloak.adapters.HttpClientBuilder; -import org.keycloak.representations.IDToken; -import org.keycloak.util.JsonSerialization; - -import javax.servlet.http.HttpServletRequest; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.List; - -/** - * @author Bill Burke - * @version $Revision: 1 $ - */ -public class CustomerDatabaseClient { - - static class TypedList extends ArrayList { - } - - public static class Failure extends Exception { - private int status; - - public Failure(int status) { - this.status = status; - } - - public int getStatus() { - return status; - } - } - - public static IDToken getIDToken(HttpServletRequest req) { - KeycloakSecurityContext session = (KeycloakSecurityContext) req.getAttribute(KeycloakSecurityContext.class.getName()); - return session.getIdToken(); - - } - - public static List getCustomers(HttpServletRequest req) throws Failure { - KeycloakSecurityContext session = (KeycloakSecurityContext) req.getAttribute(KeycloakSecurityContext.class.getName()); - - HttpClient client = new HttpClientBuilder() - .disableTrustManager().build(); - try { - HttpGet get = new HttpGet("http://localhost:8080/app-bundle/database/customers"); - get.addHeader("Authorization", "Bearer " + session.getTokenString()); - try { - HttpResponse response = client.execute(get); - if (response.getStatusLine().getStatusCode() != 200) { - throw new Failure(response.getStatusLine().getStatusCode()); - } - HttpEntity entity = response.getEntity(); - InputStream is = entity.getContent(); - try { - return JsonSerialization.readValue(is, TypedList.class); - } finally { - is.close(); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } finally { - client.getConnectionManager().shutdown(); - } - } -} diff --git a/bundled-war-example/src/main/java/org/keycloak/example/oauth/CustomerDataProvider.java b/bundled-war-example/src/main/java/org/keycloak/example/oauth/CustomerDataProvider.java deleted file mode 100644 index a9b938da4a..0000000000 --- a/bundled-war-example/src/main/java/org/keycloak/example/oauth/CustomerDataProvider.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * JBoss, Home of Professional Open Source - * Copyright Red Hat, Inc., and individual contributors. - * - * 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 org.keycloak.example.oauth; - -import java.util.ArrayList; -import java.util.List; - -public class CustomerDataProvider { - - public List getCustomers() { - ArrayList rtn = new ArrayList(); - rtn.add("Bill Burke"); - rtn.add("Stian Thorgersen"); - rtn.add("Stan Silvert"); - rtn.add("Gabriel Cardoso"); - rtn.add("Viliam Rockai"); - rtn.add("Marek Posolda"); - rtn.add("Boleslaw Dawidowicz"); - return rtn; - } -} diff --git a/bundled-war-example/src/main/java/org/keycloak/example/oauth/CustomerService.java b/bundled-war-example/src/main/java/org/keycloak/example/oauth/CustomerService.java deleted file mode 100755 index 4f1866aabd..0000000000 --- a/bundled-war-example/src/main/java/org/keycloak/example/oauth/CustomerService.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.keycloak.example.oauth; - -import org.jboss.resteasy.annotations.cache.NoCache; - -import javax.inject.Inject; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import java.util.List; - -/** - * @author Bill Burke - * @version $Revision: 1 $ - */ -@Path("customers") -public class CustomerService { - - @Inject - private CustomerDataProvider provider; - - @GET - @Produces("application/json") - @NoCache - public List getCustomers() { - return provider.getCustomers(); - } -} diff --git a/bundled-war-example/src/main/java/org/keycloak/example/oauth/DataApplication.java b/bundled-war-example/src/main/java/org/keycloak/example/oauth/DataApplication.java deleted file mode 100755 index 10590acbf3..0000000000 --- a/bundled-war-example/src/main/java/org/keycloak/example/oauth/DataApplication.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.keycloak.example.oauth; - -import javax.ws.rs.core.Application; -import java.util.HashSet; -import java.util.Set; - -/** - * @author Bill Burke - * @version $Revision: 1 $ - */ -public class DataApplication extends Application -{ - @Override - public Set> getClasses() { - HashSet> set = new HashSet>(); - set.add(CustomerService.class); - set.add(ProductService.class); - return set; - } - - @Override - public Set getSingletons() { - return super.getSingletons(); //To change body of overridden methods use File | Settings | File Templates. - } -} diff --git a/bundled-war-example/src/main/java/org/keycloak/example/oauth/ProductService.java b/bundled-war-example/src/main/java/org/keycloak/example/oauth/ProductService.java deleted file mode 100755 index 10fd5d765f..0000000000 --- a/bundled-war-example/src/main/java/org/keycloak/example/oauth/ProductService.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.keycloak.example.oauth; - -import org.jboss.resteasy.annotations.cache.NoCache; - -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import java.util.ArrayList; -import java.util.List; - -/** - * @author Bill Burke - * @version $Revision: 1 $ - */ -@Path("products") -public class ProductService { - @GET - @Produces("application/json") - @NoCache - public List getProducts() { - ArrayList rtn = new ArrayList(); - rtn.add("iphone"); - rtn.add("ipad"); - rtn.add("ipod"); - return rtn; - } -} diff --git a/bundled-war-example/src/main/resources/META-INF/beans.xml b/bundled-war-example/src/main/resources/META-INF/beans.xml deleted file mode 100644 index 57025b5976..0000000000 --- a/bundled-war-example/src/main/resources/META-INF/beans.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - \ No newline at end of file diff --git a/bundled-war-example/src/main/resources/META-INF/persistence.xml b/bundled-war-example/src/main/resources/META-INF/persistence.xml deleted file mode 100755 index 616f8e8c5e..0000000000 --- a/bundled-war-example/src/main/resources/META-INF/persistence.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - java:jboss/datasources/ExampleDS - org.keycloak.models.jpa.entities.ApplicationEntity - org.keycloak.models.jpa.entities.CredentialEntity - org.keycloak.models.jpa.entities.OAuthClientEntity - org.keycloak.models.jpa.entities.RealmEntity - org.keycloak.models.jpa.entities.RequiredCredentialEntity - org.keycloak.models.jpa.entities.AuthenticationProviderEntity - org.keycloak.models.jpa.entities.ApplicationRoleEntity - org.keycloak.models.jpa.entities.RealmRoleEntity - org.keycloak.models.jpa.entities.SocialLinkEntity - org.keycloak.models.jpa.entities.AuthenticationLinkEntity - org.keycloak.models.jpa.entities.UserEntity - org.keycloak.models.jpa.entities.UserSessionEntity - org.keycloak.models.jpa.entities.UsernameLoginFailureEntity - org.keycloak.models.jpa.entities.UserRoleMappingEntity - org.keycloak.models.jpa.entities.ScopeMappingEntity - - true - - - - - - - - java:jboss/datasources/ExampleDS - org.keycloak.audit.jpa.EventEntity - - true - - - - - - - diff --git a/bundled-war-example/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/bundled-war-example/src/main/webapp/WEB-INF/jboss-deployment-structure.xml deleted file mode 100755 index 5457fd5b27..0000000000 --- a/bundled-war-example/src/main/webapp/WEB-INF/jboss-deployment-structure.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/bundled-war-example/src/main/webapp/WEB-INF/jboss-web.xml b/bundled-war-example/src/main/webapp/WEB-INF/jboss-web.xml deleted file mode 100755 index 2f94ba4bca..0000000000 --- a/bundled-war-example/src/main/webapp/WEB-INF/jboss-web.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - org.keycloak.adapters.as7.KeycloakAuthenticatorValve - - \ No newline at end of file diff --git a/bundled-war-example/src/main/webapp/WEB-INF/testrealm.json b/bundled-war-example/src/main/webapp/WEB-INF/testrealm.json deleted file mode 100755 index 35ae9ad219..0000000000 --- a/bundled-war-example/src/main/webapp/WEB-INF/testrealm.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "realm": "demo", - "enabled": true, - "accessTokenLifespan": 3000, - "accessCodeLifespan": 10, - "accessCodeLifespanUserAction": 6000, - "sslNotRequired": true, - "registrationAllowed": false, - "social": false, - "updateProfileOnInitialSocialLogin": false, - "requiredCredentials": [ "password" ], - "users" : [ - { - "username" : "bburke@redhat.com", - "enabled": true, - "email" : "bburke@redhat.com", - "firstName": "Bill", - "lastName": "Burke", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ] - } - ], - "roles" : { - "realm" : [ - { - "name": "user", - "description": "User privileges" - }, - { - "name": "admin", - "description": "Administrator privileges" - } - ] - }, - "roleMappings": [ - { - "username": "bburke@redhat.com", - "roles": ["user"] - } - ], - "scopeMappings": [ - { - "client": "customer-portal", - "roles": ["user"] - } - ], - "applications": [ - { - "name": "customer-portal", - "enabled": true, - "adminUrl": "http://localhost:8080/app-bundle", - "baseUrl": "http://localhost:8080/app-bundle", - "redirectUris": [ - "http://localhost:8080/app-bundle/*" - ], - "secret": "password" - } - ], - "applicationRoleMappings": { - "account": [ - { - "username": "bburke@redhat.com", - "roles": ["manage-account"] - } - ] - } - -} diff --git a/bundled-war-example/src/main/webapp/WEB-INF/web.xml b/bundled-war-example/src/main/webapp/WEB-INF/web.xml deleted file mode 100755 index 58fea700e8..0000000000 --- a/bundled-war-example/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,130 +0,0 @@ - - - - app-bundle - - host-port - localhost:8080 - - - - keycloak.import.realm.resources - /WEB-INF/testrealm.json - - - - Keycloak REST Interface - org.jboss.resteasy.plugins.server.servlet.HttpServlet30Dispatcher - - javax.ws.rs.Application - org.keycloak.services.resources.KeycloakApplication - - - resteasy.servlet.mapping.prefix - / - - 1 - true - - - - Customer REST Interface - org.jboss.resteasy.plugins.server.servlet.HttpServlet30Dispatcher - - javax.ws.rs.Application - org.keycloak.example.oauth.DataApplication - - - resteasy.servlet.mapping.prefix - /database - - 2 - true - - - - org.keycloak.services.listeners.KeycloakSessionDestroyListener - - - - Keycloak Client Connection Filter - org.keycloak.services.filters.ClientConnectionFilter - - - - Keycloak Session Management - org.keycloak.services.filters.KeycloakSessionServletFilter - - - - Keycloak Session Management - /* - - - - Keycloak Client Connection Filter - /* - - - - Keycloak REST Interface - /* - - - - - - - - index.html - - - - Customer REST Interface - /database/* - - - - - Customers - /customers/* - - - user - - - - - - Database - /database/* - - - user - - - - - deny - /customers/* - - - - - - BASIC - demo - - - - admin - - - user - - - - diff --git a/bundled-war-example/src/main/webapp/customers/view.jsp b/bundled-war-example/src/main/webapp/customers/view.jsp deleted file mode 100755 index 1ab0097c2e..0000000000 --- a/bundled-war-example/src/main/webapp/customers/view.jsp +++ /dev/null @@ -1,47 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1" %> -<%@ page import="org.keycloak.example.CustomerDatabaseClient" %> -<%@ page import="org.keycloak.util.KeycloakUriBuilder" %> -<%@ page import="org.keycloak.representations.IDToken" %> - - - Customer View Page - - -<% - String logoutUri = KeycloakUriBuilder.fromUri("http://localhost:8080/app-bundle/realms/demo/tokens/logout") - .queryParam("redirect_uri", "http://localhost:8080/app-bundle").build().toString(); - String acctUri = "http://localhost:8080/app-bundle/realms/demo/account?referrer=customer-portal"; - IDToken idToken = CustomerDatabaseClient.getIDToken(request); -%> -

logout | manage acct

-Servlet User Principal <%=request.getUserPrincipal().getName()%> - made this request. -

Caller IDToken values (You can specify what is returned in IDToken in the customer-portal claims page in the admin console:

-

Username: <%=idToken.getPreferredUsername()%>

-

Email: <%=idToken.getEmail()%>

-

Full Name: <%=idToken.getName()%>

-

First: <%=idToken.getGivenName()%>

-

Last: <%=idToken.getFamilyName()%>

-

Customer Listing

-<% - java.util.List list = null; - try { - list = CustomerDatabaseClient.getCustomers(request); - } catch (CustomerDatabaseClient.Failure failure) { - out.println("There was a failure processing request. You either didn't configure Keycloak properly, or maybe" + - "you just forgot to secure the database service?"); - out.println("Status from database service invocation was: " + failure.getStatus()); - return; - } - for (String cust : list) { - out.print("

"); - out.print(cust); - out.println("

"); - - } -%> -

- - \ No newline at end of file diff --git a/bundled-war-example/src/main/webapp/index.html b/bundled-war-example/src/main/webapp/index.html deleted file mode 100755 index 681fa08a17..0000000000 --- a/bundled-war-example/src/main/webapp/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - -

Customer Portal

- -

Customer Listing

- - - \ No newline at end of file diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/realm.js b/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/realm.js index 36992c6cdb..dd02ff28a0 100755 --- a/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/realm.js +++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/realm.js @@ -201,7 +201,7 @@ module.controller('RealmCreateCtrl', function($scope, Current, Realm, $upload, $ Realm.query(function(data) { Current.realms = data; - $http.get(authUrl + '/admin/whoami').success(function(user) { + WhoAmI.get(function(user) { Auth.user = user; $location.url("/realms/" + realmCopy.realm); diff --git a/pom.xml b/pom.xml index bc1e568b0b..335383bd42 100755 --- a/pom.xml +++ b/pom.xml @@ -100,7 +100,6 @@ testsuite server timer - bundled-war-example project-integrations export-import diff --git a/project-integrations/aerogear-ups/app/src/main/webapp/WEB-INF/web.xml b/project-integrations/aerogear-ups/app/src/main/webapp/WEB-INF/web.xml index af91ffa36e..1be2b565ec 100755 --- a/project-integrations/aerogear-ups/app/src/main/webapp/WEB-INF/web.xml +++ b/project-integrations/aerogear-ups/app/src/main/webapp/WEB-INF/web.xml @@ -21,6 +21,16 @@ + + + AdminConsole + /admin/* + + + admin + + + Database diff --git a/project-integrations/aerogear-ups/app/src/main/webapp/admin/admin.html b/project-integrations/aerogear-ups/app/src/main/webapp/admin/admin.html new file mode 100755 index 0000000000..8102dc0e3d --- /dev/null +++ b/project-integrations/aerogear-ups/app/src/main/webapp/admin/admin.html @@ -0,0 +1 @@ +

This would be the admin page for the UPS admin console.

\ No newline at end of file diff --git a/project-integrations/aerogear-ups/auth-server/pom.xml b/project-integrations/aerogear-ups/auth-server/pom.xml index 6ac1405b48..5dba72bb2d 100755 --- a/project-integrations/aerogear-ups/auth-server/pom.xml +++ b/project-integrations/aerogear-ups/auth-server/pom.xml @@ -135,6 +135,17 @@ keycloak-timer-basic ${project.version} + + org.keycloak + keycloak-export-import-api + ${project.version} + + + org.keycloak + keycloak-export-import-impl + ${project.version} + + org.jboss.spec.javax.servlet diff --git a/project-integrations/aerogear-ups/auth-server/src/main/java/org/aerogear/ups/security/UpsSecurityApplication.java b/project-integrations/aerogear-ups/auth-server/src/main/java/org/aerogear/ups/security/UpsSecurityApplication.java new file mode 100755 index 0000000000..eddeace54d --- /dev/null +++ b/project-integrations/aerogear-ups/auth-server/src/main/java/org/aerogear/ups/security/UpsSecurityApplication.java @@ -0,0 +1,40 @@ +package org.aerogear.ups.security; + +import org.jboss.resteasy.core.Dispatcher; +import org.keycloak.models.KeycloakSession; +import org.keycloak.models.RealmModel; +import org.keycloak.models.UserModel; +import org.keycloak.services.managers.RealmManager; +import org.keycloak.services.resources.KeycloakApplication; + +import javax.servlet.ServletContext; +import javax.ws.rs.core.Context; + +/** + * @author Bill Burke + * @version $Revision: 1 $ + */ +public class UpsSecurityApplication extends KeycloakApplication { + public UpsSecurityApplication(@Context ServletContext context, @Context Dispatcher dispatcher) { + super(context, dispatcher); + } + + @Override + protected void setupDefaultRealm(String contextPath) { + super.setupDefaultRealm(contextPath); + KeycloakSession session = factory.createSession(); + session.getTransaction().begin(); + + // disable master realm by deleting the admin user. + try { + RealmManager manager = new RealmManager(session); + RealmModel master = manager.getKeycloakAdminstrationRealm(); + UserModel admin = master.getUser("admin"); + if (admin != null) master.removeUser(admin.getLoginName()); + session.getTransaction().commit(); + } finally { + session.close(); + } + + } +} diff --git a/project-integrations/aerogear-ups/auth-server/src/main/webapp/WEB-INF/testrealm.json b/project-integrations/aerogear-ups/auth-server/src/main/webapp/WEB-INF/testrealm.json index bc2d8f708a..bcbd7ad8eb 100755 --- a/project-integrations/aerogear-ups/auth-server/src/main/webapp/WEB-INF/testrealm.json +++ b/project-integrations/aerogear-ups/auth-server/src/main/webapp/WEB-INF/testrealm.json @@ -20,6 +20,19 @@ { "type" : "password", "value" : "password" } ] + }, + { + "username" : "admin", + "enabled": true, + "firstName": "Bill", + "lastName": "Burke", + "credentials" : [ + { "type" : "password", + "value" : "admin" } + ], + "requiredActions": [ + "UPDATE_PASSWORD" + ] } ], "roles" : { @@ -38,6 +51,10 @@ { "username": "bburke@redhat.com", "roles": ["user"] + }, + { + "username": "admin", + "roles": ["user", "admin"] } ], "scopeMappings": [ @@ -64,6 +81,12 @@ "username": "bburke@redhat.com", "roles": ["manage-account"] } + ], + "demo-realm": [ + { + "username": "admin", + "roles": ["realm-admin"] + } ] } diff --git a/project-integrations/aerogear-ups/auth-server/src/main/webapp/WEB-INF/web.xml b/project-integrations/aerogear-ups/auth-server/src/main/webapp/WEB-INF/web.xml index 048c39d08c..bb58ec087b 100755 --- a/project-integrations/aerogear-ups/auth-server/src/main/webapp/WEB-INF/web.xml +++ b/project-integrations/aerogear-ups/auth-server/src/main/webapp/WEB-INF/web.xml @@ -16,7 +16,7 @@ org.jboss.resteasy.plugins.server.servlet.HttpServlet30Dispatcher javax.ws.rs.Application - org.keycloak.services.resources.KeycloakApplication + org.aerogear.ups.security.UpsSecurityApplication resteasy.servlet.mapping.prefix