Compare commits
46
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d26712a1d4 | ||
|
|
db8935444f | ||
|
|
5b769ed829 | ||
|
|
7585b5ab49 | ||
|
|
95287b2faa | ||
|
|
d707133742 | ||
|
|
c0e0391a87 | ||
|
|
7139c683cc | ||
|
|
19939068d5 | ||
|
|
9ffe8287a7 | ||
|
|
be74476de1 | ||
|
|
45c5fa28fc | ||
|
|
a4bed6e433 | ||
|
|
575943fbb4 | ||
|
|
46fa593d4a | ||
|
|
9819d9997e | ||
|
|
cdb0d6b5bf | ||
|
|
ae86028e6e | ||
|
|
0cfe4c694a | ||
|
|
034735cd64 | ||
|
|
7567fea6c1 | ||
|
|
3af087e36f | ||
|
|
45e04944a4 | ||
|
|
0706e6f778 | ||
|
|
655aa6194e | ||
|
|
862baf2d5b | ||
|
|
fc148207ce | ||
|
|
095561cb29 | ||
|
|
9bd3f43ce5 | ||
|
|
4ea49a14ea | ||
|
|
12c155cd9c | ||
|
|
0249adbacc | ||
|
|
d69b01ad3c | ||
|
|
e7dbfecdb0 | ||
|
|
37b396c106 | ||
|
|
b03dddccf4 | ||
|
|
1b7e019042 | ||
|
|
33c47c8441 | ||
|
|
8e5325b5d5 | ||
|
|
e37c6f262b | ||
|
|
5bebd31b0c | ||
|
|
cc76dcf58b | ||
|
|
d0b614fdcf | ||
|
|
c325b9f04d | ||
|
|
c311f47d5d | ||
|
|
aa95ff6d84 |
No files matched your search
@@ -0,0 +1,8 @@
|
||||
language: java
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.m2
|
||||
sudo: false
|
||||
|
||||
after_script: 'misc/.travis/after.sh'
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
+4
@@ -117,6 +117,10 @@ public class DefaultJpaConnectionProviderFactory implements JpaConnectionProvide
|
||||
logger.trace("Updating database");
|
||||
|
||||
JpaUpdaterProvider updater = session.getProvider(JpaUpdaterProvider.class);
|
||||
if (updater == null) {
|
||||
throw new RuntimeException("Can't update database: JPA updater provider not found");
|
||||
}
|
||||
|
||||
connection = getConnection();
|
||||
|
||||
if (databaseSchema.equals("update")) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import org.keycloak.connections.mongo.api.types.MapperRegistry;
|
||||
import org.keycloak.connections.mongo.impl.EntityInfo;
|
||||
import org.keycloak.connections.mongo.impl.MongoStoreImpl;
|
||||
import org.keycloak.models.utils.reflection.Property;
|
||||
import org.keycloak.models.utils.reflection.Types;
|
||||
import org.keycloak.util.reflections.Types;
|
||||
|
||||
import java.lang.reflect.ParameterizedType;
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
</parent>
|
||||
<name>Connections Parent</name>
|
||||
<description/>
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
+42
-1
@@ -4,18 +4,26 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>keycloak-core</artifactId>
|
||||
<name>Keycloak Core</name>
|
||||
<packaging>jar</packaging>
|
||||
<description/>
|
||||
|
||||
<properties>
|
||||
<timestamp>${maven.build.timestamp}</timestamp>
|
||||
<maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
|
||||
<keycloak.osgi.export>
|
||||
org.keycloak.*
|
||||
</keycloak.osgi.export>
|
||||
<keycloak.osgi.import>
|
||||
net.iharder;version=${base64.version},
|
||||
*;resolution:=optional
|
||||
</keycloak.osgi.import>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
@@ -60,6 +68,39 @@
|
||||
<target>${maven.compiler.target}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- Adding OSGI metadata to the JAR without changing the packaging type. -->
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<extensions>true</extensions>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>bundle-manifest</id>
|
||||
<phase>process-classes</phase>
|
||||
<goals>
|
||||
<goal>manifest</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<instructions>
|
||||
<Bundle-ClassPath>.</Bundle-ClassPath>
|
||||
<Bundle-Name>${project.name}</Bundle-Name>
|
||||
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
|
||||
<Import-Package>${keycloak.osgi.import}</Import-Package>
|
||||
<Export-Package>${keycloak.osgi.export}</Export-Package>
|
||||
</instructions>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.keycloak.models.utils.reflection;
|
||||
package org.keycloak.util.reflections;
|
||||
|
||||
import java.beans.Introspector;
|
||||
import java.io.Serializable;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.keycloak.models.utils.reflection;
|
||||
package org.keycloak.util.reflections;
|
||||
|
||||
import java.lang.reflect.AccessibleObject;
|
||||
import java.security.PrivilegedAction;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.keycloak.models.utils.reflection;
|
||||
package org.keycloak.util.reflections;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
Vendored
+1
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
Vendored
+7
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
@@ -184,6 +184,12 @@
|
||||
<dependency>
|
||||
<groupId>de.idyl</groupId>
|
||||
<artifactId>winzipaes</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk16</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
Vendored
+5
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
@@ -24,6 +24,10 @@
|
||||
<groupId>net.iharder</groupId>
|
||||
<artifactId>base64</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk16</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-core-jaxrs</artifactId>
|
||||
|
||||
@@ -42,7 +42,8 @@
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${project.build.directory}/unpacked/deployments/auth-server.war/WEB-INF/classes/META-INF</directory>
|
||||
<directory>${project.build.directory}/unpacked/deployments/auth-server.war/WEB-INF/classes/META-INF
|
||||
</directory>
|
||||
<outputDirectory>keycloak/standalone/configuration</outputDirectory>
|
||||
<includes>
|
||||
<include>keycloak-server.json</include>
|
||||
@@ -61,27 +62,18 @@
|
||||
<outputDirectory>keycloak/welcome-content</outputDirectory>
|
||||
<includes>
|
||||
<include>*.*</include>
|
||||
</includes>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
<!--
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
<unpack>false</unpack>
|
||||
<useTransitiveDependencies>false</useTransitiveDependencies>
|
||||
<includes>
|
||||
<include>org.keycloak:keycloak-wildfly-adapter-dist:zip</include>
|
||||
<include>org.keycloak:keycloak-as7-adapter-dist:zip</include>
|
||||
<include>org.keycloak:keycloak-eap6-adapter-dist:zip</include>
|
||||
<include>org.keycloak:keycloak-tomcat6-adapter-dist:zip</include>
|
||||
<include>org.keycloak:keycloak-tomcat7-adapter-dist:zip</include>
|
||||
<include>org.keycloak:keycloak-tomcat8-adapter-dist:zip</include>
|
||||
<include>org.keycloak:keycloak-jetty81-adapter-dist:zip</include>
|
||||
<include>org.keycloak:keycloak-jetty91-adapter-dist:zip</include>
|
||||
<include>org.keycloak:keycloak-jetty92-adapter-dist:zip</include>
|
||||
</includes>
|
||||
<outputDirectory>adapters</outputDirectory>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
-->
|
||||
|
||||
<files>
|
||||
<file>
|
||||
<source>src/main/themes/README.txt</source>
|
||||
<outputDirectory>keycloak/standalone/configuration/themes</outputDirectory>
|
||||
</file>
|
||||
<file>
|
||||
<source>src/main/providers/README.txt</source>
|
||||
<outputDirectory>keycloak/standalone/configuration/providers</outputDirectory>
|
||||
</file>
|
||||
</files>
|
||||
</assembly>
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
Any provider implementation jars and libraries in this folder will be loaded by Keycloak. See the providers
|
||||
section in the documentation for more details.
|
||||
@@ -0,0 +1,3 @@
|
||||
Themes to configure the look and feel of login pages and account management console. It's not recommended to
|
||||
modify existing the built-in themes, instead you should create a new theme that extends a built-in theme. See the theme
|
||||
section in the documentation for more details.
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -93,6 +93,12 @@
|
||||
<exclude name="**/README.md"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="target/examples/fuse" overwrite="true">
|
||||
<fileset dir="../../examples/fuse">
|
||||
<exclude name="**/target/**"/>
|
||||
<exclude name="**/*.iml"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy file="../../examples/README.md" tofile="target/examples/README.md"/>
|
||||
<move file="target/examples/unconfigured-demo/README.md.unconfigured" tofile="target/examples/unconfigured-demo/README.md"/>
|
||||
<move file="target/examples/unconfigured-demo/customer-app/src/main/webapp/WEB-INF/web.xml.unconfigured" tofile="target/examples/unconfigured-demo/customer-app/src/main/webapp/WEB-INF/web.xml"/>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -109,6 +109,10 @@
|
||||
</module-def>
|
||||
<module-def name="org.picketlink.federation.bindings">
|
||||
<maven-resource group="org.picketlink" artifact="picketlink-wildfly-common"/>
|
||||
<maven-resource group="org.picketlink" artifact="picketlink-tomcat-common"/>
|
||||
<maven-resource group="org.picketlink" artifact="picketlink-tomcat5-single"/>
|
||||
<maven-resource group="org.picketlink" artifact="picketlink-jbas-common"/>
|
||||
<maven-resource group="org.picketlink" artifact="picketlink-jbas7-single"/>
|
||||
</module-def>
|
||||
<module-def name="org.picketlink.idm">
|
||||
<maven-resource group="org.picketlink" artifact="picketlink-idm-impl"/>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -81,10 +81,31 @@
|
||||
<groupId>org.picketlink</groupId>
|
||||
<artifactId>picketlink-federation</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Wildfly federation binding -->
|
||||
<dependency>
|
||||
<groupId>org.picketlink</groupId>
|
||||
<artifactId>picketlink-wildfly-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- AS7/EAP6 federation binding -->
|
||||
<dependency>
|
||||
<groupId>org.picketlink</groupId>
|
||||
<artifactId>picketlink-tomcat-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.picketlink</groupId>
|
||||
<artifactId>picketlink-tomcat5-single</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.picketlink</groupId>
|
||||
<artifactId>picketlink-jbas-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.picketlink</groupId>
|
||||
<artifactId>picketlink-jbas7-single</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.picketlink</groupId>
|
||||
<artifactId>picketlink-idm-simple-schema</artifactId>
|
||||
|
||||
+9
-3
@@ -29,7 +29,6 @@
|
||||
<module name="javax.servlet.api" />
|
||||
<module name="org.jboss.common-core" />
|
||||
<module name="org.jboss.logging" />
|
||||
<module name="org.wildfly.extension.undertow" />
|
||||
<module name="org.jboss.security.xacml" />
|
||||
<module name="org.picketbox" />
|
||||
<module name="javax.xml.ws.api" />
|
||||
@@ -43,11 +42,18 @@
|
||||
<module name="org.jboss.ws.api" />
|
||||
<module name="org.jboss.ws.spi" />
|
||||
<module name="org.apache.cxf" />
|
||||
<module name="io.undertow.core" />
|
||||
<module name="io.undertow.servlet" />
|
||||
<module name="org.picketlink.common" />
|
||||
<module name="org.picketlink.config" />
|
||||
<module name="org.picketlink.federation" />
|
||||
|
||||
<!-- Wildfly dependencies -->
|
||||
<module name="org.wildfly.extension.undertow" optional="true" />
|
||||
<module name="io.undertow.core" optional="true" />
|
||||
<module name="io.undertow.servlet" optional="true" />
|
||||
|
||||
<!-- AS7/EAP6 dependencies -->
|
||||
<module name="org.jboss.as.web" optional="true"/>
|
||||
<module name="org.jboss.modules" optional="true"/>
|
||||
</dependencies>
|
||||
|
||||
</module>
|
||||
+1
-1
@@ -29,7 +29,7 @@
|
||||
<module name="javax.servlet.api" />
|
||||
<module name="org.jboss.common-core" />
|
||||
<module name="org.jboss.logging" />
|
||||
<module name="org.jboss.as.web-common" />
|
||||
<module name="org.jboss.as.web-common" optional="true" />
|
||||
<module name="org.jboss.security.xacml" />
|
||||
<module name="org.picketbox" />
|
||||
<module name="javax.xml.ws.api" />
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<name>Keycloak OSGI Features</name>
|
||||
|
||||
@@ -1,15 +1,53 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0" name="keycloak-${project.version}">
|
||||
|
||||
<feature name="keycloak-core-adapter" version="${project.version}" resolver="(obr)">
|
||||
<details>The keycloak core adapter stuff</details>
|
||||
<bundle>mvn:org.keycloak/keycloak-osgi-core-adapter/${project.version}</bundle>
|
||||
<feature name="keycloak-adapter-core" version="${project.version}" resolver="(obr)">
|
||||
<details>The keycloak adapter core stuff</details>
|
||||
<bundle dependency="true">mvn:org.keycloak/keycloak-osgi-thirdparty/${project.version}</bundle>
|
||||
<bundle dependency="true">mvn:org.bouncycastle/bcprov-jdk16/${bouncycastle.version}</bundle>
|
||||
<bundle dependency="true">mvn:org.codehaus.jackson/jackson-core-asl/${jackson.version}</bundle>
|
||||
<bundle dependency="true">mvn:org.codehaus.jackson/jackson-mapper-asl/${jackson.version}</bundle>
|
||||
<bundle dependency="true">mvn:org.codehaus.jackson/jackson-xc/${jackson.version}</bundle>
|
||||
<bundle dependency="true">mvn:org.jboss.logging/jboss-logging/${jboss.logging.version}</bundle>
|
||||
<bundle>mvn:org.keycloak/keycloak-core/${project.version}</bundle>
|
||||
<bundle>mvn:org.keycloak/keycloak-adapter-core/${project.version}</bundle>
|
||||
</feature>
|
||||
|
||||
<feature name="keycloak-osgi-adapter" version="${project.version}" resolver="(obr)">
|
||||
<details>The keycloak adapter core stuff</details>
|
||||
<feature>keycloak-adapter-core</feature>
|
||||
<feature version="[2.3,4)">http-whiteboard</feature>
|
||||
<bundle>mvn:org.keycloak/keycloak-osgi-adapter/${project.version}</bundle>
|
||||
</feature>
|
||||
|
||||
<feature name="keycloak-jetty8-adapter" version="${project.version}" resolver="(obr)">
|
||||
<details>The keycloak Jetty8 adapter</details>
|
||||
<feature>keycloak-adapter-core</feature>
|
||||
<feature version="[8.1,9)">jetty</feature>
|
||||
<bundle>mvn:org.keycloak/keycloak-jetty-core/${project.version}</bundle>
|
||||
<bundle>mvn:org.keycloak/keycloak-jetty81-adapter/${project.version}</bundle>
|
||||
</feature>
|
||||
|
||||
<feature name="keycloak-jaas" version="${project.version}" resolver="(obr)">
|
||||
<details>The keycloak JAAS configuration</details>
|
||||
<feature>keycloak-core-adapter</feature>
|
||||
<feature>keycloak-adapter-core</feature>
|
||||
<bundle>mvn:org.keycloak/keycloak-osgi-jaas/${project.version}</bundle>
|
||||
</feature>
|
||||
|
||||
<feature name="keycloak" version="${project.version}" resolver="(obr)">
|
||||
<details>The keycloak adapter core stuff</details>
|
||||
<feature>keycloak-osgi-adapter</feature>
|
||||
<feature>keycloak-jetty8-adapter</feature>
|
||||
<feature>keycloak-jaas</feature>
|
||||
</feature>
|
||||
|
||||
<!-- This is just simplification to upgrade paxweb to 3.1.2 in JBoss Fuse 6.1 or Karaf 2.3.X environment -->
|
||||
<feature name="keycloak-pax-web-upgrade" version="${project.version}" resolver="(obr)">
|
||||
<details>This is just simplification to upgrade paxweb to 3.1.2 in JBoss Fuse 6.1 or Karaf 2.3.X environment</details>
|
||||
<bundle>mvn:org.ow2.asm/asm-all/5.0</bundle>
|
||||
<bundle>mvn:org.apache.xbean/xbean-bundleutils/3.18</bundle>
|
||||
<bundle>mvn:org.apache.xbean/xbean-reflect/3.18</bundle>
|
||||
<bundle>mvn:org.apache.xbean/xbean-finder/3.18</bundle>
|
||||
</feature>
|
||||
|
||||
</features>
|
||||
@@ -4,10 +4,10 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<name>Keycloak OSGI JAAS</name>
|
||||
<name>Keycloak OSGI JAAS Realm Configuration</name>
|
||||
<description/>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-osgi-core-adapter</artifactId>
|
||||
<artifactId>keycloak-adapter-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
@@ -53,7 +53,7 @@
|
||||
<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
|
||||
<Embed-Transitive>false</Embed-Transitive>
|
||||
<Bundle-ClassPath>.</Bundle-ClassPath> -->
|
||||
<Bundle-Name>${project.description}</Bundle-Name>
|
||||
<Bundle-Name>${project.name}</Bundle-Name>
|
||||
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
|
||||
<Import-Package>${keycloak.osgi.import}</Import-Package>
|
||||
<Export-Package>${keycloak.osgi.export}</Export-Package>
|
||||
|
||||
@@ -10,7 +10,10 @@
|
||||
<cm:property-placeholder persistent-id="org.keycloak" update-strategy="reload">
|
||||
<cm:default-properties>
|
||||
<cm:property name="jaasBearerKeycloakConfigFile" value="$[karaf.base]/etc/keycloak-hawtio.json"/>
|
||||
<cm:property name="jaasBearerRolePrincipalClass" value=""/>
|
||||
|
||||
<cm:property name="jaasDirectAccessKeycloakConfigFile" value="$[karaf.base]/etc/keycloak-direct-access.json"/>
|
||||
<cm:property name="jaasDirectAccessRolePrincipalClass" value="org.apache.karaf.jaas.boot.principal.RolePrincipal"/>
|
||||
</cm:default-properties>
|
||||
</cm:property-placeholder>
|
||||
|
||||
@@ -20,12 +23,14 @@
|
||||
<jaas:module className="org.keycloak.adapters.jaas.BearerTokenLoginModule"
|
||||
flags="sufficient">
|
||||
keycloak-config-file = ${jaasBearerKeycloakConfigFile}
|
||||
role-principal-class = ${jaasBearerRolePrincipalClass}
|
||||
</jaas:module>
|
||||
|
||||
<!-- Used for direct username/password authentication for non-web scenarios (like ssh) -->
|
||||
<jaas:module className="org.keycloak.adapters.jaas.DirectAccessGrantsLoginModule"
|
||||
flags="sufficient">
|
||||
keycloak-config-file = ${jaasDirectAccessKeycloakConfigFile}
|
||||
role-principal-class = ${jaasDirectAccessRolePrincipalClass}
|
||||
</jaas:module>
|
||||
|
||||
</jaas:config>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<name>Keycloak OSGI Integration</name>
|
||||
@@ -17,7 +17,7 @@
|
||||
<modules>
|
||||
<module>features</module>
|
||||
<module>jaas</module>
|
||||
<module>core-adapter</module>
|
||||
<module>thirdparty</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
||||
Vendored
Executable → Regular
+15
-40
@@ -4,20 +4,21 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<name>Keycloak OSGI Core Adapter Integration</name>
|
||||
<description/>
|
||||
|
||||
<name>Keycloak OSGI Thirdparty</name>
|
||||
<description>Keycloak OSGI bundling for 3rd party libs without OSGI headers in manifest</description>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>keycloak-osgi-core-adapter</artifactId>
|
||||
<artifactId>keycloak-osgi-thirdparty</artifactId>
|
||||
<packaging>bundle</packaging>
|
||||
|
||||
<properties>
|
||||
<keycloak.osgi.export>
|
||||
org.keycloak.adapters.jaas,
|
||||
org.keycloak.adapters
|
||||
net.iharder;version="${base64.version}",
|
||||
org.apache.http.*;version=${keycloak.apache.httpcomponents.version}
|
||||
</keycloak.osgi.export>
|
||||
<keycloak.osgi.import>
|
||||
*;resolution:=optional
|
||||
@@ -26,45 +27,19 @@
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<groupId>net.iharder</groupId>
|
||||
<artifactId>base64</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-adapter-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jboss.logging</groupId>
|
||||
<artifactId>jboss-logging</artifactId>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpcore</artifactId>
|
||||
<version>${keycloak.apache.httpcomponents.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>${keycloak.apache.httpcomponents.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.iharder</groupId>
|
||||
<artifactId>base64</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk16</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.jackson</groupId>
|
||||
<artifactId>jackson-core-asl</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.jackson</groupId>
|
||||
<artifactId>jackson-mapper-asl</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.jackson</groupId>
|
||||
<artifactId>jackson-xc</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@@ -84,14 +59,14 @@
|
||||
</executions>
|
||||
<configuration>
|
||||
<instructions>
|
||||
<Embed-Dependency>*;scope=compile|runtime;artifactId=!keycloak-adapter-core</Embed-Dependency>
|
||||
<Embed-Dependency>*;scope=compile|runtime;artifactId=!httpclient|httpcore|base64</Embed-Dependency>
|
||||
<Embed-Transitive>true</Embed-Transitive>
|
||||
<Bundle-ClassPath>.</Bundle-ClassPath>
|
||||
<Bundle-Name>${project.description}</Bundle-Name>
|
||||
<Bundle-Name>${project.name}</Bundle-Name>
|
||||
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
|
||||
<Import-Package>${keycloak.osgi.import}</Import-Package>
|
||||
<Export-Package>${keycloak.osgi.export}</Export-Package>
|
||||
<Implementation-Title>keycloak</Implementation-Title>
|
||||
<Implementation-Title>${project.name}</Implementation-Title>
|
||||
<Implementation-Version>${project.version}</Implementation-Version>
|
||||
</instructions>
|
||||
</configuration>
|
||||
File renamed without changes.
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<name>Distribution</name>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<!ENTITY License SYSTEM "modules/License.xml">
|
||||
<!ENTITY Overview SYSTEM "modules/Overview.xml">
|
||||
<!ENTITY Installation SYSTEM "modules/server-installation.xml">
|
||||
<!ENTITY Providers SYSTEM "modules/providers.xml">
|
||||
<!ENTITY OpenShift SYSTEM "modules/openshift.xml">
|
||||
<!ENTITY AdminPermissions SYSTEM "modules/admin-permissions.xml">
|
||||
<!ENTITY PerRealmAdminPermissions SYSTEM "modules/per-realm-admin-permissions.xml">
|
||||
@@ -14,9 +15,11 @@
|
||||
<!ENTITY TomcatAdapter SYSTEM "modules/tomcat-adapter.xml">
|
||||
<!ENTITY Jetty9Adapter SYSTEM "modules/jetty9-adapter.xml">
|
||||
<!ENTITY Jetty8Adapter SYSTEM "modules/jetty8-adapter.xml">
|
||||
<!ENTITY FuseAdapter SYSTEM "modules/fuse-adapter.xml">
|
||||
<!ENTITY InstalledApplications SYSTEM "modules/installed-applications.xml">
|
||||
<!ENTITY Logout SYSTEM "modules/logout.xml">
|
||||
<!ENTITY SAML SYSTEM "modules/saml.xml">
|
||||
<!ENTITY JAAS SYSTEM "modules/jaas.xml">
|
||||
<!ENTITY SocialConfig SYSTEM "modules/social-config.xml">
|
||||
<!ENTITY SocialFacebook SYSTEM "modules/social-facebook.xml">
|
||||
<!ENTITY SocialGitHub SYSTEM "modules/social-github.xml">
|
||||
@@ -76,6 +79,7 @@ This one is short
|
||||
&License;
|
||||
&Overview;
|
||||
&Installation;
|
||||
&Providers;
|
||||
&OpenShift;
|
||||
&AdminPermissions;
|
||||
&PerRealmAdminPermissions;
|
||||
@@ -91,10 +95,12 @@ This one is short
|
||||
&TomcatAdapter;
|
||||
&Jetty9Adapter;
|
||||
&Jetty8Adapter;
|
||||
&FuseAdapter;
|
||||
&JavascriptAdapter;
|
||||
&InstalledApplications;
|
||||
&Logout;
|
||||
&MultiTenancy;
|
||||
&JAAS;
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
|
||||
@@ -80,7 +80,17 @@
|
||||
<section>
|
||||
<title>Version specific migration</title>
|
||||
<section>
|
||||
<title>Migrating from 1.1.Beta1 to 1.1.Beta2</title>
|
||||
<title>Migrating from 1.1.0.Beta2 to 1.1.0.Final</title>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
Providers are no longer loaded from <literal>WEB-INF/lib</literal>, they are now loaded
|
||||
from <literal>standalone/configuration/providers</literal>. See the
|
||||
<link linkend='providers'>providers</link> section for more details.
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
<section>
|
||||
<title>Migrating from 1.1.0.Beta1 to 1.1.0.Beta2</title>
|
||||
<itemizedlist>
|
||||
<listitem>Adapters are now a separate download. They are not included in appliance and war distribution. We have too many now and the distro
|
||||
is getting bloated.</listitem>
|
||||
@@ -95,7 +105,7 @@
|
||||
</itemizedlist>
|
||||
</section>
|
||||
<section>
|
||||
<title>Migrating from 1.0.x.Final to 1.1.Beta1</title>
|
||||
<title>Migrating from 1.0.x.Final to 1.1.0.Beta1</title>
|
||||
<itemizedlist>
|
||||
<listitem>RealmModel JPA and Mongo storage schema has changed</listitem>
|
||||
<listitem>UserSessionModel JPA and Mongo storage schema has changed as these interfaces have been refactored</listitem>
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the credentials of the application. This is an object notation where the key
|
||||
is the credential type and the value if the value of the credential type. Currently only
|
||||
is the credential type and the value is the value of the credential type. Currently only
|
||||
<literal>password</literal>
|
||||
is supported.
|
||||
This is <emphasis>REQUIRED</emphasis>.
|
||||
@@ -374,7 +374,7 @@
|
||||
<term>principal-attribute</term>
|
||||
<listitem>
|
||||
<para>
|
||||
OpenID Connection ID Token attribute to populate the UserPrincipal name with. If token attribute is null, defaults to <literal>sub</literal>
|
||||
OpenID Connection ID Token attribute to populate the UserPrincipal name with. If token attribute is null, defaults to <literal>sub</literal>.
|
||||
Possible values are <literal>sub</literal>, <literal>preferred_username</literal>, <literal>email</literal>, <literal>name</literal>, <literal>nickname</literal>, <literal>given_name</literal>, <literal>family_name</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
</para>
|
||||
<para>
|
||||
For example if your loadbalancer is on <emphasis>https://loadbalancer.com/myapp</emphasis> and auth-server-url is <emphasis>/auth</emphasis>,
|
||||
then relative URI of Keycloak is resolved to be <emphasis>https://loadbalancer.com/myapp</emphasis> .
|
||||
then relative URI of Keycloak is resolved to be <emphasis>https://loadbalancer.com/auth</emphasis> .
|
||||
</para>
|
||||
<para>
|
||||
For cluster setup, it may be even better to use option <emphasis>auth-server-url-for-backend-request</emphasis> . This allows to configure
|
||||
@@ -95,7 +95,7 @@
|
||||
<para>
|
||||
This would mean that browser requests (like redirecting to Keycloak login screen) will be still resolved relatively
|
||||
to current request URI like <emphasis>https://loadbalancer.com/myapp</emphasis>, but backend (out-of-bound) requests between keycloak
|
||||
and your app are send always to same cluster host with application .
|
||||
and your app are sent always to same cluster host with application .
|
||||
</para>
|
||||
<para>
|
||||
Note that additionally to network optimization,
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
messages to the cluster. However, as there's no sensitive data sent there's not much that can be achieved.
|
||||
For realms and users all that can be done is to send invalidation messages to make nodes load data from the
|
||||
database more frequently. For user sessions it would be possible to modify existing user sessions, but creating
|
||||
new sessions would have no affect as they would not be linked to any access tokens. There's not to much that
|
||||
new sessions would have no affect as they would not be linked to any access tokens. There's not too much that
|
||||
can be achieved by modifying user sessions. For example it would be possible to prevent sessions from expiring,
|
||||
by changing the creation time. However, it would for example have no effect adding additional permissions to the
|
||||
sessions as these are rechecked against the user and application when the token is created or refreshed.
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
<section id="fuse-adapter">
|
||||
<title>JBoss Fuse and Apache Karaf Adapter</title>
|
||||
<para>
|
||||
Currently Keycloak supports securing your web applications running inside <ulink url="http://www.jboss.org/products/fuse/overview/">JBoss Fuse</ulink>
|
||||
or <ulink url="http://karaf.apache.org/">Apache Karaf</ulink> . It leverages <link linkend="jetty8-adapter">Jetty 8 adapter</link> as both JBoss Fuse 6.1
|
||||
and Apache Karaf 3 are bundled with <ulink url="http://eclipse.org/jetty/">Jetty 8.1 server</ulink> under the covers and Jetty is used for running various kinds of web applications.
|
||||
</para>
|
||||
<para>
|
||||
What is supported for Fuse/Karaf is:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
Security for classic WAR applications deployed on Fuse/Karaf with <ulink url="https://ops4j1.jira.com/wiki/display/ops4j/Pax+Web+Extender+-+War">Pax Web War Extender</ulink>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Security for servlets deployed on Fuse/Karaf as OSGI services with <ulink url="https://ops4j1.jira.com/wiki/display/ops4j/Pax+Web+Extender+-+Whiteboard">Pax Web Whiteboard Extender</ulink>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Security for <ulink url="http://camel.apache.org/">Apache Camel</ulink> Jetty endpoints running with
|
||||
<ulink url="http://camel.apache.org/jetty.html">Camel Jetty</ulink> component.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Security for <ulink url="http://cxf.apache.org/">Apache CXF</ulink> endpoints running on their own separate
|
||||
<ulink url="http://cxf.apache.org/docs/jetty-configuration.html">Jetty engine</ulink>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Security for <ulink url="http://cxf.apache.org/">Apache CXF</ulink> endpoints running on default engine provided by CXF servlet.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Security for SSH and JMX admin access.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Security for <ulink url="http://hawt.io/">Hawt.io admin console</ulink> .
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>The best place to start is look at Fuse demo bundled as part of Keycloak examples in directory <literal>examples/fuse</literal> .</para>
|
||||
</section>
|
||||
@@ -0,0 +1,42 @@
|
||||
<section id="jaas-adapter">
|
||||
<title>JAAS plugin</title>
|
||||
<para>
|
||||
It's generally not needed to use JAAS for most of the applications, especially if they are HTTP based, but directly choose one of our adapters.
|
||||
However some applications and systems may still rely on pure legacy JAAS solution. Keycloak provides couple of login modules
|
||||
to help with such use cases. Some login modules provided by Keycloak are:
|
||||
</para>
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>org.keycloak.adapters.jaas.DirectAccessGrantsLoginModule</term>
|
||||
<listitem>
|
||||
<para>
|
||||
This login module allows to authenticate with username/password from Keycloak database. It's using
|
||||
<link linkend="direct-access-grants">Direct Access Grants</link> Keycloak endpoint to validate on Keycloak side if provided username/password is valid.
|
||||
It's useful especially for non-web based systems, which need to rely on JAAS and want to use Keycloak credentials, but can't use classic browser based
|
||||
authentication flow due to their non-web nature. Example of such application could be messaging application or SSH system.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>org.keycloak.adapters.jaas.BearerTokenLoginModule</term>
|
||||
<listitem>
|
||||
<para>
|
||||
This login module allows to authenticate with Keycloak access token passed to it through CallbackHandler as password.
|
||||
It may be useful for example in case, when you have Keycloak access token from classic web based authentication flow
|
||||
and your web application then needs to talk to external non-web based system, which rely on JAAS. For example to JMS/messaging system.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<para>
|
||||
Both login modules have configuration property <literal>keycloak-config-file</literal> where you need to provide location of keycloak.json configuration file.
|
||||
It could be either provided from filesystem or from classpath (in that case you may need value like <literal>classpath:/folder-on-classpath/keycloak.json</literal> ).
|
||||
</para>
|
||||
<para>
|
||||
Second property <literal>role-principal-class</literal> allows to specify alternative class for Role principals attached to JAAS Subject. Default
|
||||
value for Role principal is <literal>org.keycloak.adapters.jaas.RolePrincipal</literal> . Note that class should have constructor
|
||||
with single String argument.
|
||||
</para>
|
||||
</section>
|
||||
@@ -4,7 +4,7 @@
|
||||
Administering your realm through the <literal>master</literal> realm as discussed in <xref linkend="admin-permissions" /> may not always be
|
||||
ideal or feasible. For example, maybe you have more than one admin application that manages various admin aspects of your organization
|
||||
and you want to unify all these different "admin consoles" under one realm so you can do SSO between them. Keycloak allows you to
|
||||
grant realm admin privleges to users within that realm. These realm admins can participate in SSO for that realm and
|
||||
grant realm admin privileges to users within that realm. These realm admins can participate in SSO for that realm and
|
||||
visit a keycloak admin console instance that is dedicated solely for that realm by going to the url:
|
||||
<literal>/{keycloak-root}/admin/{realm}/console</literal>
|
||||
</para>
|
||||
|
||||
+276
@@ -0,0 +1,276 @@
|
||||
<chapter id="providers">
|
||||
<title>Providers and SPIs</title>
|
||||
|
||||
<para>
|
||||
Keycloak is designed to cover most use-cases without requiring custom code, but we also want it to be
|
||||
customizable. To achive this Keycloak has a number of SPIs which you can implement your own providers for.
|
||||
</para>
|
||||
|
||||
<section>
|
||||
<title>Implementing a SPI</title>
|
||||
<para>
|
||||
To implement an SPI you need to implement it's ProviderFactory and Provider interfaces. You also need to
|
||||
create a provider-configuration file. For example to implement the Event Listener SPI you need to implement
|
||||
EventListenerProviderFactory and EventListenerProvider and also provide the file
|
||||
<literal>META-INF/services/org.keycloak.events.EventListenerProviderFactory</literal>
|
||||
</para>
|
||||
<para>
|
||||
For example to implement the Event Listener SPI you start by implementing EventListenerProviderFactory:
|
||||
<programlisting><![CDATA[{
|
||||
package org.acme.provider;
|
||||
|
||||
import ...
|
||||
|
||||
public class MyEventListenerProviderFactory implements EventListenerProviderFactory {
|
||||
|
||||
private List<Event> events;
|
||||
|
||||
public String getId() {
|
||||
return "my-event-listener";
|
||||
}
|
||||
|
||||
public void init(Config.Scope config) {
|
||||
int max = config.getInt("max");
|
||||
events = new MaxList(max);
|
||||
}
|
||||
|
||||
public EventListenerProvider create(KeycloakSession session) {
|
||||
return new MyEventListenerProvider(events);
|
||||
}
|
||||
|
||||
public void close() {
|
||||
events = null;
|
||||
}
|
||||
|
||||
}
|
||||
}]]></programlisting>
|
||||
The example uses a MaxList which has a maximum size and is concurrency safe. When the maximum size is reached
|
||||
and new entries are added the oldest entry is removed. Keycloak creates a single instance of
|
||||
EventListenerProviderFactory which makes it possible to store state for multiple requests. EventListenerProvider
|
||||
instances are created by calling create on the factory for each requests so these should be light-weight.
|
||||
</para>
|
||||
<para>
|
||||
Next you would implement EventListenerProvider:
|
||||
<programlisting><![CDATA[{
|
||||
package org.acme.provider;
|
||||
|
||||
import ...
|
||||
|
||||
public class MyEventListenerProvider implements EventListenerProvider {
|
||||
|
||||
private List<Event> events;
|
||||
|
||||
public MyEventListenerProvider(List<Event> events) {
|
||||
this.events = events;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEvent(Event event) {
|
||||
events.add(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}]]></programlisting>
|
||||
</para>
|
||||
<para>
|
||||
The file <literal>META-INF/services/org.keycloak.events.EventListenerProviderFactory</literal> should
|
||||
contain the full name of your ProviderFactory implementation:
|
||||
<programlisting><![CDATA[{
|
||||
org.acme.provider.MyEventListenerProviderFactory
|
||||
}]]></programlisting>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Registering provider implementations</title>
|
||||
<para>
|
||||
Keycloak loads provider implementations from the file-system. By default all JARs inside
|
||||
<literal>standalone/configuration/providers</literal> are loaded. This is simple, but requires all providers
|
||||
to share the same library. All provides also inherit all classes from the Keycloak class-loader. In the future
|
||||
we'll add support to load providers from modules, which allows better control of class isolation.
|
||||
</para>
|
||||
<para>
|
||||
To register your provider simply copy the JAR including the ProviderFactory and Provider classes and the
|
||||
provider configuration file to <literal>standalone/configuration/providers</literal>.
|
||||
</para>
|
||||
<para>
|
||||
You can also define multiple provider class-path if you want to create isolated class-loaders. To do this
|
||||
edit keycloak-server.json and add more classpath entries to the providers array. For example:
|
||||
<programlisting><![CDATA[{
|
||||
"providers": [
|
||||
"classpath:provider1.jar;lib-v1.jar",
|
||||
"classpath:provider2.jar;lib-v2.jar"
|
||||
]
|
||||
}]]></programlisting>
|
||||
The above example will create two separate class-loaders for providers. The classpath entries follow the
|
||||
same syntax as Java classpath, with ';' separating multiple-entries. Wildcard is also supported allowing
|
||||
loading all jars (files with .jar or .JAR extension) in a folder, for example:
|
||||
<programlisting><![CDATA[{
|
||||
"providers": [
|
||||
"classpath:/home/user/providers/*"
|
||||
]
|
||||
}]]></programlisting>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Available SPIs</title>
|
||||
<para>
|
||||
Here's a list of the available SPIs and a brief description. For more details on each SPI refer to
|
||||
individual
|
||||
sections.
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>Account</term>
|
||||
<listitem>
|
||||
Provides the account manage console pages. The default implementation uses FreeMarker templates.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Connections Infinispan</term>
|
||||
<listitem>
|
||||
Loads and configures Infinispan connections. The default implementation can load connections
|
||||
from
|
||||
the Infinispan subsystem, or alternatively can be manually configured in keycloak-server.json.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Connections Jpa</term>
|
||||
<listitem>
|
||||
Loads and configures Infinispan connections. The default implementation can load datasources
|
||||
from
|
||||
WildFly/EAP, or alternatively can be manually configured in keycloak-server.json.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Connections Jpa Updater</term>
|
||||
<listitem>
|
||||
Updates database schema. The default implementation uses Liquibase.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Connections Mongo</term>
|
||||
<listitem>
|
||||
Loads and configures MongoDB connections. The default implementation is configured in
|
||||
keycloak-server.json.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Email</term>
|
||||
<listitem>
|
||||
Formats and sends email. The default implementation uses FreeMarker templates and JavaMail.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Events Listener</term>
|
||||
<listitem>
|
||||
Listen to user related events for example user login success and failures. Keycloak provides two
|
||||
implementations out of box. One that logs events to the server log and another that can send
|
||||
email
|
||||
notifications to users on certain events.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Events Store</term>
|
||||
<listitem>
|
||||
Store user related events so they can be viewed through the admin console and account management
|
||||
console.
|
||||
Keycloak provides implementations for Relational Databases and MongoDB.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Export</term>
|
||||
<listitem>
|
||||
Exports the Keycloak database. Keycloak provides implementations that export to JSON files
|
||||
either
|
||||
as a single file, multiple file in a directory or a encrypted ZIP archive.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Import</term>
|
||||
<listitem>
|
||||
Imports and exported Keycloak database. Keycloak provides implementations that import from JSON
|
||||
files either
|
||||
as a single file, multiple file in a directory or a encrypted ZIP archive.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Login</term>
|
||||
<listitem>
|
||||
Provides the login pages. The default implementation uses FreeMarker templates.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Login Protocol</term>
|
||||
<listitem>
|
||||
Provides protocols. Keycloak provides implementations of OpenID Connect and SAML 2.0.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Realm</term>
|
||||
<listitem>
|
||||
Provides realm and application meta-data. Keycloak provides implementations for Relational
|
||||
Databases
|
||||
and MongoDB.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Realm Cache</term>
|
||||
<listitem>
|
||||
Caches realm and application meta-data to improve performance. Keycloak provides a basic
|
||||
in-memory
|
||||
cache and a Infinispan cache.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Theme</term>
|
||||
<listitem>
|
||||
Allows creating themes to customize look and feel. Keycloak provides implementations that can
|
||||
load
|
||||
themes from the file-system or classpath.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Timer</term>
|
||||
<listitem>
|
||||
Executes scheduled tasks. Keycloak provides a basic implementation based on java.util.Timer.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>User</term>
|
||||
<listitem>
|
||||
Provides users and role-mappings. Keycloak provides implementations for Relational Databases
|
||||
and MongoDB.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>User Cache</term>
|
||||
<listitem>
|
||||
Caches users and role-mappings to improve performance. Keycloak provides a basic in-memory
|
||||
cache and a Infinispan cache.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>User Federation</term>
|
||||
<listitem>
|
||||
Support syncing users from an external source. Keycloak provides implementations for LDAP and
|
||||
Active Directory.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>User Sessions</term>
|
||||
<listitem>
|
||||
Provides users session information. Keycloak provides implementations for basic in-memory,
|
||||
Infinispan,
|
||||
Relational Databases and MongoDB
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</section>
|
||||
</chapter>
|
||||
@@ -18,7 +18,7 @@
|
||||
<term>Include AuthnStatement</term>
|
||||
<listitem>
|
||||
<para>
|
||||
SAML login responses may specify the authenticaiton method used (password, etc.) as well as
|
||||
SAML login responses may specify the authentication method used (password, etc.) as well as
|
||||
a timestamp of the login. Setting this to on will include that statement in the response document.
|
||||
</para>
|
||||
</listitem>
|
||||
@@ -27,7 +27,7 @@
|
||||
<term>Multi-valued Roles</term>
|
||||
<listitem>
|
||||
<para>
|
||||
If this switch is off, any user role mapings will have a corresponding attribute created for it.
|
||||
If this switch is off, any user role mappings will have a corresponding attribute created for it.
|
||||
If this switch is turn on, only one role attribute will be created, but it will have
|
||||
multiple values within in.
|
||||
</para>
|
||||
@@ -82,7 +82,7 @@
|
||||
<para>
|
||||
By default, Keycloak will respond using the initial SAML binding of the original request. By turning
|
||||
on this switch, you will force Keycloak to always respond using the SAML POST Binding even if the
|
||||
original request was a the Redirect binding.
|
||||
original request was the Redirect binding.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -66,7 +66,7 @@ keycloak-appliance-dist-all-&project.version;/
|
||||
<literal>keycloak-war-dist-all-&project.version;.zip</literal>
|
||||
contains
|
||||
just the bits you need to install keycloak on your favorite web container. We currently only support
|
||||
installing it on top of an existing Wildfly 8, JBoss EAP 6.x or JBoss AS 7.1.1 distribution. We may in the
|
||||
installing it on top of an existing Wildfly 8 or JBoss EAP 6.x distribution. We may in the
|
||||
future provide directions on how to install it on another web container like Tomcat or Jetty. If anybody
|
||||
in the community is interested in pulling this together, please contact us. Its mostly Maven pom work.
|
||||
</para>
|
||||
@@ -701,175 +701,4 @@ keycloak-war-dist-all-&project.version;/
|
||||
</section>
|
||||
|
||||
</section>
|
||||
<section>
|
||||
<title>Configuring Servers from the Subsystem</title>
|
||||
<para>
|
||||
If you are using WildFly or EAP,he Keycloak server is deployed and configured from the Keycloak subsystem. This makes provisioning simpler in a domain environment.
|
||||
It also allows you to create more than one Keycloak server instance inside a single WildFly instance. And, you can upload providers, themes, and
|
||||
server configurations without disturbing Keycloak's auth-server.war.
|
||||
</para>
|
||||
<section>
|
||||
<title>Manually Creating A Server</title>
|
||||
<para>
|
||||
A Keycloak server can be declared by editing standalone.xml or domain.xml.
|
||||
</para>
|
||||
<para>
|
||||
<programlisting><![CDATA[
|
||||
<server xmlns="urn:jboss:domain:1.4">
|
||||
|
||||
<profile>
|
||||
<subsystem xmlns="urn:jboss:domain:keycloak:1.0">
|
||||
<auth-server name="keycloak-1">
|
||||
<enabled>true</enabled>
|
||||
<web-context>auth</web-context>
|
||||
</auth-server>
|
||||
<auth-server name="keyclaok-2">
|
||||
<enabled>false</enabled>
|
||||
<web-context>auth2</web-context>
|
||||
</auth-server>
|
||||
</subsystem>
|
||||
</profile>
|
||||
]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
<warning>
|
||||
<para>
|
||||
If you create more than one Keycloak server, you will need to use CLI to fully configure each instance. At the least,
|
||||
you will need to run the <link linkend="uploading-extra-config">update-server-config</link> operation.
|
||||
</para>
|
||||
</warning>
|
||||
</section>
|
||||
<section>
|
||||
<title>Using CLI and CLI GUI with the Keycloak Subsystem</title>
|
||||
<para>
|
||||
Servers can also be added/removed or enabled/disabled at runtime using the <ulink url="https://developer.jboss.org/wiki/CommandLineInterface">CLI</ulink> or
|
||||
<ulink url="https://developer.jboss.org/wiki/AGUIForTheCommandLineInterface">CLI GUI</ulink> tool. These are tools that ship with WildFly/EAP and also with
|
||||
the Keycloak Appliance installation. See <ulink url="https://developer.jboss.org/wiki/CommandLineInterface">CLI</ulink> or
|
||||
<ulink url="https://developer.jboss.org/wiki/AGUIForTheCommandLineInterface">CLI GUI</ulink> documentation to learn more about how to start the tools,
|
||||
issue commands, and create CLI scripts.
|
||||
</para>
|
||||
<para>
|
||||
To start CLI with the Keycloak Appliance install:
|
||||
<programlisting><![CDATA[
|
||||
cd <APPLIANCE_INSTALL_DIR>/keycloak/bin
|
||||
./jboss-cli.sh --gui
|
||||
or
|
||||
./jboss.cli.bat --gui]]>
|
||||
</programlisting>
|
||||
<note>Your server must be running to start in --gui mode.</note>
|
||||
</para>
|
||||
<section>
|
||||
<title>Basic CLI Commands</title>
|
||||
<para>
|
||||
Command to add a server in CLI:
|
||||
<programlisting><![CDATA[
|
||||
/subsystem=keycloak/auth-server=my-auth-server/:add(web-context=my-auth, enabled=true)]]>
|
||||
</programlisting>
|
||||
Because "enabled=true", a new Keycloak server will be immediately deployed. By default "enabled" is set to false.
|
||||
</para>
|
||||
<para>
|
||||
Command to remove a server in CLI:
|
||||
<programlisting><![CDATA[
|
||||
/subsystem=keycloak/auth-server=my-auth-server/:remove]]>
|
||||
</programlisting>
|
||||
The Keycloak server will be immediately deleted and undeployed.
|
||||
</para>
|
||||
<para>
|
||||
Command to enable or disable a server in CLI:
|
||||
<programlisting><![CDATA[
|
||||
/subsystem=keycloak/auth-server=foo/:write-attribute(name=enabled,value=true)]]>
|
||||
</programlisting>
|
||||
The Keycloak server will be immediately deployed or undeployed, but not deleted.
|
||||
</para>
|
||||
</section>
|
||||
<section id="uploading-extra-config">
|
||||
<title>Uploading extra configuration using CLI</title>
|
||||
<para>
|
||||
The Keycloak subsystem allows you to upload keycloak-server.json, provider jars, and theme jars to a Keycloak server instance. The
|
||||
CLI operations for this are "update-server-config" and "add-provider". You may use CLI, CLI GUI, or CLI scripts for these operations. The following
|
||||
examples are shown using <ulink url="https://developer.jboss.org/wiki/AGUIForTheCommandLineInterface">CLI GUI</ulink> for clarity.
|
||||
</para>
|
||||
<para>
|
||||
To use a new keycloak-server.json file for your server, find your server under the Keycloak subsystem. Then right-click the server,
|
||||
select "update-server-config", and upload your file.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<imagedata fileref="images/update-server-config-select.png"/>
|
||||
</para>
|
||||
<para>
|
||||
<imagedata fileref="images/update-server-config-dialog.png"/>
|
||||
</para>
|
||||
|
||||
<warning>
|
||||
<para>
|
||||
If you use the update-server-config operation, you should delete or rename <WILDFLY_HOME>/standalone/configuration/keycloak-server.json.
|
||||
Otherwise, all Keycloak server instances will use this file instead of your uploaded file.
|
||||
</para>
|
||||
</warning>
|
||||
<para>
|
||||
To upload a new provider jar or theme jar to your server, find your server under the Keycloak subsystem. Then right-click the server,
|
||||
select "add-provider", and upload your file.
|
||||
</para>
|
||||
<para>
|
||||
<imagedata fileref="images/add-provider-select.png"/>
|
||||
</para>
|
||||
<para>
|
||||
<imagedata fileref="images/add-provider-dialog.png"/>
|
||||
</para>
|
||||
</section>
|
||||
<section>
|
||||
<title>Working with overlays</title>
|
||||
<para>
|
||||
When you upload a provider jar, theme jar, or keycloak-server.json file, you are creating an overlay. That is, the file is "overlayed"
|
||||
onto the Keycloak server at deploy time. There are two additional operations that help you manage these overlays. They are "list-overlays" and
|
||||
"remove-overlay". Here are CLI examples of these operations.
|
||||
</para>
|
||||
<para>
|
||||
<programlisting>
|
||||
/subsystem=keycloak/auth-server=my-auth-server/:list-overlays
|
||||
{
|
||||
"outcome" => "success",
|
||||
"result" => [
|
||||
"/WEB-INF/classes/META-INF/keycloak-server.json",
|
||||
"/WEB-INF/lib/federation-properties-example.jar"
|
||||
],
|
||||
}</programlisting>
|
||||
<programlisting>
|
||||
/subsystem=keycloak/auth-server=my-auth-server/:remove-overlay(overlay-file-path=/WEB-INF/lib/federation-properties-example.jar,redeploy=true)
|
||||
{
|
||||
"outcome" => "success",
|
||||
}</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
<note>
|
||||
Notice in the "list-overlays" operation, the full path to the server config is
|
||||
/WEB-INF/classes/META-INF/keycloak-server.json. This is always the uploaded path for an "update-server-config" operation.
|
||||
If you remove this overlay, the Keycloak server will revert to its default keycloak-server.json. If you have a
|
||||
keycloak-server.json file in your <WILDFLY_HOME>/standalone/configuration directory, it will always take precedence
|
||||
over both the default and the overlay.
|
||||
</note>
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
<section>
|
||||
<title>Adding a Keycloak server in Domain Mode</title>
|
||||
<para>
|
||||
In domain mode, you start the server with the "domain" command instead of the "standalone" command. In this case, the Keycloak subsystem is
|
||||
defined in domain/configuration/domain.xml instead of standalone/configuration.standalone.xml. Inside domain.xml, you will see more than one
|
||||
profile. A Keycloak subsystem can be defined in zero or more of those profiles.
|
||||
</para>
|
||||
<para>
|
||||
In the example below, a Keycloak server named "foo" is defined in the "full" profile. The "full" profile is assigned to the "main-server-group".
|
||||
Every WildFly instance that belongs to "main-server-group" will get an identically configured deployment of the "foo" Keycloak server.
|
||||
</para>
|
||||
<para>
|
||||
All operations discussed earlier are valid for a Keycloak server in a domain. You can enable/disable, upload new keyclaok-server.json, and add provider jars.
|
||||
In the following example, any changes that are made to the "foo" server will be automatically propogated to every instance in "main-server-group".
|
||||
</para>
|
||||
<para>
|
||||
<imagedata fileref="images/domain-mode.png"/>
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
</chapter>
|
||||
@@ -20,7 +20,7 @@
|
||||
Copy <literal>Client ID</literal> and <literal>Client secret</literal> from the
|
||||
<ulink url="https://github.com/settings/applications">GitHub Settings</ulink> into the settings
|
||||
page in the Keycloak Admin Console as the <literal>Key</literal> and <literal>Secret</literal>. Then click
|
||||
<literal>Save</literal> in the Keycloak Admin Console to enable login with Google.
|
||||
<literal>Save</literal> in the Keycloak Admin Console to enable login with GitHub.
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<title>Configure theme</title>
|
||||
<para>
|
||||
All theme types, except welcome, is configured through <literal>Keycloak Admin Console</literal>. To change
|
||||
the theme used for a realm open the open the <literal>Keycloak Admin Console</literal>, select your realm
|
||||
the theme used for a realm open the <literal>Keycloak Admin Console</literal>, select your realm
|
||||
from the drop-down box in the top left corner. Under <literal>Settings</literal> click on <literal>Theme</literal>.
|
||||
</para>
|
||||
<para>
|
||||
@@ -166,7 +166,7 @@
|
||||
and <literal>org.keycloak.account.AccountProvider</literal>.
|
||||
</para>
|
||||
<para>
|
||||
Once you have deployed your account provider to Keycloak you need to configure <literal>keycloak-server.json</literal>to specify which provider should be used:
|
||||
Once you have deployed your account provider to Keycloak you need to configure <literal>keycloak-server.json</literal> to specify which provider should be used:
|
||||
<programlisting>
|
||||
"account": {
|
||||
"provider": "custom-provider"
|
||||
@@ -182,7 +182,7 @@
|
||||
and <literal>org.keycloak.login.LoginFormsProvider</literal> in <literal>forms/login-api</literal>.
|
||||
</para>
|
||||
<para>
|
||||
Once you have deployed your account provider to Keycloak you need to configure <literal>keycloak-server.json</literal>to specify which provider should be used:
|
||||
Once you have deployed your account provider to Keycloak you need to configure <literal>keycloak-server.json</literal> to specify which provider should be used:
|
||||
<programlisting>
|
||||
"login": {
|
||||
"provider": "custom-provider"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
federation plugins may only import the username into Keycloak storage, others might import everything from name,
|
||||
address, and phone number, to user role mappings. Some plugins might want to import credentials directly into
|
||||
Keycloak storage and let Keycloak handle credential validation. Others might want to handle credential validation
|
||||
themselves. Thegoal of the Federation SPI is to support all of these scenarios.
|
||||
themselves. The goal of the Federation SPI is to support all of these scenarios.
|
||||
</para>
|
||||
<section>
|
||||
<title>LDAP and Active Directory Plugin</title>
|
||||
@@ -76,7 +76,7 @@
|
||||
<term>Display Name</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Name used when this provider is referenced in the admin consle
|
||||
Name used when this provider is referenced in the admin console
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -118,7 +118,7 @@
|
||||
first import this LDAP user into Keycloak database and then authenticate against LDAP password.
|
||||
</para>
|
||||
<para>
|
||||
Thing is that Federation Provider import just requested users by default, so if you click to <literal>View all users</literal>
|
||||
Federation Provider imports just requested users by default, so if you click to <literal>View all users</literal>
|
||||
in Keycloak admin console, you will see just those LDAP users, which were already authenticated/requested by Keycloak.
|
||||
</para>
|
||||
<para>If you want to sync all LDAP users into Keycloak database, you may configure and enable Sync, which is in
|
||||
@@ -160,7 +160,7 @@
|
||||
<para>
|
||||
Writing a User Federation Provider starts by implementing the <literal>UserFederationProvider</literal>
|
||||
and <literal>UserFederationProviderFactory</literal> interfaces. Please see the Javadoc and example
|
||||
for complete details on on how to do this. Some important methods of note:
|
||||
for complete details on how to do this. Some important methods of note:
|
||||
getUserByUsername() and getUserByEmail() require that you query your federated storage and if the user exists
|
||||
create and import the user into Keycloak storage. How much metadata you import is fully up to you. This
|
||||
import is done by invoking methods on the object returned <literal>KeycloakSession.userStorage()</literal>
|
||||
@@ -173,8 +173,8 @@
|
||||
contain a file called <literal>org.keycloak.models.UserFederationProviderFactory</literal>
|
||||
within the <literal>META-INF/services</literal> directory of the JAR. This file is a list
|
||||
of fully qualified classnames of all implementations of <literal>UserFederationProviderFactory</literal>.
|
||||
This is how Keycloak discovers which providers have been deployment. Place the JAR in the
|
||||
keycloak WAR deployment in the <literal>WEB-INF/lib</literal> directory.
|
||||
For more details on writing provider implementations and how to deploy to Keycloak refer to the
|
||||
<link linkend='providers'>providers</link> section.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-events-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -41,4 +41,5 @@ public interface Errors {
|
||||
String USER_SESSION_NOT_FOUND = "user_session_not_found";
|
||||
|
||||
String EMAIL_SEND_FAILED = "email_send_failed";
|
||||
String INVALID_EMAIL = "invalid_email";
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-events-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-events-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-events-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-events-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -58,3 +58,18 @@ Multi tenancy
|
||||
-------------
|
||||
|
||||
A complete application, showing how to achieve multi tenancy of web applications by using one realm per account. For more information look at `multi-tenant/README.md`
|
||||
|
||||
Basic authentication
|
||||
--------------------
|
||||
|
||||
Example REST application configured to support both basic authentication with username/password as well as authentication with bearer token. For more information look at `basic-auth/README.md`
|
||||
|
||||
Fuse
|
||||
----
|
||||
|
||||
This is set of demo applications, showing how to secure your own web applications running inside OSGI environment in JBoss Fuse or Apache Karaf. Fore more information look at `fuse/README.md`
|
||||
|
||||
SAML
|
||||
----
|
||||
|
||||
This is set of demo applications, showing how to secure your own SAML web applications. Fore more information look at `saml/README.md`
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -18,9 +18,11 @@
|
||||
document.getElementById('not-authenticated').style.display = 'none';
|
||||
|
||||
document.getElementById('subject').innerText = keycloak.subject;
|
||||
document.getElementById('username').innerText = keycloak.idToken.preferred_username;
|
||||
document.getElementById('username').innerText = keycloak.idTokenParsed.preferred_username;
|
||||
document.getElementById('tokenExpires').innerText = new Date(keycloak.tokenParsed.exp * 1000).toLocaleString();
|
||||
document.getElementById('tokenRefreshExpires').innerText = new Date(keycloak.refreshTokenParsed.exp * 1000).toLocaleString();
|
||||
document.getElementById('token').innerText = JSON.stringify(keycloak.tokenParsed, null, ' ');
|
||||
document.getElementById('idToken').innerText = JSON.stringify(keycloak.idTokenParsed, null, ' ');
|
||||
} else {
|
||||
document.getElementById('authenticated').style.display = 'none';
|
||||
document.getElementById('not-authenticated').style.display = 'block';
|
||||
@@ -31,6 +33,15 @@
|
||||
keycloak.init({ onLoad: 'check-sso' }).success(updateState);
|
||||
}, false);
|
||||
</script>
|
||||
<style>
|
||||
td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
tr.odd td {
|
||||
background-color: #eee;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="authenticated" style="display: none;">
|
||||
@@ -46,7 +57,7 @@
|
||||
<td>Subject</td>
|
||||
<td id="subject"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr class="odd">
|
||||
<td>Username</td>
|
||||
<td id="username"></td>
|
||||
</tr>
|
||||
@@ -54,10 +65,18 @@
|
||||
<td>Token expires</td>
|
||||
<td id="tokenExpires"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr class="odd">
|
||||
<td>Refresh token expires</td>
|
||||
<td id="tokenRefreshExpires"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Token</td>
|
||||
<td><pre id="token"></pre></td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>ID Token</td>
|
||||
<td><pre id="idToken"></pre></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -81,6 +81,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<h2><span>Server version</span></h2>
|
||||
<button type="submit" data-ng-click="loadVersion()">Load version</button>
|
||||
|
||||
<div data-ng-show="version">
|
||||
Keycloak version: {{version.version}} <br/>
|
||||
Keycloak build time: {{version['build-time'] | date:'yyyy-MM-dd HH:mm:ss'}} <br/>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -32,6 +32,9 @@ angular.element(document).ready(function ($http) {
|
||||
module.controller('GlobalCtrl', function($scope, $http) {
|
||||
$scope.products = [];
|
||||
$scope.roles = [];
|
||||
$scope.serverInfo = [];
|
||||
$scope.realm = [];
|
||||
$scope.version = [];
|
||||
$scope.reloadData = function() {
|
||||
$http.get("http://localhost-db:8080/cors-database/products").success(function(data) {
|
||||
$scope.products = angular.fromJson(data);
|
||||
@@ -72,6 +75,12 @@ module.controller('GlobalCtrl', function($scope, $http) {
|
||||
});
|
||||
};
|
||||
|
||||
$scope.loadVersion = function() {
|
||||
$http.get("http://localhost-auth:8080/auth/version").success(function(data) {
|
||||
$scope.version = angular.fromJson(data);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.logout = logout;
|
||||
});
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<name>Keycloak Examples - CORS</name>
|
||||
|
||||
@@ -30,11 +30,9 @@ Step 1: Make sure you've set up the Keycloak Server
|
||||
The Keycloak Appliance Distribution comes with a preconfigured Keycloak server (based on Wildfly). You can use it out of
|
||||
the box to run these demos. So, if you're using this, you can head to Step 2.
|
||||
|
||||
Alternatively, you can install the Keycloak Server onto any JBoss AS 7.1.1, EAP 6.x, or Wildfly 8.x server, but there is
|
||||
a few steps you must follow.
|
||||
|
||||
If using JBoss AS7, obtain latest keycloak-war-dist-all.zip. This distro is used to install Keycloak onto an existing JBoss installation.
|
||||
This installs the server using a WAR file. It is not needed on EAP6 and WildFly.
|
||||
Alternatively, you can install the Keycloak Server onto any EAP 6.x, or Wildfly 8.x server, but there is
|
||||
a few steps you must follow. You need to obtain latest keycloak-war-dist-all.zip. This distro is used to install Keycloak onto an existing JBoss installation.
|
||||
This installs the server using a WAR file.
|
||||
|
||||
$ cd ${jboss.as7.home}/standalone
|
||||
$ cp -r ${keycloak-war-dist-all}/deployments .
|
||||
@@ -54,6 +52,10 @@ For JBoss AS 7.1.1:
|
||||
$ cd ${as7.home}
|
||||
$ unzip ${keycloak-war-dist-all}/adapters/keycloak-as7-adapter-dist.zip
|
||||
|
||||
WARNING: Note that we don't officially support Keycloak auth-server running on JBoss AS 7.1.1. You can still test examples running on AS 7.1.1,
|
||||
but then you may need to do few additional changes in examples to point them into external Keycloak server running on WildFly or EAP 6.x.
|
||||
This is especially changing "auth-server-url" in keycloak.json files to be non-relative as examples and auth-server will run on different server!
|
||||
|
||||
Unzipping the adapter ZIP only installs the JAR files. You must also add the Keycloak Subsystem to the server's
|
||||
configuration (standalone/configuration/standalone.xml).
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ public class AdminClient {
|
||||
HttpClient client = new HttpClientBuilder()
|
||||
.disableTrustManager().build();
|
||||
try {
|
||||
HttpGet get = new HttpGet(AdapterUtils.getOrigin(req.getRequestURL().toString(), session) + "/auth/admin/realms/demo/roles");
|
||||
HttpGet get = new HttpGet(AdapterUtils.getOriginForRestCalls(req.getRequestURL().toString(), session) + "/auth/admin/realms/demo/roles");
|
||||
get.addHeader("Authorization", "Bearer " + session.getTokenString());
|
||||
try {
|
||||
HttpResponse response = client.execute(get);
|
||||
|
||||
+3
-1
@@ -7,8 +7,10 @@ import org.apache.http.client.methods.HttpGet;
|
||||
import org.keycloak.KeycloakSecurityContext;
|
||||
import org.keycloak.adapters.AdapterUtils;
|
||||
import org.keycloak.adapters.HttpClientBuilder;
|
||||
import org.keycloak.constants.ServiceUrlConstants;
|
||||
import org.keycloak.representations.IDToken;
|
||||
import org.keycloak.util.JsonSerialization;
|
||||
import org.keycloak.util.KeycloakUriBuilder;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpSession;
|
||||
@@ -50,7 +52,7 @@ public class CustomerDatabaseClient {
|
||||
HttpClient client = new HttpClientBuilder()
|
||||
.disableTrustManager().build();
|
||||
try {
|
||||
HttpGet get = new HttpGet(AdapterUtils.getOrigin(req.getRequestURL().toString(), session) + "/database/customers");
|
||||
HttpGet get = new HttpGet(AdapterUtils.getOriginForRestCalls(req.getRequestURL().toString(), session) + "/database/customers");
|
||||
get.addHeader("Authorization", "Bearer " + session.getTokenString());
|
||||
try {
|
||||
HttpResponse response = client.execute(get);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<name>Examples</name>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class ProductDatabaseClient
|
||||
HttpClient client = new HttpClientBuilder()
|
||||
.disableTrustManager().build();
|
||||
try {
|
||||
HttpGet get = new HttpGet(AdapterUtils.getOrigin(req.getRequestURL().toString(), session) + "/database/products");
|
||||
HttpGet get = new HttpGet(AdapterUtils.getOriginForRestCalls(req.getRequestURL().toString(), session) + "/database/products");
|
||||
get.addHeader("Authorization", "Bearer " + session.getTokenString());
|
||||
try {
|
||||
HttpResponse response = client.execute(get);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final-SNAPSHOT</version>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
Keycloak Fuse demo
|
||||
==================
|
||||
|
||||
Currently Keycloak supports securing your web applications running inside [JBoss Fuse](http://www.jboss.org/products/fuse/overview/) or [Apache Karaf](http://karaf.apache.org/). It leverages Jetty8 adapter
|
||||
as both JBoss Fuse 6.1 and Apache Karaf 3 are bundled with [Jetty8](http://eclipse.org/jetty/) server under the covers and Jetty is used for running various kinds of web applications.
|
||||
|
||||
The Fuse example is slightly modified version of Keycloak base demo applications. The main difference among base demo is that for Fuse demo
|
||||
are applications running on separate Fuse/Karaf server. Keycloak server is supposed to run separately on Wildfly 8 or JBoss EAP 6.3.
|
||||
|
||||
What is supported for Fuse/Karaf is:
|
||||
* Security for classic WAR applications deployed on Fuse/Karaf with [pax-war extender](https://ops4j1.jira.com/wiki/display/ops4j/Pax+Web+Extender+-+War).
|
||||
* Security for servlets deployed on Fuse/Karaf as OSGI services with [pax-whiteboard extender](https://ops4j1.jira.com/wiki/display/ops4j/Pax+Web+Extender+-+Whiteboard).
|
||||
* Security for [Apache Camel](http://camel.apache.org/) Jetty endpoints running with [camel-jetty](http://camel.apache.org/jetty.html) component.
|
||||
* Security for [Apache CXF](http://cxf.apache.org/) endpoints running on their own separate [Jetty engine](http://cxf.apache.org/docs/jetty-configuration.html).
|
||||
Supports both securing JAX-RS and JAX-WS endpoints.
|
||||
* Security for [Apache CXF](http://cxf.apache.org/) endpoints running on default engine provided by CXF servlet on [http://localhost:8181/cxf](http://localhost:8181/cxf)
|
||||
|
||||
Fuse demo contains those basic applications:
|
||||
* **customer-app-fuse** A WAR application that is deployed with [pax-war extender](https://ops4j1.jira.com/wiki/display/ops4j/Pax+Web+Extender+-+War)
|
||||
* **product-app-fuse** A servlet application deployed with [pax-whiteboard extender](https://ops4j1.jira.com/wiki/display/ops4j/Pax+Web+Extender+-+Whiteboard)
|
||||
* **cxf-jaxws** [Apache CXF](http://cxf.apache.org/) JAX-WS endpoint running on separate Jetty engine on [http://localhost:8282/PersonServiceCF](http://localhost:8282/PersonServiceCF).
|
||||
The product-app-fuse invokes the endpoint to get data.
|
||||
* **camel** [Apache Camel](http://camel.apache.org/) endpoint running on separate Jetty engine on [http://localhost:8383/admin-camel-endpoint](http://localhost:8383/admin-camel-endpoint).
|
||||
The customer-app-fuse invokes the endpoint to get data.
|
||||
* **cxf-jaxrs** [Apache CXF](http://cxf.apache.org/) JAX-RS endpoint running on default Jetty on [http://localhost:8181/cxf/customerservice](http://localhost:8181/cxf/customerservice).
|
||||
The customer-app-fuse invokes the endpoint to get data
|
||||
|
||||
Running of demo consists of 2 steps. First you need to run separate Keycloak server and then Fuse/Karaf server with the applications
|
||||
|
||||
Base steps
|
||||
----------
|
||||
|
||||
* Run external instance of Keycloak server on WildFly 8 or JBoss EAP 6.3 . Fuse demo suppose that server is running on [http://localhost:8080/auth](http://localhost:8080/auth)
|
||||
* Import realm `demo` from the file testrealm.json on `examples/fuse/testrealm.json` .
|
||||
* Then build examples, which is needed so the feature repository is added to your local maven repo:
|
||||
|
||||
```
|
||||
cd examples/fuse
|
||||
mvn clean install
|
||||
```
|
||||
|
||||
Run demo applications on Apache Karaf 3.0.2
|
||||
-------------------------------------------
|
||||
|
||||
Demo is using Apache camel and Apache CXF, which are not in standalone Karaf by default. So you will need to install feature repositories for both of them.
|
||||
Next step is to add feature repository for main set of Keycloak karaf features and for the demo. Once all feature URLs are added, you just need to install `keycloak-fuse-example` feature,
|
||||
which automatically installs all other needed stuff.
|
||||
|
||||
Once you run Apache Karaf, you need to run these commands from Karaf console (Make sure to replace keycloak versions in the example with actual Keycloak version):
|
||||
|
||||
```
|
||||
feature:repo-add mvn:org.apache.camel.karaf/apache-camel/2.12.5/xml/features
|
||||
feature:repo-add mvn:org.apache.cxf.karaf/apache-cxf/2.7.14/xml/features
|
||||
feature:repo-add mvn:org.keycloak/keycloak-osgi-features/1.1.0.Final/xml/features
|
||||
feature:repo-add mvn:org.keycloak.example.demo/keycloak-fuse-example-features/1.1.0.Final/xml/features
|
||||
feature:install keycloak-fuse-example
|
||||
```
|
||||
|
||||
After that you can test running on [http://localhost:8080/customer-portal](http://localhost:8080/customer-portal) and login as "bburke@redhat.com" with password "password". Customer-portal is able to
|
||||
receive the response from the endpoints provided by `cxf-jaxrs` and `camel` applications. Note that camel endpoint is available just for users with role `admin`
|
||||
in this demo, so "bburke@redhat.com" can't access it. You may login as "admin" with password "password" in order to invoke camel endpoint.
|
||||
|
||||
From [http://localhost:8080/product-portal](http://localhost:8080/product-portal) you will see servlet endpoint, which invokes JAX-WS provided by `cxf-jaxws` application.
|
||||
|
||||
Note that this demo also secures whole default CXF endpoint on [http://localhost:8181/cxf](http://localhost:8181/cxf) hence every application running under it is secured too.
|
||||
|
||||
Running example on JBoss Fuse 6.1.0.redhat-379
|
||||
----------------------------------------------
|
||||
|
||||
Securing your applications on JBoss Fuse 6.1 is a bit more tricky. There is bug [https://ops4j1.jira.com/browse/PAXWEB-666](https://ops4j1.jira.com/browse/PAXWEB-666)
|
||||
, which doesn't easily allow to secure default Jetty engine on [http://localhost:8181](http://localhost:8181) as it's not possible to inject
|
||||
custom Jetty authenticator provided by Keycloak Jetty adapter into underlying Jetty server. Hence first step is to upgrade pax-web
|
||||
version from default 3.0.6 to newer 3.1.2 . Then you need to "refresh" cxf feature too. Final step is to install "keycloak-fuse-example" feature.
|
||||
|
||||
All the steps could be performed with these commands in Fuse console (Replace Keycloak versions with the current Keycloak version number):
|
||||
|
||||
```
|
||||
features:uninstall pax-war
|
||||
features:uninstall pax-http-whiteboard
|
||||
features:uninstall pax-http
|
||||
features:uninstall pax-jetty
|
||||
features:removeurl mvn:org.ops4j.pax.web/pax-web-features/3.0.6/xml/features
|
||||
```
|
||||
|
||||
Now restart fuse (use `osgi:shutdown` command and start it again from command line. You can ignore startup messages after restart
|
||||
as pax-web is not installed at the moment. Then run those commands:
|
||||
|
||||
```
|
||||
features:addurl mvn:org.ops4j.pax.web/pax-web-features/3.1.2/xml/features
|
||||
features:addurl mvn:org.keycloak/keycloak-osgi-features/1.1.0.Final/xml/features
|
||||
features:addurl mvn:org.keycloak.example.demo/keycloak-fuse-example-features/1.1.0.Final/xml/features
|
||||
features:install keycloak-pax-web-upgrade
|
||||
features:install pax-http-whiteboard/3.1.2
|
||||
features:install pax-war/3.1.2
|
||||
```
|
||||
|
||||
Now it's recommended to restart again. After the start, you shouldn't see any error messages, which indicates that upgrade to pax-web 3.1.2 went fine.
|
||||
So last step is to install the demo now:
|
||||
|
||||
```
|
||||
features:install keycloak-fuse-example
|
||||
```
|
||||
|
||||
Now you can test example applications similarly like described for "Karaf" section.
|
||||
|
||||
Running example on JBoss Fuse 6.2.0
|
||||
-----------------------------------
|
||||
This is snapshot version of JBoss Fuse, which is not released yet at this moment. It has pax-web bug mentioned above fix already, so just those commands are
|
||||
sufficient to install the demo (Replace Keycloak versions with the current Keycloak version number):
|
||||
|
||||
```
|
||||
features:addurl mvn:org.keycloak/keycloak-osgi-features/1.1.0.Final/xml/features
|
||||
features:addurl mvn:org.keycloak.example.demo/keycloak-fuse-example-features/1.1.0.Final/xml/features
|
||||
features:install keycloak-fuse-example
|
||||
```
|
||||
|
||||
Now you can test example applications similarly like described for "Karaf" section.
|
||||
|
||||
How to secure your own applications
|
||||
-----------------------------------
|
||||
Most of the steps should be understandable from testing and understanding the demo. Basically all mentioned applications require to
|
||||
inject Keycloak Jetty authenticator into underlying Jetty server . The steps are bit different according to application type.
|
||||
|
||||
**Classic WAR application** - Take a look at `customer-portal-app` for inspiration. The needed steps are:
|
||||
* Declare needed constraints in `/WEB-INF/web.xml`
|
||||
* Add `jetty-web.xml` file with the authenticator to `/WEB-INF/jetty-web.xml` and add `/WEB-INF/keycloak.json` with your Keycloak configuration
|
||||
* Make sure your WAR imports `org.keycloak.adapters.jetty` and maybe some more packages in MANIFEST.MF file in header `Import-Package`. It's
|
||||
recommended to use maven-bundle-plugin similarly like Fuse examples are doing, but note that "*" resolution for package doesn't import `org.keycloak.adapters.jetty` package
|
||||
as it's not used by application or Blueprint or Spring descriptor, but it's used just in jetty-web.xml file.
|
||||
|
||||
**Servlet web application deployed by pax-whiteboard-extender** - Take a look at `product-portal-app` for inspiration. The needed steps are:
|
||||
* Keycloak provides PaxWebIntegrationService, which allows to inject jetty-authenticator.xml and configure security constraints for your application.
|
||||
Example `product-portal-app` declares this in `OSGI-INF/blueprint/blueprint.xml` . Note that your servlet needs to depend on it.
|
||||
* Steps 2,3 are same like for classic WAR
|
||||
|
||||
**Apache camel application** - You can secure your Apache camel endpoint using [camel-jetty](http://camel.apache.org/jetty.html) endpoint by adding securityHandler with KeycloakJettyAuthenticator and
|
||||
proper security constraints injected. Take a look at `OSGI-INF/blueprint/blueprint.xml` configuration in `camel` application on example of how it can be done.
|
||||
|
||||
**Apache CXF endpoint** - It's recommended to run your CXF endpoints secured by Keycloak on separate Jetty engine. Application `cxf-ws` is using separate endpoint on
|
||||
[http://localhost:8282](http://localhost:8282) . All the important configuration is declared in cxf-jaxws app in `META-INF/spring/beans.xml` .
|
||||
|
||||
**Builtin web applications** - Some services automatically come with deployed servlets on startup. One of such examples is CXF servlet running on
|
||||
[http://localhost:8181/cxf](http://localhost:8181/cxf) context. Securing such endpoints is quite tricky. The approach, which Keycloak is currently using,
|
||||
is providing ServletUnregistrationService, which undeploys builtin servlet at startup, so you are able to re-deploy it again on context secured by Keycloak.
|
||||
You can see the `OSGI-INF/blueprint/blueprint.xml` inside `cxf-jaxrs` project, which adds JAX-RS "customerservice" endpoint and more importantly, it secures whole `/cxf` context.
|
||||
|
||||
As a side effect, all other CXF services running on default CXF HTTP destination will be secured too. Once you uninstall feature "keycloak-fuse-example" the
|
||||
original unsecured servlet on `/cxf` context is deployed back and hence context will become unsecured again.
|
||||
|
||||
It's recommended to use your own Jetty engine for your apps (similarly like `cxf-jaxws` application is doing).
|
||||
|
||||
How to secure Fuse admin services
|
||||
---------------------------------
|
||||
It's possible to secure fuse admin services with Keycloak too. See [fuse-admin](fuse-admin/README.md) for info on how to secure
|
||||
Fuse admin console, remote SSH and JMX access with Keycloak.
|
||||
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.keycloak.example.demo</groupId>
|
||||
<artifactId>camel-endpoint-example</artifactId>
|
||||
<packaging>bundle</packaging>
|
||||
<name>Camel endpoint example - Secured in Karaf/Fuse</name>
|
||||
<description/>
|
||||
|
||||
<properties>
|
||||
<camel.version>2.12.5</camel.version>
|
||||
<keycloak.osgi.export>
|
||||
</keycloak.osgi.export>
|
||||
<keycloak.osgi.import>
|
||||
org.eclipse.jetty.security;version="[8.1,10)",
|
||||
org.eclipse.jetty.util.security;version="[8.1,10)",
|
||||
org.keycloak.*;version="${project.version}",
|
||||
*;resolution:=optional
|
||||
</keycloak.osgi.import>
|
||||
<keycloak.osgi.private>
|
||||
org.keycloak.example.*
|
||||
</keycloak.osgi.private>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.camel</groupId>
|
||||
<artifactId>camel-core</artifactId>
|
||||
<version>${camel.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.camel</groupId>
|
||||
<artifactId>camel-blueprint</artifactId>
|
||||
<version>${camel.version}</version>
|
||||
</dependency>
|
||||
<dependency><groupId>org.apache.camel</groupId>
|
||||
<artifactId>camel-jetty</artifactId>
|
||||
<version>${camel.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<defaultGoal>install</defaultGoal>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>${maven.compiler.source}</source>
|
||||
<target>${maven.compiler.target}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<instructions>
|
||||
<Bundle-Name>${project.name}</Bundle-Name>
|
||||
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
|
||||
<Import-Package>${keycloak.osgi.import}</Import-Package>
|
||||
<Private-Package>${keycloak.osgi.private}</Private-Package>
|
||||
<Export-Package>${keycloak.osgi.export}</Export-Package>
|
||||
</instructions>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,15 @@
|
||||
package org.keycloak.example;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
|
||||
*/
|
||||
public class CamelHelloBean {
|
||||
|
||||
public String hello() {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
return "Hello admin! It's " + sdf.format(new Date());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:camel="http://camel.apache.org/schema/blueprint"
|
||||
xsi:schemaLocation="
|
||||
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
|
||||
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
|
||||
|
||||
<bean id="kcAdapterConfig" class="org.keycloak.representations.adapters.config.AdapterConfig">
|
||||
<property name="realm" value="demo"/>
|
||||
<property name="resource" value="admin-camel-endpoint"/>
|
||||
<property name="realmKey" value="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB"/>
|
||||
<property name="bearerOnly" value="true"/>
|
||||
<property name="sslRequired" value="EXTERNAL"/>
|
||||
</bean>
|
||||
|
||||
<bean id="keycloakAuthenticator" class="org.keycloak.adapters.jetty.KeycloakJettyAuthenticator">
|
||||
<property name="adapterConfig" ref="kcAdapterConfig"/>
|
||||
</bean>
|
||||
|
||||
<bean id="constraint" class="org.eclipse.jetty.util.security.Constraint">
|
||||
<property name="name" value="Customers"/>
|
||||
<property name="roles">
|
||||
<list>
|
||||
<value>admin</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="authenticate" value="true"/>
|
||||
<property name="dataConstraint" value="0"/>
|
||||
</bean>
|
||||
|
||||
<bean id="constraintMapping" class="org.eclipse.jetty.security.ConstraintMapping">
|
||||
<property name="constraint" ref="constraint"/>
|
||||
<property name="pathSpec" value="/*"/>
|
||||
</bean>
|
||||
|
||||
<bean id="securityHandler" class="org.eclipse.jetty.security.ConstraintSecurityHandler">
|
||||
<property name="authenticator" ref="keycloakAuthenticator" />
|
||||
<property name="constraintMappings">
|
||||
<list>
|
||||
<ref component-id="constraintMapping" />
|
||||
</list>
|
||||
</property>
|
||||
<property name="authMethod" value="BASIC"/>
|
||||
<property name="realmName" value="does-not-matter"/>
|
||||
</bean>
|
||||
|
||||
<bean id="sessionHandler" class="org.keycloak.adapters.jetty.core.WrappingSessionHandler">
|
||||
<property name="handler" ref="securityHandler" />
|
||||
</bean>
|
||||
|
||||
<bean id="helloBean" class="org.keycloak.example.CamelHelloBean" />
|
||||
|
||||
<camelContext id="blueprintContext"
|
||||
trace="false"
|
||||
xmlns="http://camel.apache.org/schema/blueprint">
|
||||
<route id="httpBridge">
|
||||
<from uri="jetty:http://0.0.0.0:8383/admin-camel-endpoint?handlers=sessionHandler&matchOnUriPrefix=true" />
|
||||
<setBody>
|
||||
<method ref="helloBean" method="hello"/>
|
||||
</setBody>
|
||||
<log message="The message from camel endpoint contains ${body}"/>
|
||||
<to uri="mock:result"/>
|
||||
</route>
|
||||
</camelContext>
|
||||
|
||||
</blueprint>
|
||||
@@ -0,0 +1,121 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<parent>
|
||||
<artifactId>keycloak-parent</artifactId>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<version>1.1.0.Final</version>
|
||||
<relativePath>../../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.keycloak.example.demo</groupId>
|
||||
<artifactId>customer-portal-fuse-example</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<name>Customer Portal - Secured in Karaf/Fuse</name>
|
||||
<description/>
|
||||
|
||||
<properties>
|
||||
<keycloak.osgi.export>
|
||||
</keycloak.osgi.export>
|
||||
<keycloak.osgi.import>
|
||||
org.apache.http.*;version=${keycloak.apache.httpcomponents.version},
|
||||
javax.servlet.*;version="[2.5,4)",
|
||||
org.keycloak.adapters.jetty;version="${project.version}",
|
||||
org.keycloak.adapters;version="${project.version}",
|
||||
org.keycloak.constants;version="${project.version}",
|
||||
org.keycloak.util;version="${project.version}",
|
||||
org.keycloak.*;version="${project.version}",
|
||||
*;resolution:=optional
|
||||
</keycloak.osgi.import>
|
||||
<keycloak.osgi.private>
|
||||
org.keycloak.example.*
|
||||
</keycloak.osgi.private>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jboss.spec.javax.servlet</groupId>
|
||||
<artifactId>jboss-servlet-api_3.0_spec</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-adapter-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>${keycloak.apache.httpcomponents.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>customer-portal-fuse</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>${maven.compiler.source}</source>
|
||||
<target>${maven.compiler.target}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifestFile>${basedir}/target/classes/META-INF/MANIFEST.MF</manifestFile>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<extensions>true</extensions>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>bundle-manifest</id>
|
||||
<phase>process-classes</phase>
|
||||
<goals>
|
||||
<goal>manifest</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<supportedProjectTypes>
|
||||
<supportedProjectType>war</supportedProjectType>
|
||||
</supportedProjectTypes>
|
||||
<instructions>
|
||||
<Webapp-Context>customer-portal</Webapp-Context>
|
||||
<Web-ContextPath>customer-portal</Web-ContextPath>
|
||||
<Embed-Directory>WEB-INF/lib</Embed-Directory>
|
||||
<Bundle-ClassPath>.,WEB-INF/classes</Bundle-ClassPath>
|
||||
<Bundle-Name>${project.name}</Bundle-Name>
|
||||
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
|
||||
<Import-Package>${keycloak.osgi.import}</Import-Package>
|
||||
<Private-Package>${keycloak.osgi.private}</Private-Package>
|
||||
<Export-Package>${keycloak.osgi.export}</Export-Package>
|
||||
</instructions>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
Loaded 100 of 315 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user