Compare commits
147
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ba266c98a | ||
|
|
c0059a875b | ||
|
|
541f23e1bb | ||
|
|
b768d593a2 | ||
|
|
f5fe5c8d73 | ||
|
|
2350baee14 | ||
|
|
38073d2aaa | ||
|
|
78be1280d3 | ||
|
|
952436f129 | ||
|
|
a3002cfee6 | ||
|
|
85ee8f2d43 | ||
|
|
e94f7ca741 | ||
|
|
7de0c8f78b | ||
|
|
f3adf02eea | ||
|
|
f240b60d4b | ||
|
|
cd8bee8e29 | ||
|
|
2195c35c70 | ||
|
|
090162ce8a | ||
|
|
82c3e4c1bc | ||
|
|
e963f7c905 | ||
|
|
2802ad4ad5 | ||
|
|
8eed641f79 | ||
|
|
bfab7361f4 | ||
|
|
4afcbc0610 | ||
|
|
e069f303a4 | ||
|
|
8e01f8ecf1 | ||
|
|
3e8495f435 | ||
|
|
c5d000cefc | ||
|
|
5c2e7df7de | ||
|
|
c1360270d0 | ||
|
|
a843e31c12 | ||
|
|
6b3e7c76bd | ||
|
|
fde8316693 | ||
|
|
7d4f28f52d | ||
|
|
8c451af3f5 | ||
|
|
e14c5adf55 | ||
|
|
cdd751a38b | ||
|
|
d7dfacabfa | ||
|
|
d0856e024f | ||
|
|
0e58378489 | ||
|
|
d53b01eb2b | ||
|
|
ba9c3c9142 | ||
|
|
2a78d0d4d0 | ||
|
|
34e18c176d | ||
|
|
a6f231abbf | ||
|
|
4bad1fea86 | ||
|
|
bc6e7c249b | ||
|
|
21eb40e2c2 | ||
|
|
f1378a6092 | ||
|
|
e0d884ac1a | ||
|
|
829f9f4386 | ||
|
|
f537661341 | ||
|
|
8abbcca76b | ||
|
|
e3e47a9246 | ||
|
|
96d430cd7e | ||
|
|
b53707a129 | ||
|
|
3a95401086 | ||
|
|
0143d71728 | ||
|
|
21279fc9ed | ||
|
|
0327bc0d5a | ||
|
|
ed1073ca92 | ||
|
|
ca946d4b19 | ||
|
|
7244e2f173 | ||
|
|
5be045c42b | ||
|
|
a991ccf909 | ||
|
|
b08930961f | ||
|
|
e01c634ed7 | ||
|
|
46983d68f3 | ||
|
|
4ebca3ca43 | ||
|
|
68bff44b2e | ||
|
|
aedbb8eb87 | ||
|
|
41c6aacce8 | ||
|
|
a65560c5e6 | ||
|
|
e2045907d4 | ||
|
|
f552057b06 | ||
|
|
81dc076bae | ||
|
|
67c0182a49 | ||
|
|
c85a31be7f | ||
|
|
ac2b8af172 | ||
|
|
8b515ae625 | ||
|
|
9a622a05b1 | ||
|
|
eccb295076 | ||
|
|
dd8c40b0d8 | ||
|
|
25740508b5 | ||
|
|
7f23c0dff8 | ||
|
|
5c6dd8e0c3 | ||
|
|
3b347d5f52 | ||
|
|
0636cd898f | ||
|
|
43cb52b319 | ||
|
|
24a2773524 | ||
|
|
7f29d4c247 | ||
|
|
279a70bcb8 | ||
|
|
2f0498bb7f | ||
|
|
64e777a4f4 | ||
|
|
3fd8cd66d6 | ||
|
|
d72bcebdf0 | ||
|
|
7e9dbce259 | ||
|
|
3b6f10913c | ||
|
|
3fbffc9d7d | ||
|
|
b4e0a1e6f5 | ||
|
|
63198288df | ||
|
|
07fd8ae9d7 | ||
|
|
a94ab5883d | ||
|
|
d1e819cef1 | ||
|
|
ebb795af5a | ||
|
|
b0a5161e6b | ||
|
|
3805510e20 | ||
|
|
31050e0580 | ||
|
|
2e9f1908f0 | ||
|
|
f12cd5fa09 | ||
|
|
b487d6c836 | ||
|
|
47ea0f5e23 | ||
|
|
d77f1f090f | ||
|
|
666851a44a | ||
|
|
cd25d7019b | ||
|
|
7c9e3f4555 | ||
|
|
c0f377c8c7 | ||
|
|
4a38b04e3e | ||
|
|
9343cf2aca | ||
|
|
3d70bae994 | ||
|
|
8895d0b91e | ||
|
|
cd0ad70952 | ||
|
|
5041d6ed80 | ||
|
|
e7625c2bb1 | ||
|
|
63712039e7 | ||
|
|
aa55a86ff6 | ||
|
|
e8e50d2d1c | ||
|
|
3f75ebf029 | ||
|
|
f9215e961d | ||
|
|
4776582a6a | ||
|
|
5091e07555 | ||
|
|
5943af79af | ||
|
|
875e9ba513 | ||
|
|
8c8f82d0fd | ||
|
|
00167ee76a | ||
|
|
9c175bfb5d | ||
|
|
ede59a4441 | ||
|
|
e91129db92 | ||
|
|
ebf04c01c6 | ||
|
|
797c2762c8 | ||
|
|
cfb6fb3d06 | ||
|
|
a147136db0 | ||
|
|
7327423a03 | ||
|
|
91529ef6fd | ||
|
|
431fa29ef1 | ||
|
|
1797f7e704 | ||
|
|
0f8c073354 |
No files matched your search
+2
-1
@@ -9,10 +9,11 @@
|
|||||||
.settings
|
.settings
|
||||||
.classpath
|
.classpath
|
||||||
|
|
||||||
|
|
||||||
# NetBeans #
|
# NetBeans #
|
||||||
############
|
############
|
||||||
|
nbactions.xml
|
||||||
nb-configuration.xml
|
nb-configuration.xml
|
||||||
|
catalog.xml
|
||||||
|
|
||||||
# Compiled source #
|
# Compiled source #
|
||||||
###################
|
###################
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Here's some of the features:
|
|||||||
* Social Broker. Enable Google, Facebook, Yahoo, Twitter social login with no code required.
|
* Social Broker. Enable Google, Facebook, Yahoo, Twitter social login with no code required.
|
||||||
* Optional LDAP/Active Directory integration
|
* Optional LDAP/Active Directory integration
|
||||||
* Optional User Registration
|
* Optional User Registration
|
||||||
* Password and TOTP support (via Google Authenticator). Client cert auth coming soon.
|
* Password and TOTP support (via Google Authenticator or FreeOTP). Client cert auth coming soon.
|
||||||
* User session management from both admin and user perspective
|
* User session management from both admin and user perspective
|
||||||
* Customizable themes for user facing pages: login, grant pages, account management, emails, and admin console all customizable!
|
* Customizable themes for user facing pages: login, grant pages, account management, emails, and admin console all customizable!
|
||||||
* OAuth Bearer token auth for REST Services
|
* OAuth Bearer token auth for REST Services
|
||||||
@@ -24,7 +24,7 @@ Here's some of the features:
|
|||||||
* Completely centrally managed user and role mapping metadata. Minimal configuration at the application side
|
* Completely centrally managed user and role mapping metadata. Minimal configuration at the application side
|
||||||
* Admin Console for managing users, roles, role mappings, applications, user sessions, allowed CORS web origins, and OAuth clients.
|
* Admin Console for managing users, roles, role mappings, applications, user sessions, allowed CORS web origins, and OAuth clients.
|
||||||
* Deployable as a WAR, appliance, or an Openshift cloud service (SaaS).
|
* Deployable as a WAR, appliance, or an Openshift cloud service (SaaS).
|
||||||
* Supports JBoss AS7, EAP 6.x, and Wildfly applications. Plans to support Node.js, RAILS, GRAILS, and other non-Java applications.
|
* Supports JBoss AS7, EAP 6.x, Wildfly, Tomcat, and Jetty applications. Plans to support Node.js, RAILS, GRAILS, and other non-Java applications.
|
||||||
* Javascript/HTML 5 adapter for pure Javascript apps
|
* Javascript/HTML 5 adapter for pure Javascript apps
|
||||||
* Session management from admin console
|
* Session management from admin console
|
||||||
* Revocation policies
|
* Revocation policies
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
</parent>
|
</parent>
|
||||||
<name>Connections Parent</name>
|
<name>Connections Parent</name>
|
||||||
<description/>
|
<description/>
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package org.keycloak.adapters;
|
package org.keycloak.constants;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package org.keycloak.constants;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
|
||||||
|
*/
|
||||||
|
public class GenericConstants {
|
||||||
|
|
||||||
|
public static final String PROTOCOL_CLASSPATH = "classpath:";
|
||||||
|
|
||||||
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package org.keycloak;
|
package org.keycloak.constants;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
||||||
@@ -58,81 +58,148 @@ public class JWSBuilder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String encode(Algorithm alg, byte[] data, byte[] signature) {
|
protected String encodeAll(StringBuffer encoding, byte[] signature) {
|
||||||
StringBuffer encoding = new StringBuffer();
|
|
||||||
encoding.append(encodeHeader(alg));
|
|
||||||
encoding.append('.');
|
encoding.append('.');
|
||||||
encoding.append(Base64Url.encode(data));
|
if (signature != null) {
|
||||||
encoding.append('.');
|
|
||||||
if (alg != Algorithm.none) {
|
|
||||||
encoding.append(Base64Url.encode(signature));
|
encoding.append(Base64Url.encode(signature));
|
||||||
}
|
}
|
||||||
return encoding.toString();
|
return encoding.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void encode(Algorithm alg, byte[] data, StringBuffer encoding) {
|
||||||
|
encoding.append(encodeHeader(alg));
|
||||||
|
encoding.append('.');
|
||||||
|
encoding.append(Base64Url.encode(data));
|
||||||
|
}
|
||||||
|
|
||||||
protected byte[] marshalContent() {
|
protected byte[] marshalContent() {
|
||||||
return contentBytes;
|
return contentBytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EncodingBuilder {
|
public class EncodingBuilder {
|
||||||
public String none() {
|
public String none() {
|
||||||
|
StringBuffer buffer = new StringBuffer();
|
||||||
byte[] data = marshalContent();
|
byte[] data = marshalContent();
|
||||||
return encode(Algorithm.none, data, null);
|
encode(Algorithm.none, data, buffer);
|
||||||
|
return encodeAll(buffer, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String rsa256(PrivateKey privateKey) {
|
public String rsa256(PrivateKey privateKey) {
|
||||||
|
StringBuffer buffer = new StringBuffer();
|
||||||
byte[] data = marshalContent();
|
byte[] data = marshalContent();
|
||||||
byte[] signature = RSAProvider.sign(data, Algorithm.RS256, privateKey);
|
encode(Algorithm.RS256, data, buffer);
|
||||||
return encode(Algorithm.RS256, data, signature);
|
byte[] signature = null;
|
||||||
|
try {
|
||||||
|
signature = RSAProvider.sign(buffer.toString().getBytes("UTF-8"), Algorithm.RS256, privateKey);
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
return encodeAll(buffer, signature);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String rsa384(PrivateKey privateKey) {
|
public String rsa384(PrivateKey privateKey) {
|
||||||
|
StringBuffer buffer = new StringBuffer();
|
||||||
byte[] data = marshalContent();
|
byte[] data = marshalContent();
|
||||||
byte[] signature = RSAProvider.sign(data, Algorithm.RS384, privateKey);
|
encode(Algorithm.RS384, data, buffer);
|
||||||
return encode(Algorithm.RS384, data, signature);
|
byte[] signature = null;
|
||||||
|
try {
|
||||||
|
signature = RSAProvider.sign(buffer.toString().getBytes("UTF-8"), Algorithm.RS384, privateKey);
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
return encodeAll(buffer, signature);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String rsa512(PrivateKey privateKey) {
|
public String rsa512(PrivateKey privateKey) {
|
||||||
|
StringBuffer buffer = new StringBuffer();
|
||||||
byte[] data = marshalContent();
|
byte[] data = marshalContent();
|
||||||
byte[] signature = RSAProvider.sign(data, Algorithm.RS512, privateKey);
|
encode(Algorithm.RS512, data, buffer);
|
||||||
return encode(Algorithm.RS512, data, signature);
|
byte[] signature = null;
|
||||||
|
try {
|
||||||
|
signature = RSAProvider.sign(buffer.toString().getBytes("UTF-8"), Algorithm.RS512, privateKey);
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
return encodeAll(buffer, signature);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String hmac256(byte[] sharedSecret) {
|
public String hmac256(byte[] sharedSecret) {
|
||||||
|
StringBuffer buffer = new StringBuffer();
|
||||||
byte[] data = marshalContent();
|
byte[] data = marshalContent();
|
||||||
byte[] signature = HMACProvider.sign(data, Algorithm.HS256, sharedSecret);
|
encode(Algorithm.HS256, data, buffer);
|
||||||
return encode(Algorithm.HS256, data, signature);
|
byte[] signature = null;
|
||||||
|
try {
|
||||||
|
signature = HMACProvider.sign(buffer.toString().getBytes("UTF-8"), Algorithm.HS256, sharedSecret);
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
return encodeAll(buffer, signature);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String hmac384(byte[] sharedSecret) {
|
public String hmac384(byte[] sharedSecret) {
|
||||||
|
StringBuffer buffer = new StringBuffer();
|
||||||
byte[] data = marshalContent();
|
byte[] data = marshalContent();
|
||||||
byte[] signature = HMACProvider.sign(data, Algorithm.HS384, sharedSecret);
|
encode(Algorithm.HS384, data, buffer);
|
||||||
return encode(Algorithm.HS384, data, signature);
|
byte[] signature = null;
|
||||||
|
try {
|
||||||
|
signature = HMACProvider.sign(buffer.toString().getBytes("UTF-8"), Algorithm.HS384, sharedSecret);
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
return encodeAll(buffer, signature);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String hmac512(byte[] sharedSecret) {
|
public String hmac512(byte[] sharedSecret) {
|
||||||
|
StringBuffer buffer = new StringBuffer();
|
||||||
byte[] data = marshalContent();
|
byte[] data = marshalContent();
|
||||||
byte[] signature = HMACProvider.sign(data, Algorithm.HS512, sharedSecret);
|
encode(Algorithm.HS512, data, buffer);
|
||||||
return encode(Algorithm.HS512, data, signature);
|
byte[] signature = null;
|
||||||
|
try {
|
||||||
|
signature = HMACProvider.sign(buffer.toString().getBytes("UTF-8"), Algorithm.HS512, sharedSecret);
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
return encodeAll(buffer, signature);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String hmac256(SecretKey sharedSecret) {
|
public String hmac256(SecretKey sharedSecret) {
|
||||||
|
StringBuffer buffer = new StringBuffer();
|
||||||
byte[] data = marshalContent();
|
byte[] data = marshalContent();
|
||||||
byte[] signature = HMACProvider.sign(data, Algorithm.HS256, sharedSecret);
|
encode(Algorithm.HS256, data, buffer);
|
||||||
return encode(Algorithm.HS256, data, signature);
|
byte[] signature = null;
|
||||||
|
try {
|
||||||
|
signature = HMACProvider.sign(buffer.toString().getBytes("UTF-8"), Algorithm.HS256, sharedSecret);
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
return encodeAll(buffer, signature);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String hmac384(SecretKey sharedSecret) {
|
public String hmac384(SecretKey sharedSecret) {
|
||||||
|
StringBuffer buffer = new StringBuffer();
|
||||||
byte[] data = marshalContent();
|
byte[] data = marshalContent();
|
||||||
byte[] signature = HMACProvider.sign(data, Algorithm.HS384, sharedSecret);
|
encode(Algorithm.HS384, data, buffer);
|
||||||
return encode(Algorithm.HS384, data, signature);
|
byte[] signature = null;
|
||||||
|
try {
|
||||||
|
signature = HMACProvider.sign(buffer.toString().getBytes("UTF-8"), Algorithm.HS384, sharedSecret);
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
return encodeAll(buffer, signature);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String hmac512(SecretKey sharedSecret) {
|
public String hmac512(SecretKey sharedSecret) {
|
||||||
|
StringBuffer buffer = new StringBuffer();
|
||||||
byte[] data = marshalContent();
|
byte[] data = marshalContent();
|
||||||
byte[] signature = HMACProvider.sign(data, Algorithm.HS512, sharedSecret);
|
encode(Algorithm.HS512, data, buffer);
|
||||||
return encode(Algorithm.HS512, data, signature);
|
byte[] signature = null;
|
||||||
|
try {
|
||||||
|
signature = HMACProvider.sign(buffer.toString().getBytes("UTF-8"), Algorithm.HS512, sharedSecret);
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
return encodeAll(buffer, signature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,6 +15,7 @@ public class JWSInput {
|
|||||||
String encodedHeader;
|
String encodedHeader;
|
||||||
String encodedContent;
|
String encodedContent;
|
||||||
String encodedSignature;
|
String encodedSignature;
|
||||||
|
String encodedSignatureInput;
|
||||||
JWSHeader header;
|
JWSHeader header;
|
||||||
byte[] content;
|
byte[] content;
|
||||||
byte[] signature;
|
byte[] signature;
|
||||||
@@ -26,6 +27,7 @@ public class JWSInput {
|
|||||||
if (parts.length < 2 || parts.length > 3) throw new IllegalArgumentException("Parsing error");
|
if (parts.length < 2 || parts.length > 3) throw new IllegalArgumentException("Parsing error");
|
||||||
encodedHeader = parts[0];
|
encodedHeader = parts[0];
|
||||||
encodedContent = parts[1];
|
encodedContent = parts[1];
|
||||||
|
encodedSignatureInput = encodedHeader + '.' + encodedContent;
|
||||||
try {
|
try {
|
||||||
content = Base64Url.decode(encodedContent);
|
content = Base64Url.decode(encodedContent);
|
||||||
if (parts.length > 2) {
|
if (parts.length > 2) {
|
||||||
@@ -55,6 +57,9 @@ public class JWSInput {
|
|||||||
public String getEncodedSignature() {
|
public String getEncodedSignature() {
|
||||||
return encodedSignature;
|
return encodedSignature;
|
||||||
}
|
}
|
||||||
|
public String getEncodedSignatureInput() {
|
||||||
|
return encodedSignatureInput;
|
||||||
|
}
|
||||||
|
|
||||||
public JWSHeader getHeader() {
|
public JWSHeader getHeader() {
|
||||||
return header;
|
return header;
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ public class HMACProvider {
|
|||||||
|
|
||||||
public static boolean verify(JWSInput input, byte[] sharedSecret) {
|
public static boolean verify(JWSInput input, byte[] sharedSecret) {
|
||||||
try {
|
try {
|
||||||
byte[] signature = sign(input.getContent(), input.getHeader().getAlgorithm(), sharedSecret);
|
byte[] signature = sign(input.getEncodedSignatureInput().getBytes("UTF-8"), input.getHeader().getAlgorithm(), sharedSecret);
|
||||||
String x = Base64Url.encode(signature);
|
String x = Base64Url.encode(signature);
|
||||||
return x.equals(input.getEncodedSignature());
|
return x.equals(input.getEncodedSignature());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public class RSAProvider {
|
|||||||
try {
|
try {
|
||||||
Signature verifier = getSignature(input.getHeader().getAlgorithm());
|
Signature verifier = getSignature(input.getHeader().getAlgorithm());
|
||||||
verifier.initVerify(publicKey);
|
verifier.initVerify(publicKey);
|
||||||
verifier.update(input.getContent());
|
verifier.update(input.getEncodedSignatureInput().getBytes("UTF-8"));
|
||||||
return verifier.verify(input.getSignature());
|
return verifier.verify(input.getSignature());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|||||||
+15
-5
@@ -16,7 +16,7 @@ import java.util.Map;
|
|||||||
"resource", "public-client", "credentials",
|
"resource", "public-client", "credentials",
|
||||||
"use-resource-role-mappings",
|
"use-resource-role-mappings",
|
||||||
"enable-cors", "cors-max-age", "cors-allowed-methods",
|
"enable-cors", "cors-max-age", "cors-allowed-methods",
|
||||||
"expose-token", "bearer-only"})
|
"expose-token", "bearer-only", "enable-basic-auth"})
|
||||||
public class BaseAdapterConfig extends BaseRealmConfig {
|
public class BaseAdapterConfig extends BaseRealmConfig {
|
||||||
@JsonProperty("resource")
|
@JsonProperty("resource")
|
||||||
protected String resource;
|
protected String resource;
|
||||||
@@ -34,6 +34,8 @@ public class BaseAdapterConfig extends BaseRealmConfig {
|
|||||||
protected boolean exposeToken;
|
protected boolean exposeToken;
|
||||||
@JsonProperty("bearer-only")
|
@JsonProperty("bearer-only")
|
||||||
protected boolean bearerOnly;
|
protected boolean bearerOnly;
|
||||||
|
@JsonProperty("enable-basic-auth")
|
||||||
|
protected boolean enableBasicAuth;
|
||||||
@JsonProperty("public-client")
|
@JsonProperty("public-client")
|
||||||
protected boolean publicClient;
|
protected boolean publicClient;
|
||||||
@JsonProperty("credentials")
|
@JsonProperty("credentials")
|
||||||
@@ -97,12 +99,20 @@ public class BaseAdapterConfig extends BaseRealmConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isBearerOnly() {
|
public boolean isBearerOnly() {
|
||||||
return bearerOnly;
|
return bearerOnly;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBearerOnly(boolean bearerOnly) {
|
public void setBearerOnly(boolean bearerOnly) {
|
||||||
this.bearerOnly = bearerOnly;
|
this.bearerOnly = bearerOnly;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isEnableBasicAuth() {
|
||||||
|
return enableBasicAuth;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnableBasicAuth(boolean enableBasicAuth) {
|
||||||
|
this.enableBasicAuth = enableBasicAuth;
|
||||||
|
}
|
||||||
|
|
||||||
public Map<String, String> getCredentials() {
|
public Map<String, String> getCredentials() {
|
||||||
return credentials;
|
return credentials;
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ import java.util.Date;
|
|||||||
* @version $Revision: 1 $
|
* @version $Revision: 1 $
|
||||||
*/
|
*/
|
||||||
public class CertificateUtils {
|
public class CertificateUtils {
|
||||||
|
static {
|
||||||
|
BouncyIntegration.init();
|
||||||
|
}
|
||||||
public static X509Certificate generateV3Certificate(KeyPair keyPair, PrivateKey caPrivateKey, X509Certificate caCert, String subject) throws Exception {
|
public static X509Certificate generateV3Certificate(KeyPair keyPair, PrivateKey caPrivateKey, X509Certificate caCert, String subject) throws Exception {
|
||||||
|
|
||||||
X509V3CertificateGenerator certGen = new X509V3CertificateGenerator();
|
X509V3CertificateGenerator certGen = new X509V3CertificateGenerator();
|
||||||
|
|||||||
@@ -2,21 +2,24 @@ package org.keycloak.util;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
|
import java.io.InputStream;
|
||||||
import java.security.KeyStore;
|
import java.security.KeyStore;
|
||||||
|
|
||||||
|
import org.keycloak.constants.GenericConstants;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
||||||
* @version $Revision: 1 $
|
* @version $Revision: 1 $
|
||||||
*/
|
*/
|
||||||
public class KeystoreUtil {
|
public class KeystoreUtil {
|
||||||
|
|
||||||
public static KeyStore loadKeyStore(String filename, String password) throws Exception {
|
public static KeyStore loadKeyStore(String filename, String password) throws Exception {
|
||||||
KeyStore trustStore = KeyStore.getInstance(KeyStore
|
KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
|
||||||
.getDefaultType());
|
InputStream trustStream = (filename.startsWith(GenericConstants.PROTOCOL_CLASSPATH))
|
||||||
File truststoreFile = new File(filename);
|
?KeystoreUtil.class.getResourceAsStream(filename.replace(GenericConstants.PROTOCOL_CLASSPATH, ""))
|
||||||
FileInputStream trustStream = new FileInputStream(truststoreFile);
|
:new FileInputStream(new File(filename));
|
||||||
trustStore.load(trustStream, password.toCharArray());
|
trustStore.load(trustStream, password.toCharArray());
|
||||||
trustStream.close();
|
trustStream.close();
|
||||||
return trustStore;
|
return trustStore;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package org.keycloak.services.util;
|
package org.keycloak.util;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
Vendored
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
Vendored
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
Vendored
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
@@ -22,6 +22,8 @@
|
|||||||
<exclude>**/*.sh</exclude>
|
<exclude>**/*.sh</exclude>
|
||||||
<exclude>welcome-content/*</exclude>
|
<exclude>welcome-content/*</exclude>
|
||||||
<exclude>**/modules/system/layers/base/org/picketlink/**</exclude>
|
<exclude>**/modules/system/layers/base/org/picketlink/**</exclude>
|
||||||
|
<exclude>**/modules/system/layers/base/org/jboss/as/cli/**</exclude>
|
||||||
|
<exclude>**/modules/system/layers/base/org/jboss/aesh/**</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
@@ -39,13 +41,6 @@
|
|||||||
<include>org/picketlink/**</include>
|
<include>org/picketlink/**</include>
|
||||||
</includes>
|
</includes>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
<fileSet>
|
|
||||||
<directory>${project.build.directory}/unpacked/deployments</directory>
|
|
||||||
<outputDirectory>keycloak/standalone/deployments</outputDirectory>
|
|
||||||
<excludes>
|
|
||||||
<exclude>keycloak-ds.xml</exclude>
|
|
||||||
</excludes>
|
|
||||||
</fileSet>
|
|
||||||
<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>
|
<outputDirectory>keycloak/standalone/configuration</outputDirectory>
|
||||||
@@ -61,14 +56,6 @@
|
|||||||
<directory>${project.build.directory}/unpacked/adapter</directory>
|
<directory>${project.build.directory}/unpacked/adapter</directory>
|
||||||
<outputDirectory>keycloak</outputDirectory>
|
<outputDirectory>keycloak</outputDirectory>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
<fileSet>
|
|
||||||
<directory>${project.build.directory}/unpacked/js-adapter</directory>
|
|
||||||
<outputDirectory>adapters/js-adapter</outputDirectory>
|
|
||||||
<includes>
|
|
||||||
<include>**/*.js</include>
|
|
||||||
<include>**/*.html</include>
|
|
||||||
</includes>
|
|
||||||
</fileSet>
|
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>src/main/welcome-content</directory>
|
<directory>src/main/welcome-content</directory>
|
||||||
<outputDirectory>keycloak/welcome-content</outputDirectory>
|
<outputDirectory>keycloak/welcome-content</outputDirectory>
|
||||||
@@ -77,6 +64,7 @@
|
|||||||
</includes>
|
</includes>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
</fileSets>
|
</fileSets>
|
||||||
|
<!--
|
||||||
<dependencySets>
|
<dependencySets>
|
||||||
<dependencySet>
|
<dependencySet>
|
||||||
<unpack>false</unpack>
|
<unpack>false</unpack>
|
||||||
@@ -85,25 +73,15 @@
|
|||||||
<include>org.keycloak:keycloak-wildfly-adapter-dist:zip</include>
|
<include>org.keycloak:keycloak-wildfly-adapter-dist:zip</include>
|
||||||
<include>org.keycloak:keycloak-as7-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-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-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>
|
</includes>
|
||||||
<outputDirectory>adapters</outputDirectory>
|
<outputDirectory>adapters</outputDirectory>
|
||||||
</dependencySet>
|
</dependencySet>
|
||||||
</dependencySets>
|
</dependencySets>
|
||||||
<!--
|
|
||||||
<moduleSets>
|
|
||||||
<moduleSet>
|
|
||||||
<useAllReactorProjects>true</useAllReactorProjects>
|
|
||||||
<includes>
|
|
||||||
<include>org.keycloak:keycloak-wildfly-adapter-dist</include>
|
|
||||||
</includes>
|
|
||||||
<binaries>
|
|
||||||
<outputDirectory>adapters</outputDirectory>
|
|
||||||
<attachmentClassifier>zip</attachmentClassifier>
|
|
||||||
<includeDependencies>false</includeDependencies>
|
|
||||||
<unpack>false</unpack>
|
|
||||||
</binaries>
|
|
||||||
</moduleSet>
|
|
||||||
</moduleSets>
|
|
||||||
-->
|
-->
|
||||||
</assembly>
|
</assembly>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -26,12 +26,42 @@
|
|||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<type>zip</type>
|
<type>zip</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-tomcat6-adapter-dist</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-tomcat7-adapter-dist</artifactId>
|
<artifactId>keycloak-tomcat7-adapter-dist</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<type>zip</type>
|
<type>zip</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-tomcat8-adapter-dist</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-jetty81-adapter-dist</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-jetty91-adapter-dist</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-jetty92-adapter-dist</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-eap6-adapter-dist</artifactId>
|
<artifactId>keycloak-eap6-adapter-dist</artifactId>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<xsl:template match="node()[name(.)='extensions']">
|
<xsl:template match="node()[name(.)='extensions']">
|
||||||
<xsl:copy>
|
<xsl:copy>
|
||||||
<xsl:apply-templates select="node()|@*"/>
|
<xsl:apply-templates select="node()|@*"/>
|
||||||
<extension module="org.keycloak.keycloak-wildfly-subsystem"/>
|
<extension module="org.keycloak.keycloak-subsystem"/>
|
||||||
</xsl:copy>
|
</xsl:copy>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
@@ -34,7 +34,12 @@
|
|||||||
<xsl:template match="node()[name(.)='profile']">
|
<xsl:template match="node()[name(.)='profile']">
|
||||||
<xsl:copy>
|
<xsl:copy>
|
||||||
<xsl:apply-templates select="node()|@*"/>
|
<xsl:apply-templates select="node()|@*"/>
|
||||||
<subsystem xmlns="urn:jboss:domain:keycloak:1.0"/>
|
<subsystem xmlns="urn:jboss:domain:keycloak:1.0">
|
||||||
|
<auth-server name="main-auth-server">
|
||||||
|
<enabled>true</enabled>
|
||||||
|
<web-context>auth</web-context>
|
||||||
|
</auth-server>
|
||||||
|
</subsystem>
|
||||||
</xsl:copy>
|
</xsl:copy>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
@@ -56,7 +61,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- for some reason, Wildfly 8 final decided to turn off management-native which means jboss-as-maven-plugin no
|
<!-- for some reason, Wildfly 8 final decided to turn off management-native which means jboss-as-maven-plugin no
|
||||||
longer works -->
|
longer works -->
|
||||||
<xsl:template match="node()[name(.)='management-interfaces']">
|
<xsl:template match="node()[name(.)='management-interfaces']">
|
||||||
<xsl:copy>
|
<xsl:copy>
|
||||||
<xsl:apply-templates select="node()|@*"/>
|
<xsl:apply-templates select="node()|@*"/>
|
||||||
@@ -67,14 +72,14 @@
|
|||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!-- for some reason, Wildfly 8 final decided to turn off management-native which means jboss-as-maven-plugin no
|
<!-- for some reason, Wildfly 8 final decided to turn off management-native which means jboss-as-maven-plugin no
|
||||||
longer works -->
|
longer works -->
|
||||||
<xsl:template match="node()[name(.)='socket-binding-group']">
|
<xsl:template match="node()[name(.)='socket-binding-group']">
|
||||||
<xsl:copy>
|
<xsl:copy>
|
||||||
<xsl:apply-templates select="node()|@*"/>
|
<xsl:apply-templates select="node()|@*"/>
|
||||||
<socket-binding name="management-native" interface="management" port="9999"/>
|
<socket-binding name="management-native" interface="management" port="9999"/>
|
||||||
</xsl:copy>
|
</xsl:copy>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="@*|node()">
|
<xsl:template match="@*|node()">
|
||||||
<xsl:copy>
|
<xsl:copy>
|
||||||
<xsl:apply-templates select="@*|node()" />
|
<xsl:apply-templates select="@*|node()" />
|
||||||
|
|||||||
@@ -12,8 +12,9 @@
|
|||||||
<excludes>
|
<excludes>
|
||||||
<exclude>org/picketlink/**</exclude>
|
<exclude>org/picketlink/**</exclude>
|
||||||
<exclude>org/keycloak/keycloak-undertow-adapter/**</exclude>
|
<exclude>org/keycloak/keycloak-undertow-adapter/**</exclude>
|
||||||
<exclude>org/keycloak/keycloak-wildfly-subsystem/**</exclude>
|
|
||||||
<exclude>org/keycloak/keycloak-wildfly-adapter/**</exclude>
|
<exclude>org/keycloak/keycloak-wildfly-adapter/**</exclude>
|
||||||
|
<exclude>org/jboss/**</exclude>
|
||||||
|
<exclude>org/keycloak/keycloak-subsystem/**</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
<outputDirectory>modules</outputDirectory>
|
<outputDirectory>modules</outputDirectory>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,9 @@
|
|||||||
<excludes>
|
<excludes>
|
||||||
<exclude>org/picketlink/**</exclude>
|
<exclude>org/picketlink/**</exclude>
|
||||||
<exclude>org/keycloak/keycloak-undertow-adapter/**</exclude>
|
<exclude>org/keycloak/keycloak-undertow-adapter/**</exclude>
|
||||||
<exclude>org/keycloak/keycloak-wildfly-subsystem/**</exclude>
|
|
||||||
<exclude>org/keycloak/keycloak-wildfly-adapter/**</exclude>
|
<exclude>org/keycloak/keycloak-wildfly-adapter/**</exclude>
|
||||||
|
<exclude>org/keycloak/keycloak-as7-subsystem/**</exclude>
|
||||||
|
<exclude>org/jboss/**</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
<outputDirectory>modules/system/layers/base</outputDirectory>
|
<outputDirectory>modules/system/layers/base</outputDirectory>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,14 @@
|
|||||||
<exclude name="**/subsystem-config.xml"/>
|
<exclude name="**/subsystem-config.xml"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
|
<copy todir="target/examples/basic-auth" overwrite="true">
|
||||||
|
<fileset dir="../../examples/basic-auth">
|
||||||
|
<exclude name="**/target/**"/>
|
||||||
|
<exclude name="**/*.iml"/>
|
||||||
|
<exclude name="**/*.unconfigured"/>
|
||||||
|
<exclude name="**/subsystem-config.xml"/>
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
<copy todir="target/examples/admin-client" overwrite="true">
|
<copy todir="target/examples/admin-client" overwrite="true">
|
||||||
<fileset dir="../../examples/admin-client">
|
<fileset dir="../../examples/admin-client">
|
||||||
<exclude name="**/target/**"/>
|
<exclude name="**/target/**"/>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
<assembly>
|
||||||
|
<id>war-dist</id>
|
||||||
|
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
|
||||||
|
<dependencySets>
|
||||||
|
<dependencySet>
|
||||||
|
<unpack>false</unpack>
|
||||||
|
<useTransitiveDependencies>true</useTransitiveDependencies>
|
||||||
|
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||||
|
<includes>
|
||||||
|
<include>org.keycloak:keycloak-jetty81-adapter</include>
|
||||||
|
</includes>
|
||||||
|
<excludes>
|
||||||
|
<exclude>org.eclipse.jetty:jetty-server</exclude>
|
||||||
|
<exclude>org.eclipse.jetty:jetty-util</exclude>
|
||||||
|
<exclude>org.eclipse.jetty:jetty-security</exclude>
|
||||||
|
</excludes>
|
||||||
|
<outputDirectory>lib/keycloak</outputDirectory>
|
||||||
|
</dependencySet>
|
||||||
|
</dependencySets>
|
||||||
|
</assembly>
|
||||||
Executable
+53
@@ -0,0 +1,53 @@
|
|||||||
|
<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">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<artifactId>keycloak-parent</artifactId>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<version>1.1.0.Beta2</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>keycloak-jetty81-adapter-dist</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<name>Keycloak Jetty 8.1.x Adapter Distro</name>
|
||||||
|
<description/>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-jetty81-adapter</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>assemble</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>assembly.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
<outputDirectory>
|
||||||
|
target
|
||||||
|
</outputDirectory>
|
||||||
|
<workDirectory>
|
||||||
|
target/assembly/work
|
||||||
|
</workDirectory>
|
||||||
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
+38
@@ -0,0 +1,38 @@
|
|||||||
|
<assembly>
|
||||||
|
<id>war-dist</id>
|
||||||
|
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<directory></directory>
|
||||||
|
<includes>
|
||||||
|
<include>keycloak.mod</include>
|
||||||
|
</includes>
|
||||||
|
<outputDirectory>modules</outputDirectory>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.build.directory}/modules</directory>
|
||||||
|
<outputDirectory></outputDirectory>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
<dependencySets>
|
||||||
|
<dependencySet>
|
||||||
|
<unpack>false</unpack>
|
||||||
|
<useTransitiveDependencies>true</useTransitiveDependencies>
|
||||||
|
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||||
|
<includes>
|
||||||
|
<include>org.keycloak:keycloak-jetty91-adapter</include>
|
||||||
|
</includes>
|
||||||
|
<excludes>
|
||||||
|
<exclude>org.eclipse.jetty:jetty-server</exclude>
|
||||||
|
<exclude>org.eclipse.jetty:jetty-util</exclude>
|
||||||
|
<exclude>org.eclipse.jetty:jetty-security</exclude>
|
||||||
|
</excludes>
|
||||||
|
<outputDirectory>lib/keycloak</outputDirectory>
|
||||||
|
</dependencySet>
|
||||||
|
</dependencySets>
|
||||||
|
</assembly>
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
#
|
||||||
|
# Keycloak Jetty Adapter
|
||||||
|
#
|
||||||
|
|
||||||
|
[depend]
|
||||||
|
server
|
||||||
|
security
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
lib/keycloak/*.jar
|
||||||
|
|
||||||
Executable
+53
@@ -0,0 +1,53 @@
|
|||||||
|
<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">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<artifactId>keycloak-parent</artifactId>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<version>1.1.0.Beta2</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>keycloak-jetty91-adapter-dist</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<name>Keycloak Jetty 9.1.x Adapter Distro</name>
|
||||||
|
<description/>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-jetty91-adapter</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>assemble</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>assembly.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
<outputDirectory>
|
||||||
|
target
|
||||||
|
</outputDirectory>
|
||||||
|
<workDirectory>
|
||||||
|
target/assembly/work
|
||||||
|
</workDirectory>
|
||||||
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
+38
@@ -0,0 +1,38 @@
|
|||||||
|
<assembly>
|
||||||
|
<id>war-dist</id>
|
||||||
|
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<directory></directory>
|
||||||
|
<includes>
|
||||||
|
<include>keycloak.mod</include>
|
||||||
|
</includes>
|
||||||
|
<outputDirectory>modules</outputDirectory>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.build.directory}/modules</directory>
|
||||||
|
<outputDirectory></outputDirectory>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
<dependencySets>
|
||||||
|
<dependencySet>
|
||||||
|
<unpack>false</unpack>
|
||||||
|
<useTransitiveDependencies>true</useTransitiveDependencies>
|
||||||
|
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||||
|
<includes>
|
||||||
|
<include>org.keycloak:keycloak-jetty92-adapter</include>
|
||||||
|
</includes>
|
||||||
|
<excludes>
|
||||||
|
<exclude>org.eclipse.jetty:jetty-server</exclude>
|
||||||
|
<exclude>org.eclipse.jetty:jetty-util</exclude>
|
||||||
|
<exclude>org.eclipse.jetty:jetty-security</exclude>
|
||||||
|
</excludes>
|
||||||
|
<outputDirectory>lib/keycloak</outputDirectory>
|
||||||
|
</dependencySet>
|
||||||
|
</dependencySets>
|
||||||
|
</assembly>
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
#
|
||||||
|
# Keycloak Jetty Adapter
|
||||||
|
#
|
||||||
|
|
||||||
|
[depend]
|
||||||
|
server
|
||||||
|
security
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
lib/keycloak/*.jar
|
||||||
|
|
||||||
Executable
+53
@@ -0,0 +1,53 @@
|
|||||||
|
<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">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<artifactId>keycloak-parent</artifactId>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<version>1.1.0.Beta2</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>keycloak-jetty92-adapter-dist</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<name>Keycloak Jetty 9.2.x Adapter Distro</name>
|
||||||
|
<description/>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-jetty92-adapter</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>assemble</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>assembly.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
<outputDirectory>
|
||||||
|
target
|
||||||
|
</outputDirectory>
|
||||||
|
<workDirectory>
|
||||||
|
target/assembly/work
|
||||||
|
</workDirectory>
|
||||||
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
Executable
+19
@@ -0,0 +1,19 @@
|
|||||||
|
<assembly>
|
||||||
|
<id>war-dist</id>
|
||||||
|
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<includeBaseDirectory>true</includeBaseDirectory>
|
||||||
|
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${project.build.directory}/unpacked/js-adapter</directory>
|
||||||
|
<outputDirectory></outputDirectory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*.js</include>
|
||||||
|
<include>**/*.html</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
</assembly>
|
||||||
Executable
+74
@@ -0,0 +1,74 @@
|
|||||||
|
<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">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<artifactId>keycloak-parent</artifactId>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<version>1.1.0.Beta2</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>keycloak-js-adapter-dist</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<name>Keycloak JS Adapter Distribution</name>
|
||||||
|
<description/>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<!--<version>2.7</version> -->
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>unpack</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>unpack</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<artifactItems>
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-js-adapter</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<outputDirectory>${project.build.directory}/unpacked/js-adapter</outputDirectory>
|
||||||
|
<includes>*.js</includes>
|
||||||
|
</artifactItem>
|
||||||
|
</artifactItems>
|
||||||
|
<excludes>**/welcome-content/*</excludes>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>assemble</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>assembly.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
<outputDirectory>
|
||||||
|
target
|
||||||
|
</outputDirectory>
|
||||||
|
<workDirectory>
|
||||||
|
target/assembly/work
|
||||||
|
</workDirectory>
|
||||||
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -51,6 +51,14 @@
|
|||||||
<maven-resource group="org.bouncycastle" artifact="bcprov-jdk16"/>
|
<maven-resource group="org.bouncycastle" artifact="bcprov-jdk16"/>
|
||||||
</module-def>
|
</module-def>
|
||||||
|
|
||||||
|
<module-def name="org.jboss.aesh">
|
||||||
|
<maven-resource group="org.jboss.aesh" artifact="aesh"/>
|
||||||
|
</module-def>
|
||||||
|
|
||||||
|
<module-def name="org.jboss.as.cli">
|
||||||
|
<maven-resource group="org.wildfly.core" artifact="wildfly-cli"/>
|
||||||
|
</module-def>
|
||||||
|
|
||||||
<module-def name="org.keycloak.keycloak-core">
|
<module-def name="org.keycloak.keycloak-core">
|
||||||
<maven-resource group="org.keycloak" artifact="keycloak-core"/>
|
<maven-resource group="org.keycloak" artifact="keycloak-core"/>
|
||||||
</module-def>
|
</module-def>
|
||||||
@@ -75,8 +83,8 @@
|
|||||||
<maven-resource group="org.keycloak" artifact="keycloak-wildfly-adapter"/>
|
<maven-resource group="org.keycloak" artifact="keycloak-wildfly-adapter"/>
|
||||||
</module-def>
|
</module-def>
|
||||||
|
|
||||||
<module-def name="org.keycloak.keycloak-wildfly-subsystem">
|
<module-def name="org.keycloak.keycloak-subsystem">
|
||||||
<maven-resource group="org.keycloak" artifact="keycloak-wildfly-subsystem"/>
|
<maven-resource group="org.keycloak" artifact="keycloak-subsystem"/>
|
||||||
</module-def>
|
</module-def>
|
||||||
<module-def name="org.keycloak.keycloak-as7-subsystem">
|
<module-def name="org.keycloak.keycloak-as7-subsystem">
|
||||||
<maven-resource group="org.keycloak" artifact="keycloak-as7-subsystem"/>
|
<maven-resource group="org.keycloak" artifact="keycloak-as7-subsystem"/>
|
||||||
@@ -99,7 +107,7 @@
|
|||||||
<maven-resource group="org.picketlink" artifact="picketlink-federation"/>
|
<maven-resource group="org.picketlink" artifact="picketlink-federation"/>
|
||||||
</module-def>
|
</module-def>
|
||||||
<module-def name="org.picketlink.federation.bindings">
|
<module-def name="org.picketlink.federation.bindings">
|
||||||
<maven-resource group="org.picketlink" artifact="picketlink-wildlfy-common"/>
|
<maven-resource group="org.picketlink" artifact="picketlink-wildfly-common"/>
|
||||||
</module-def>
|
</module-def>
|
||||||
<module-def name="org.picketlink.idm">
|
<module-def name="org.picketlink.idm">
|
||||||
<maven-resource group="org.picketlink" artifact="picketlink-idm-impl"/>
|
<maven-resource group="org.picketlink" artifact="picketlink-idm-impl"/>
|
||||||
|
|||||||
@@ -52,7 +52,12 @@
|
|||||||
|
|
||||||
<!-- Process the resource -->
|
<!-- Process the resource -->
|
||||||
<resources/>
|
<resources/>
|
||||||
|
|
||||||
|
<!-- Add keycloak version property to module xml -->
|
||||||
|
<replace file="${module.repo.output.dir}/${current.module.path}/${module.xml}"
|
||||||
|
token="$${project.version}"
|
||||||
|
value="${project.version}"/>
|
||||||
|
|
||||||
<!-- Some final cleanup -->
|
<!-- Some final cleanup -->
|
||||||
<replace file="${module.repo.output.dir}/${current.module.path}/${module.xml}">
|
<replace file="${module.repo.output.dir}/${current.module.path}/${module.xml}">
|
||||||
<replacetoken>
|
<replacetoken>
|
||||||
|
|||||||
@@ -1,27 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<!--
|
|
||||||
~ JBoss, Home of Professional Open Source.
|
|
||||||
~ Copyright 2010, Red Hat, Inc., and individual contributors
|
|
||||||
~ as indicated by the @author tags. See the copyright.txt file in the
|
|
||||||
~ distribution for a full listing of individual contributors.
|
|
||||||
~
|
|
||||||
~ This is free software; you can redistribute it and/or modify it
|
|
||||||
~ under the terms of the GNU Lesser General Public License as
|
|
||||||
~ published by the Free Software Foundation; either version 2.1 of
|
|
||||||
~ the License, or (at your option) any later version.
|
|
||||||
~
|
|
||||||
~ This software is distributed in the hope that it will be useful,
|
|
||||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
~ Lesser General Public License for more details.
|
|
||||||
~
|
|
||||||
~ You should have received a copy of the GNU Lesser General Public
|
|
||||||
~ License along with this software; if not, write to the Free
|
|
||||||
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
||||||
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
@@ -30,7 +8,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -71,7 +49,7 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-wildfly-subsystem</artifactId>
|
<artifactId>keycloak-subsystem</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -83,6 +61,10 @@
|
|||||||
<groupId>org.bouncycastle</groupId>
|
<groupId>org.bouncycastle</groupId>
|
||||||
<artifactId>bcprov-jdk16</artifactId>
|
<artifactId>bcprov-jdk16</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly.core</groupId>
|
||||||
|
<artifactId>wildfly-cli</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.picketlink</groupId>
|
<groupId>org.picketlink</groupId>
|
||||||
<artifactId>picketlink-common</artifactId>
|
<artifactId>picketlink-common</artifactId>
|
||||||
@@ -101,7 +83,7 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.picketlink</groupId>
|
<groupId>org.picketlink</groupId>
|
||||||
<artifactId>picketlink-wildlfy-common</artifactId>
|
<artifactId>picketlink-wildfly-common</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.picketlink</groupId>
|
<groupId>org.picketlink</groupId>
|
||||||
@@ -119,7 +101,10 @@
|
|||||||
<groupId>org.picketlink</groupId>
|
<groupId>org.picketlink</groupId>
|
||||||
<artifactId>picketlink-impl</artifactId>
|
<artifactId>picketlink-impl</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.aesh</groupId>
|
||||||
|
<artifactId>aesh</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@@ -211,6 +196,31 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>copy</id>
|
||||||
|
<phase>compile</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<artifactItems>
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-server</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>war</type>
|
||||||
|
<overWrite>true</overWrite>
|
||||||
|
<outputDirectory>${project.build.directory}/modules/org/keycloak/keycloak-subsystem/main/auth-server</outputDirectory>
|
||||||
|
</artifactItem>
|
||||||
|
</artifactItems>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
~ JBoss, Home of Professional Open Source.
|
||||||
|
~ Copyright 2010, Red Hat, Inc., and individual contributors
|
||||||
|
~ as indicated by the @author tags. See the copyright.txt file in the
|
||||||
|
~ distribution for a full listing of individual contributors.
|
||||||
|
~
|
||||||
|
~ This is free software; you can redistribute it and/or modify it
|
||||||
|
~ under the terms of the GNU Lesser General Public License as
|
||||||
|
~ published by the Free Software Foundation; either version 2.1 of
|
||||||
|
~ the License, or (at your option) any later version.
|
||||||
|
~
|
||||||
|
~ This software is distributed in the hope that it will be useful,
|
||||||
|
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
~ Lesser General Public License for more details.
|
||||||
|
~
|
||||||
|
~ You should have received a copy of the GNU Lesser General Public
|
||||||
|
~ License along with this software; if not, write to the Free
|
||||||
|
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||||
|
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<module xmlns="urn:jboss:module:1.3" name="org.jboss.aesh">
|
||||||
|
<properties>
|
||||||
|
<property name="jboss.api" value="private"/>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<!-- Insert resources here -->
|
||||||
|
</resources>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<module name="org.fusesource.jansi" />
|
||||||
|
</dependencies>
|
||||||
|
</module>
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
~ JBoss, Home of Professional Open Source.
|
||||||
|
~ Copyright 2011, Red Hat, Inc., and individual contributors
|
||||||
|
~ as indicated by the @author tags. See the copyright.txt file in the
|
||||||
|
~ distribution for a full listing of individual contributors.
|
||||||
|
~
|
||||||
|
~ This is free software; you can redistribute it and/or modify it
|
||||||
|
~ under the terms of the GNU Lesser General Public License as
|
||||||
|
~ published by the Free Software Foundation; either version 2.1 of
|
||||||
|
~ the License, or (at your option) any later version.
|
||||||
|
~
|
||||||
|
~ This software is distributed in the hope that it will be useful,
|
||||||
|
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
~ Lesser General Public License for more details.
|
||||||
|
~
|
||||||
|
~ You should have received a copy of the GNU Lesser General Public
|
||||||
|
~ License along with this software; if not, write to the Free
|
||||||
|
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||||
|
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<module xmlns="urn:jboss:module:1.3" name="org.jboss.as.cli">
|
||||||
|
<properties>
|
||||||
|
<property name="jboss.api" value="private"/>
|
||||||
|
<property name="jboss.require-java-version" value="1.7"/>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<main-class name="org.jboss.as.cli.CommandLineMain"/>
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<!-- Insert resources here -->
|
||||||
|
</resources>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<module name="org.jboss.aesh"/>
|
||||||
|
<module name="org.jboss.modules"/>
|
||||||
|
<module name="org.jboss.as.controller-client"/>
|
||||||
|
<module name="org.jboss.as.protocol"/>
|
||||||
|
<module name="org.wildfly.security.manager"/>
|
||||||
|
<module name="org.jboss.as.patching.cli" optional="true" services="import"/>
|
||||||
|
<module name="org.jboss.dmr"/>
|
||||||
|
<module name="org.jboss.logging"/>
|
||||||
|
<module name="org.jboss.logmanager" services="import"/>
|
||||||
|
<module name="org.jboss.remoting"/>
|
||||||
|
<module name="org.jboss.sasl"/>
|
||||||
|
<module name="org.jboss.staxmapper"/>
|
||||||
|
<module name="org.jboss.threads"/>
|
||||||
|
<module name="org.jboss.vfs"/>
|
||||||
|
<module name="org.picketbox" optional="true"/>
|
||||||
|
<module name="javax.api"/>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</module>
|
||||||
+1
@@ -34,6 +34,7 @@
|
|||||||
<module name="org.apache.httpcomponents" />
|
<module name="org.apache.httpcomponents" />
|
||||||
<module name="org.jboss.logging"/>
|
<module name="org.jboss.logging"/>
|
||||||
<module name="org.keycloak.keycloak-core"/>
|
<module name="org.keycloak.keycloak-core"/>
|
||||||
|
<module name="net.iharder.base64"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</module>
|
</module>
|
||||||
+13
-3
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
~ JBoss, Home of Professional Open Source.
|
~ JBoss, Home of Professional Open Source.
|
||||||
~ Copyright 2010, Red Hat, Inc., and individual contributors
|
~ Copyright 2014, Red Hat, Inc., and individual contributors
|
||||||
~ as indicated by the @author tags. See the copyright.txt file in the
|
~ as indicated by the @author tags. See the copyright.txt file in the
|
||||||
~ distribution for a full listing of individual contributors.
|
~ distribution for a full listing of individual contributors.
|
||||||
~
|
~
|
||||||
@@ -22,8 +22,14 @@
|
|||||||
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<module xmlns="urn:jboss:module:1.1" name="org.keycloak.keycloak-wildfly-subsystem">
|
<module xmlns="urn:jboss:module:1.1" name="org.keycloak.keycloak-subsystem">
|
||||||
|
<properties>
|
||||||
|
<property name="keycloak-version" value="${project.version}"/>
|
||||||
|
<property name="auth-server-exploded" value="false"/>
|
||||||
|
</properties>
|
||||||
|
|
||||||
<resources>
|
<resources>
|
||||||
|
<resource-root path="."/>
|
||||||
<!-- Insert resources here -->
|
<!-- Insert resources here -->
|
||||||
</resources>
|
</resources>
|
||||||
|
|
||||||
@@ -31,12 +37,16 @@
|
|||||||
<module name="javax.api"/>
|
<module name="javax.api"/>
|
||||||
<module name="org.jboss.staxmapper"/>
|
<module name="org.jboss.staxmapper"/>
|
||||||
<module name="org.jboss.as.controller"/>
|
<module name="org.jboss.as.controller"/>
|
||||||
|
<module name="org.jboss.as.ee"/>
|
||||||
<module name="org.jboss.as.server"/>
|
<module name="org.jboss.as.server"/>
|
||||||
<module name="org.jboss.modules"/>
|
<module name="org.jboss.modules"/>
|
||||||
<module name="org.jboss.msc"/>
|
<module name="org.jboss.msc"/>
|
||||||
<module name="org.jboss.logging"/>
|
<module name="org.jboss.logging"/>
|
||||||
<module name="org.jboss.vfs"/>
|
<module name="org.jboss.vfs"/>
|
||||||
<module name="org.jboss.as.web-common"/>
|
<module name="org.jboss.as.web-common" optional="true"/>
|
||||||
|
<module name="org.jboss.as.web" optional="true"/>
|
||||||
|
<module name="org.jboss.as.version" optional="true"/>
|
||||||
|
<module name="org.keycloak.keycloak-as7-adapter" optional="true"/>
|
||||||
<module name="org.jboss.metadata"/>
|
<module name="org.jboss.metadata"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</module>
|
</module>
|
||||||
Executable
+102
@@ -0,0 +1,102 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<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.Beta2</version>
|
||||||
|
<relativePath>../../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
<name>Keycloak OSGI Core Adapter Integration</name>
|
||||||
|
<description/>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>keycloak-osgi-core-adapter</artifactId>
|
||||||
|
<packaging>bundle</packaging>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<keycloak.osgi.export>
|
||||||
|
org.keycloak.adapters.jaas,
|
||||||
|
org.keycloak.adapters
|
||||||
|
</keycloak.osgi.export>
|
||||||
|
<keycloak.osgi.import>
|
||||||
|
*;resolution:=optional
|
||||||
|
</keycloak.osgi.import>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-core</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</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>
|
||||||
|
</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>
|
||||||
|
<plugins>
|
||||||
|
<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>
|
||||||
|
<Embed-Dependency>*;scope=compile|runtime;artifactId=!keycloak-adapter-core</Embed-Dependency>
|
||||||
|
<Embed-Transitive>true</Embed-Transitive>
|
||||||
|
<Bundle-ClassPath>.</Bundle-ClassPath>
|
||||||
|
<Bundle-Name>${project.description}</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-Version>${project.version}</Implementation-Version>
|
||||||
|
</instructions>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# This is just to ensure that directory is added to git
|
||||||
Executable
+62
@@ -0,0 +1,62 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<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.Beta2</version>
|
||||||
|
<relativePath>../../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
<name>Keycloak OSGI Features</name>
|
||||||
|
<description/>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>keycloak-osgi-features</artifactId>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>filter</id>
|
||||||
|
<phase>generate-resources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>resources</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-artifacts</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>attach-artifact</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<artifacts>
|
||||||
|
<artifact>
|
||||||
|
<file>target/classes/features.xml</file>
|
||||||
|
<type>xml</type>
|
||||||
|
<classifier>features</classifier>
|
||||||
|
</artifact>
|
||||||
|
</artifacts>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<?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>
|
||||||
|
|
||||||
|
<feature name="keycloak-jaas" version="${project.version}" resolver="(obr)">
|
||||||
|
<details>The keycloak JAAS configuration</details>
|
||||||
|
<feature>keycloak-core-adapter</feature>
|
||||||
|
<bundle>mvn:org.keycloak/keycloak-osgi-jaas/${project.version}</bundle>
|
||||||
|
</feature>
|
||||||
|
|
||||||
|
</features>
|
||||||
Executable
+68
@@ -0,0 +1,68 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<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.Beta2</version>
|
||||||
|
<relativePath>../../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
<name>Keycloak OSGI JAAS</name>
|
||||||
|
<description/>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>keycloak-osgi-jaas</artifactId>
|
||||||
|
<packaging>bundle</packaging>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<keycloak.osgi.export>
|
||||||
|
</keycloak.osgi.export>
|
||||||
|
<keycloak.osgi.import>
|
||||||
|
org.apache.karaf.jaas.config,
|
||||||
|
org.keycloak.adapters.jaas;version=${project.version},
|
||||||
|
*;resolution:=optional
|
||||||
|
</keycloak.osgi.import>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-osgi-core-adapter</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<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>
|
||||||
|
<!--<Embed-Directory>lib</Embed-Directory>
|
||||||
|
<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
|
||||||
|
<Embed-Transitive>false</Embed-Transitive>
|
||||||
|
<Bundle-ClassPath>.</Bundle-ClassPath> -->
|
||||||
|
<Bundle-Name>${project.description}</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-Version>${project.version}</Implementation-Version>
|
||||||
|
</instructions>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
|
||||||
|
xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.0.0"
|
||||||
|
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
|
||||||
|
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.2.0">
|
||||||
|
|
||||||
|
<!-- Bean to allow the $[karaf.base] property to be correctly resolved -->
|
||||||
|
<ext:property-placeholder placeholder-prefix="$[" placeholder-suffix="]"/>
|
||||||
|
|
||||||
|
<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="jaasDirectAccessKeycloakConfigFile" value="$[karaf.base]/etc/keycloak-direct-access.json"/>
|
||||||
|
</cm:default-properties>
|
||||||
|
</cm:property-placeholder>
|
||||||
|
|
||||||
|
<jaas:config name="keycloak" rank="1">
|
||||||
|
|
||||||
|
<!-- Used for web authentication (like hawtio) -->
|
||||||
|
<jaas:module className="org.keycloak.adapters.jaas.BearerTokenLoginModule"
|
||||||
|
flags="sufficient">
|
||||||
|
keycloak-config-file = ${jaasBearerKeycloakConfigFile}
|
||||||
|
</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}
|
||||||
|
</jaas:module>
|
||||||
|
|
||||||
|
</jaas:config>
|
||||||
|
|
||||||
|
</blueprint>
|
||||||
Executable
+23
@@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<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.Beta2</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
<name>Keycloak OSGI Integration</name>
|
||||||
|
<description/>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>keycloak-osgi-pom</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>features</module>
|
||||||
|
<module>jaas</module>
|
||||||
|
<module>core-adapter</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<name>Distribution</name>
|
<name>Distribution</name>
|
||||||
@@ -27,13 +27,21 @@
|
|||||||
<modules>
|
<modules>
|
||||||
<module>modules</module>
|
<module>modules</module>
|
||||||
<module>as7-adapter-zip</module>
|
<module>as7-adapter-zip</module>
|
||||||
|
<module>tomcat6-adapter-zip</module>
|
||||||
<module>tomcat7-adapter-zip</module>
|
<module>tomcat7-adapter-zip</module>
|
||||||
|
<module>tomcat8-adapter-zip</module>
|
||||||
<module>eap6-adapter-zip</module>
|
<module>eap6-adapter-zip</module>
|
||||||
<module>wildfly-adapter-zip</module>
|
<module>wildfly-adapter-zip</module>
|
||||||
|
<module>jetty81-adapter-zip</module>
|
||||||
|
<module>jetty91-adapter-zip</module>
|
||||||
|
<module>jetty92-adapter-zip</module>
|
||||||
|
<module>js-adapter-zip</module>
|
||||||
<module>examples-docs-zip</module>
|
<module>examples-docs-zip</module>
|
||||||
<module>theme-template-zip</module>
|
<module>theme-template-zip</module>
|
||||||
<module>war-zip</module>
|
<module>war-zip</module>
|
||||||
<module>war-dist</module>
|
<module>war-dist</module>
|
||||||
|
<module>osgi</module>
|
||||||
|
<module>proxy</module>
|
||||||
<module>appliance-dist</module>
|
<module>appliance-dist</module>
|
||||||
<module>src-dist</module>
|
<module>src-dist</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|||||||
Executable
+30
@@ -0,0 +1,30 @@
|
|||||||
|
<assembly>
|
||||||
|
<id>war-dist</id>
|
||||||
|
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
|
||||||
|
<dependencySets>
|
||||||
|
<dependencySet>
|
||||||
|
<unpack>false</unpack>
|
||||||
|
<useTransitiveDependencies>true</useTransitiveDependencies>
|
||||||
|
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||||
|
<includes>
|
||||||
|
<include>org.keycloak:launcher</include>
|
||||||
|
</includes>
|
||||||
|
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
|
||||||
|
<outputDirectory>bin</outputDirectory>
|
||||||
|
</dependencySet>
|
||||||
|
<dependencySet>
|
||||||
|
<unpack>false</unpack>
|
||||||
|
<useTransitiveDependencies>true</useTransitiveDependencies>
|
||||||
|
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||||
|
<includes>
|
||||||
|
<include>org.keycloak:keycloak-proxy-server</include>
|
||||||
|
</includes>
|
||||||
|
<outputDirectory>lib</outputDirectory>
|
||||||
|
</dependencySet>
|
||||||
|
</dependencySets>
|
||||||
|
</assembly>
|
||||||
Executable
+58
@@ -0,0 +1,58 @@
|
|||||||
|
<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">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<artifactId>keycloak-parent</artifactId>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<version>1.1.0.Beta2</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>keycloak-proxy-dist</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<name>Proxy Distro</name>
|
||||||
|
<description/>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>launcher</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-proxy-server</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>assemble</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>assembly.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
<outputDirectory>
|
||||||
|
target
|
||||||
|
</outputDirectory>
|
||||||
|
<workDirectory>
|
||||||
|
target/assembly/work
|
||||||
|
</workDirectory>
|
||||||
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
<assembly>
|
||||||
|
<id>war-dist</id>
|
||||||
|
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
|
||||||
|
<dependencySets>
|
||||||
|
<dependencySet>
|
||||||
|
<unpack>false</unpack>
|
||||||
|
<useTransitiveDependencies>true</useTransitiveDependencies>
|
||||||
|
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||||
|
<includes>
|
||||||
|
<include>org.keycloak:keycloak-tomcat6-adapter</include>
|
||||||
|
</includes>
|
||||||
|
<excludes>
|
||||||
|
<exclude>org.apache.tomcat:catalina</exclude>
|
||||||
|
</excludes>
|
||||||
|
<outputDirectory></outputDirectory>
|
||||||
|
</dependencySet>
|
||||||
|
</dependencySets>
|
||||||
|
</assembly>
|
||||||
Executable
+53
@@ -0,0 +1,53 @@
|
|||||||
|
<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">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<artifactId>keycloak-parent</artifactId>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<version>1.1.0.Beta2</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>keycloak-tomcat6-adapter-dist</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<name>Keycloak Tomcat 6 Adapter Distro</name>
|
||||||
|
<description/>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-tomcat6-adapter</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>assemble</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>assembly.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
<outputDirectory>
|
||||||
|
target
|
||||||
|
</outputDirectory>
|
||||||
|
<workDirectory>
|
||||||
|
target/assembly/work
|
||||||
|
</workDirectory>
|
||||||
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -14,6 +14,10 @@
|
|||||||
<includes>
|
<includes>
|
||||||
<include>org.keycloak:keycloak-tomcat7-adapter</include>
|
<include>org.keycloak:keycloak-tomcat7-adapter</include>
|
||||||
</includes>
|
</includes>
|
||||||
|
<excludes>
|
||||||
|
<exclude>org.apache.tomcat:tomcat-servlet-api</exclude>
|
||||||
|
<exclude>org.apache.tomcat:tomcat-catalina</exclude>
|
||||||
|
</excludes>
|
||||||
<outputDirectory></outputDirectory>
|
<outputDirectory></outputDirectory>
|
||||||
</dependencySet>
|
</dependencySet>
|
||||||
</dependencySets>
|
</dependencySets>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
<assembly>
|
||||||
|
<id>war-dist</id>
|
||||||
|
|
||||||
|
<formats>
|
||||||
|
<format>zip</format>
|
||||||
|
</formats>
|
||||||
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
|
||||||
|
<dependencySets>
|
||||||
|
<dependencySet>
|
||||||
|
<unpack>false</unpack>
|
||||||
|
<useTransitiveDependencies>true</useTransitiveDependencies>
|
||||||
|
<useTransitiveFiltering>true</useTransitiveFiltering>
|
||||||
|
<includes>
|
||||||
|
<include>org.keycloak:keycloak-tomcat8-adapter</include>
|
||||||
|
</includes>
|
||||||
|
<excludes>
|
||||||
|
<exclude>org.apache.tomcat:tomcat-servlet-api</exclude>
|
||||||
|
<exclude>org.apache.tomcat:tomcat-catalina</exclude>
|
||||||
|
</excludes>
|
||||||
|
<outputDirectory></outputDirectory>
|
||||||
|
</dependencySet>
|
||||||
|
</dependencySets>
|
||||||
|
</assembly>
|
||||||
Executable
+53
@@ -0,0 +1,53 @@
|
|||||||
|
<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">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<artifactId>keycloak-parent</artifactId>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<version>1.1.0.Beta2</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>keycloak-tomcat8-adapter-dist</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<name>Keycloak Tomcat 8 Adapter Distro</name>
|
||||||
|
<description/>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-tomcat8-adapter</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>assemble</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>assembly.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
<outputDirectory>
|
||||||
|
target
|
||||||
|
</outputDirectory>
|
||||||
|
<workDirectory>
|
||||||
|
target/assembly/work
|
||||||
|
</workDirectory>
|
||||||
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -14,7 +14,8 @@
|
|||||||
<exclude>**/js-adapter/**</exclude>
|
<exclude>**/js-adapter/**</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
<fileSet>
|
<!--
|
||||||
|
<fileSet>
|
||||||
<directory>${project.build.directory}/unpacked/js-adapter</directory>
|
<directory>${project.build.directory}/unpacked/js-adapter</directory>
|
||||||
<outputDirectory>adapters/js-adapter</outputDirectory>
|
<outputDirectory>adapters/js-adapter</outputDirectory>
|
||||||
<includes>
|
<includes>
|
||||||
@@ -22,8 +23,10 @@
|
|||||||
<include>**/*.html</include>
|
<include>**/*.html</include>
|
||||||
</includes>
|
</includes>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
|
-->
|
||||||
</fileSets>
|
</fileSets>
|
||||||
<dependencySets>
|
<dependencySets>
|
||||||
|
<!--
|
||||||
<dependencySet>
|
<dependencySet>
|
||||||
<unpack>false</unpack>
|
<unpack>false</unpack>
|
||||||
<useTransitiveDependencies>false</useTransitiveDependencies>
|
<useTransitiveDependencies>false</useTransitiveDependencies>
|
||||||
@@ -31,10 +34,16 @@
|
|||||||
<include>org.keycloak:keycloak-wildfly-adapter-dist:zip</include>
|
<include>org.keycloak:keycloak-wildfly-adapter-dist:zip</include>
|
||||||
<include>org.keycloak:keycloak-as7-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-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-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>
|
</includes>
|
||||||
<outputDirectory>adapters</outputDirectory>
|
<outputDirectory>adapters</outputDirectory>
|
||||||
</dependencySet>
|
</dependencySet>
|
||||||
|
-->
|
||||||
<dependencySet>
|
<dependencySet>
|
||||||
<unpack>true</unpack>
|
<unpack>true</unpack>
|
||||||
<useTransitiveDependencies>false</useTransitiveDependencies>
|
<useTransitiveDependencies>false</useTransitiveDependencies>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -26,18 +26,48 @@
|
|||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<type>zip</type>
|
<type>zip</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-tomcat6-adapter-dist</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-tomcat7-adapter-dist</artifactId>
|
<artifactId>keycloak-tomcat7-adapter-dist</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<type>zip</type>
|
<type>zip</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-tomcat8-adapter-dist</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-eap6-adapter-dist</artifactId>
|
<artifactId>keycloak-eap6-adapter-dist</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<type>zip</type>
|
<type>zip</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-jetty81-adapter-dist</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-jetty91-adapter-dist</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-jetty92-adapter-dist</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<artifactId>keycloak-example-themes-dist</artifactId>
|
<artifactId>keycloak-example-themes-dist</artifactId>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -13,14 +13,6 @@
|
|||||||
<name>Keycloak Wildfly Adapter Distro</name>
|
<name>Keycloak Wildfly Adapter Distro</name>
|
||||||
<description/>
|
<description/>
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.keycloak</groupId>
|
|
||||||
<artifactId>keycloak-undertow-adapter</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
<type>zip</type>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
<!ENTITY JBossAdapter SYSTEM "modules/jboss-adapter.xml">
|
<!ENTITY JBossAdapter SYSTEM "modules/jboss-adapter.xml">
|
||||||
<!ENTITY JavascriptAdapter SYSTEM "modules/javascript-adapter.xml">
|
<!ENTITY JavascriptAdapter SYSTEM "modules/javascript-adapter.xml">
|
||||||
<!ENTITY TomcatAdapter SYSTEM "modules/tomcat-adapter.xml">
|
<!ENTITY TomcatAdapter SYSTEM "modules/tomcat-adapter.xml">
|
||||||
|
<!ENTITY Jetty9Adapter SYSTEM "modules/jetty9-adapter.xml">
|
||||||
|
<!ENTITY Jetty8Adapter SYSTEM "modules/jetty8-adapter.xml">
|
||||||
<!ENTITY InstalledApplications SYSTEM "modules/installed-applications.xml">
|
<!ENTITY InstalledApplications SYSTEM "modules/installed-applications.xml">
|
||||||
<!ENTITY Logout SYSTEM "modules/logout.xml">
|
<!ENTITY Logout SYSTEM "modules/logout.xml">
|
||||||
<!ENTITY SAML SYSTEM "modules/saml.xml">
|
<!ENTITY SAML SYSTEM "modules/saml.xml">
|
||||||
@@ -37,6 +39,7 @@
|
|||||||
<!ENTITY Clustering SYSTEM "modules/clustering.xml">
|
<!ENTITY Clustering SYSTEM "modules/clustering.xml">
|
||||||
<!ENTITY ApplicationClustering SYSTEM "modules/application-clustering.xml">
|
<!ENTITY ApplicationClustering SYSTEM "modules/application-clustering.xml">
|
||||||
<!ENTITY MultiTenancy SYSTEM "modules/multi-tenancy.xml">
|
<!ENTITY MultiTenancy SYSTEM "modules/multi-tenancy.xml">
|
||||||
|
<!ENTITY Proxy SYSTEM "modules/proxy.xml">
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<book>
|
<book>
|
||||||
@@ -86,6 +89,8 @@ This one is short
|
|||||||
&AdapterConfig;
|
&AdapterConfig;
|
||||||
&JBossAdapter;
|
&JBossAdapter;
|
||||||
&TomcatAdapter;
|
&TomcatAdapter;
|
||||||
|
&Jetty9Adapter;
|
||||||
|
&Jetty8Adapter;
|
||||||
&JavascriptAdapter;
|
&JavascriptAdapter;
|
||||||
&InstalledApplications;
|
&InstalledApplications;
|
||||||
&Logout;
|
&Logout;
|
||||||
@@ -131,6 +136,7 @@ This one is short
|
|||||||
&SecurityVulnerabilities;
|
&SecurityVulnerabilities;
|
||||||
&Clustering;
|
&Clustering;
|
||||||
&ApplicationClustering;
|
&ApplicationClustering;
|
||||||
|
&Proxy;
|
||||||
&Migration;
|
&Migration;
|
||||||
|
|
||||||
</book>
|
</book>
|
||||||
|
|||||||
@@ -79,6 +79,21 @@
|
|||||||
|
|
||||||
<section>
|
<section>
|
||||||
<title>Version specific migration</title>
|
<title>Version specific migration</title>
|
||||||
|
<section>
|
||||||
|
<title>Migrating from 1.1.Beta1 to 1.1.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>
|
||||||
|
<listitem>The tomcat adapter valve has moved to a different package. From <literal>org.keycloak.adapters.tomcat7.KeycloakAuthenticatorValve</literal> to <literal>org.keycloak.adapters.tomcat.KeycloakAuthenticatorValve</literal>
|
||||||
|
From the 'tomcat7' package to just 'tomcat'.
|
||||||
|
</listitem>
|
||||||
|
<listitem>JavaScript adapter now has idToken and idTokenParsed properties. If you use idToken to retrieve first name, email, etc. you need to change this to idTokenParsed.</listitem>
|
||||||
|
<listitem>The as7-eap-subsystem and keycloak-wildfly-subsystem have been merged into one keycloak-subsystem. If you have an existing standalone.xml
|
||||||
|
or domain.xml, you will need edit near the top of the file and change the extension module name to org.keycloak.keycloak-subsystem.
|
||||||
|
For AS7 only, the extension module name is org.keycloak.keycloak-as7-subsystem.</listitem>
|
||||||
|
<listitem>Server installation is no longer supported on AS7. You can still use AS7 as an application client.</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<title>Migrating from 1.0.x.Final to 1.1.Beta1</title>
|
<title>Migrating from 1.0.x.Final to 1.1.Beta1</title>
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
|
|||||||
@@ -57,10 +57,6 @@
|
|||||||
can be styled, branded, and tailored to your application and organizational needs.
|
can be styled, branded, and tailored to your application and organizational needs.
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
|
||||||
OAuth Bearer token auth for REST Services
|
|
||||||
</listitem>
|
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
Integrated Browser App to REST Service token propagation
|
Integrated Browser App to REST Service token propagation
|
||||||
</listitem>
|
</listitem>
|
||||||
@@ -95,10 +91,11 @@
|
|||||||
Deployable as a WAR, appliance, or on Openshift. Completely clusterable.
|
Deployable as a WAR, appliance, or on Openshift. Completely clusterable.
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
Multitenancy support. You can host and manage multiple realms for multiple organizations.
|
Multitenancy support. You can host and manage multiple realms for multiple organizations. In the same auth server
|
||||||
|
and even within the same deployed application.
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
Supports JBoss AS7, EAP 6.x, Wildfly, Tomcat 7 and Pure JavaScript applications. Plans to support Node.js, RAILS, GRAILS, and other non-Java deployments
|
Supports JBoss AS7, EAP 6.x, Wildfly, Tomcat 7, Tomcat 8, Jetty 9.1.x, Jetty 9.2.x, Jetty 8.1.x, and Pure JavaScript applications. Plans to support Node.js, RAILS, GRAILS, and other non-Java deployments
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
"cors-max-age" : 1000,
|
"cors-max-age" : 1000,
|
||||||
"cors-allowed-methods" : [ "POST", "PUT", "DELETE", "GET" ],
|
"cors-allowed-methods" : [ "POST", "PUT", "DELETE", "GET" ],
|
||||||
"bearer-only" : false,
|
"bearer-only" : false,
|
||||||
|
"enable-basic-auth" : false,
|
||||||
"expose-token" : true,
|
"expose-token" : true,
|
||||||
"credentials" : {
|
"credentials" : {
|
||||||
"secret" : "234234-234234-234234"
|
"secret" : "234234-234234-234234"
|
||||||
@@ -157,6 +158,16 @@
|
|||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>enable-basic-auth</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
This tells the adapter to also support basic authentication. If this option is enabled,
|
||||||
|
then <emphasis>secret</emphasis> must also be provided.
|
||||||
|
This is <emphasis>OPTIONAL</emphasis>. The default value is <emphasis>false</emphasis>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>expose-token</term>
|
<term>expose-token</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
@@ -218,7 +229,9 @@
|
|||||||
<term>truststore</term>
|
<term>truststore</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
This setting is for Java adapters. This is the file path to a Java keystore file.
|
This setting is for Java adapters. The value is the file path to a Java keystore file. If
|
||||||
|
you prefix the path with <literal>classpath:</literal>, then the truststore will be obtained
|
||||||
|
from the deployment's classpath instead.
|
||||||
Used for outgoing HTTPS communications to the Keycloak server. Client making HTTPS
|
Used for outgoing HTTPS communications to the Keycloak server. Client making HTTPS
|
||||||
requests need a way to verify the host of the server they are talking to. This is
|
requests need a way to verify the host of the server they are talking to. This is
|
||||||
what the trustore does. The keystore contains one or more trusted
|
what the trustore does. The keystore contains one or more trusted
|
||||||
@@ -233,7 +246,7 @@
|
|||||||
<literal>none</literal>
|
<literal>none</literal>
|
||||||
or
|
or
|
||||||
<literal>disable-trust-manager</literal>
|
<literal>disable-trust-manager</literal>
|
||||||
is <literal>true</literal>. The default value is<emphasis>false</emphasis>.
|
is <literal>true</literal>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|||||||
@@ -12,6 +12,13 @@
|
|||||||
<listitem>Directory on local filesystem</listitem>
|
<listitem>Directory on local filesystem</listitem>
|
||||||
<listitem>Single JSON file on your filesystem</listitem>
|
<listitem>Single JSON file on your filesystem</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
|
When importing using the "dir" or "zip" strategies, note that the files need to follow the naming convention specified below.
|
||||||
|
If you are importing files which were previously exported, the files already follow this convention.
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>{REALM_NAME}-realm.json, such as "acme-roadrunner-affairs-realm.json" for the realm named "acme-roadrunner-affairs"</listitem>
|
||||||
|
<listitem>{REALM_NAME}-users-{INDEX}.json, such as "acme-roadrunner-affairs-users-0.json" for the first users file of the realm named "acme-roadrunner-affairs"</listitem>
|
||||||
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Encrypted ZIP is recommended as export contains many sensitive informations like passwords of your users (even if they are hashed),
|
Encrypted ZIP is recommended as export contains many sensitive informations like passwords of your users (even if they are hashed),
|
||||||
@@ -111,5 +118,14 @@ bin/standalone.sh -Dkeycloak.migration.action=import
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</para>
|
</para>
|
||||||
|
<para>
|
||||||
|
When importing realm files that weren't exported before, the option <literal>keycloak.import</literal> can be used. If more than one realm
|
||||||
|
file needs to be imported, a comma separated list of file names can be specified. This is more appropriate than the cases before, as this
|
||||||
|
will happen only after the master realm has been initialized. Examples:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>-Dkeycloak.import=/tmp/realm1.json</listitem>
|
||||||
|
<listitem>-Dkeycloak.import=/tmp/realm1.json,/tmp/realm2.json</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
</chapter>
|
</chapter>
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
<section id="javascript-adapter">
|
<section id="javascript-adapter">
|
||||||
<title>Pure Client Javascript Adapter</title>
|
<title>Pure Client Javascript Adapter</title>
|
||||||
<para>
|
<para>
|
||||||
The Keycloak Server comes with a Javascript library you can use to secure pure HTML/Javascript applications. It
|
The Keycloak Server comes with a Javascript library you can use to secure pure HTML/Javascript applications. This
|
||||||
|
library is referencable directly from the keycloak server. You can also download the adapter from Keycloak's download
|
||||||
|
site if you want a static copy of this library. It
|
||||||
works in the same way as other application adapters except that your browser is driving the OAuth redirect protocol
|
works in the same way as other application adapters except that your browser is driving the OAuth redirect protocol
|
||||||
rather than the server.
|
rather than the server.
|
||||||
</para>
|
</para>
|
||||||
@@ -157,6 +159,7 @@ new Keycloak({ url: 'http://localhost/auth', realm: 'myrealm', clientId: 'myApp'
|
|||||||
<listitem>tokenParsed - the parsed token</listitem>
|
<listitem>tokenParsed - the parsed token</listitem>
|
||||||
<listitem>subject - the user id</listitem>
|
<listitem>subject - the user id</listitem>
|
||||||
<listitem>idToken - the id token if claims is enabled for the application, null otherwise</listitem>
|
<listitem>idToken - the id token if claims is enabled for the application, null otherwise</listitem>
|
||||||
|
<listitem>idTokenParsed - the parsed id token</listitem>
|
||||||
<listitem>realmAccess - the realm roles associated with the token</listitem>
|
<listitem>realmAccess - the realm roles associated with the token</listitem>
|
||||||
<listitem>resourceAccess - the resource roles assocaited with the token</listitem>
|
<listitem>resourceAccess - the resource roles assocaited with the token</listitem>
|
||||||
<listitem>refreshToken - the base64 encoded token that can be used to retrieve a new token</listitem>
|
<listitem>refreshToken - the base64 encoded token that can be used to retrieve a new token</listitem>
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
<section id="jboss-adapter-installation">
|
<section id="jboss-adapter-installation">
|
||||||
<title>Adapter Installation</title>
|
<title>Adapter Installation</title>
|
||||||
<para>
|
<para>
|
||||||
There is a adapter zip file for AS7, EAP, and Wildfly in the <literal>adapters/</literal> directory in the Keycloak
|
Adapters are no longer included with the appliance or war distribution.Each adapter is a separate download on
|
||||||
distribution.
|
the Keycloak download site. They are also available as a maven artifact.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Install on Wildfly:
|
Install on Wildfly:
|
||||||
@@ -41,12 +41,12 @@ $ unzip keycloak-as7-adapter-dist.zip
|
|||||||
After adding the Keycloak modules, you must then enable the Keycloak Subsystem within your app server's server configuration:
|
After adding the Keycloak modules, you must then enable the Keycloak Subsystem within your app server's server configuration:
|
||||||
<literal>domain.xml</literal> or <literal>standalone.xml</literal>.
|
<literal>domain.xml</literal> or <literal>standalone.xml</literal>.
|
||||||
</para>
|
</para>
|
||||||
<para>For Wildfly:
|
<para>
|
||||||
<programlisting><![CDATA[
|
<programlisting><![CDATA[
|
||||||
<server xmlns="urn:jboss:domain:1.4">
|
<server xmlns="urn:jboss:domain:1.4">
|
||||||
|
|
||||||
<extensions>
|
<extensions>
|
||||||
<extension module="org.keycloak.keycloak-wildfly-subsystem"/>
|
<extension module="org.keycloak.keycloak-subsystem"/>
|
||||||
...
|
...
|
||||||
</extensions>
|
</extensions>
|
||||||
|
|
||||||
@@ -56,25 +56,10 @@ $ unzip keycloak-as7-adapter-dist.zip
|
|||||||
</profile>
|
</profile>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
<note>For AS7, the extension module is org.keycloak.keycloak-as7-sybsystem.</note>
|
||||||
<para>For JBoss AS 7.1.1 and EAP 6.x:
|
|
||||||
<programlisting><![CDATA[
|
|
||||||
<server xmlns="urn:jboss:domain:1.4">
|
|
||||||
|
|
||||||
<extensions>
|
|
||||||
<extension module="org.keycloak.keycloak-as7-subsystem"/>
|
|
||||||
...
|
|
||||||
</extensions>
|
|
||||||
|
|
||||||
<profile>
|
|
||||||
<subsystem xmlns="urn:jboss:domain:keycloak:1.0"/>
|
|
||||||
...
|
|
||||||
</profile>
|
|
||||||
]]>
|
|
||||||
</programlisting>
|
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Finally, for both AS7, EAP 6.x, and Wildfly installations you must specify a shared keycloak security domain.
|
Finally, you must specify a shared keycloak security domain.
|
||||||
This security domain should be used with EJBs and other components when you need the security context created
|
This security domain should be used with EJBs and other components when you need the security context created
|
||||||
in the secured web tier to be propagated to the EJBs (other EE component) you are invoking. Otherwise
|
in the secured web tier to be propagated to the EJBs (other EE component) you are invoking. Otherwise
|
||||||
this configuration is optional.
|
this configuration is optional.
|
||||||
|
|||||||
+50
@@ -0,0 +1,50 @@
|
|||||||
|
<section id="jetty8-adapter">
|
||||||
|
<title>Jetty 8.1.x Adapter</title>
|
||||||
|
<para>
|
||||||
|
Keycloak has a separate adapter for Jetty 8.1.x that you will have to install into your Jetty
|
||||||
|
installation. You then have to provide some extra configuration in each WAR you deploy to
|
||||||
|
Jetty. Let's go over these steps.
|
||||||
|
</para>
|
||||||
|
<section id="jetty8-adapter-installation">
|
||||||
|
<title>Adapter Installation</title>
|
||||||
|
<para>
|
||||||
|
Adapters are no longer included with the appliance or war distribution.Each adapter is a separate download on
|
||||||
|
the Keycloak download site. They are also available as a maven artifact.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
You must unzip the Jetty 8.1.x distro into Jetty 8.1.x's root directory. Including
|
||||||
|
adapter's jars within your WEB-INF/lib directory will not work!
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<programlisting>
|
||||||
|
$ cd $JETTY_HOME
|
||||||
|
$ unzip keycloak-jetty81-adapter-dist.zip
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Next, you will have to enable the keycloak option. Edit start.ini and add keycloak to the options
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
|
#===========================================================
|
||||||
|
# Start classpath OPTIONS.
|
||||||
|
# These control what classes are on the classpath
|
||||||
|
# for a full listing do
|
||||||
|
# java -jar start.jar --list-options
|
||||||
|
#-----------------------------------------------------------
|
||||||
|
OPTIONS=Server,jsp,jmx,resources,websocket,ext,plus,annotations,keycloak
|
||||||
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<title>Required Per WAR Configuration</title>
|
||||||
|
<para>
|
||||||
|
Enabling Keycloak for your WARs is the same as the Jetty 9.x adapter. Our 8.1.x adapter supports both keycloak.json
|
||||||
|
and the jboss-web.xml advanced configuration. See <link linkend="jetty9_per_war">Required Per WAR Configuration</link>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
+162
@@ -0,0 +1,162 @@
|
|||||||
|
<section id="jetty9-adapter">
|
||||||
|
<title>Jetty 9.x Adapters</title>
|
||||||
|
<para>
|
||||||
|
Keycloak has a separate adapter for Jetty 9.1.x and Jetty 9.2.x that you will have to install into your Jetty
|
||||||
|
installation. You then have to provide some extra configuration in each WAR you deploy to
|
||||||
|
Jetty. Let's go over these steps.
|
||||||
|
</para>
|
||||||
|
<section id="jetty9-adapter-installation">
|
||||||
|
<title>Adapter Installation</title>
|
||||||
|
<para>
|
||||||
|
Adapters are no longer included with the appliance or war distribution.Each adapter is a separate download on
|
||||||
|
the Keycloak download site. They are also available as a maven artifact.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
You must unzip the Jetty 9.x distro into Jetty 9.x's root directory. Including
|
||||||
|
adapter's jars within your WEB-INF/lib directory will not work!
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<programlisting>
|
||||||
|
$ cd $JETTY_HOME
|
||||||
|
$ unzip keycloak-jetty92-adapter-dist.zip
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Next, you will have to enable the keycloak module for your jetty.base.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<programlisting>
|
||||||
|
$ cd your-base
|
||||||
|
$ java -jar $JETTY_HOME/start.jar --add-to-startd=keycloak
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="jetty9_per_war">
|
||||||
|
<title>Required Per WAR Configuration</title>
|
||||||
|
<para>
|
||||||
|
This section describes how to secure a WAR directly by adding config and editing files within your WAR package.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The first thing you must do is create a <literal>WEB-INF/jetty-web.xml</literal> file in your WAR package. This is
|
||||||
|
a Jetty specific config file and you must define a Keycloak specific authenticator within it.
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
|
||||||
|
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
|
||||||
|
<Get name="securityHandler">
|
||||||
|
<Set name="authenticator">
|
||||||
|
<New class="org.keycloak.adapters.jetty.KeycloakJettyAuthenticator">
|
||||||
|
</New>
|
||||||
|
</Set>
|
||||||
|
</Get>
|
||||||
|
</Configure>]]>
|
||||||
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Next you must create
|
||||||
|
a <literal>keycloak.json</literal> adapter config file within the <literal>WEB-INF</literal> directory
|
||||||
|
of your WAR. The format of this config file is describe in the <link linkend='adapter-config'>general adapter configuration</link>
|
||||||
|
section.
|
||||||
|
</para>
|
||||||
|
<warning>
|
||||||
|
<para>
|
||||||
|
The Jetty 9.1.x adapter will not be able to find the <literal>keycloak.json</literal> file. You will have to define
|
||||||
|
all adapter settings within the <literal>jetty-web.xml</literal> file as described below.
|
||||||
|
</para>
|
||||||
|
</warning>
|
||||||
|
<para>
|
||||||
|
Instead of using keycloak.json, you can define everything within the <literal>jetty-web.xml</literal>. You'll
|
||||||
|
just have to figure out how the json settings match to the <literal>org.keycloak.representations.adapters.config.AdapterConfig</literal>
|
||||||
|
class.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
|
||||||
|
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
|
||||||
|
<Get name="securityHandler">
|
||||||
|
<Set name="authenticator">
|
||||||
|
<New class="org.keycloak.adapters.jetty.KeycloakJettyAuthenticator">
|
||||||
|
<Set name="adapterConfig">
|
||||||
|
<New class="org.keycloak.representations.adapters.config.AdapterConfig">
|
||||||
|
<Set name="realm">tomcat</Set>
|
||||||
|
<Set name="resource">customer-portal</Set>
|
||||||
|
<Set name="authServerUrl">http://localhost:8081/auth</Set>
|
||||||
|
<Set name="sslRequired">external</Set>
|
||||||
|
<Set name="credentials">
|
||||||
|
<Map>
|
||||||
|
<Entry>
|
||||||
|
<Item>secret</Item>
|
||||||
|
<Item>password</Item>
|
||||||
|
</Entry>
|
||||||
|
</Map>
|
||||||
|
</Set>
|
||||||
|
<Set name="realmKey">MIGfMA0GCSqGSIb3DQEBAQUAA4</Set>
|
||||||
|
</New>
|
||||||
|
</Set>
|
||||||
|
</New>
|
||||||
|
</Set>
|
||||||
|
</Get>
|
||||||
|
</Configure>
|
||||||
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
You do not have to crack open your WAR to secure it with keycloak. Instead create the jetty-web.xml file
|
||||||
|
in your webapps directory with the name of yourwar.xml. Jetty should pick it up. In this mode, you'll have
|
||||||
|
to declare keycloak.json configuration directly within the xml file.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Finally you must specify both a <literal>login-config</literal> and use standard servlet security to specify
|
||||||
|
role-base constraints on your URLs. Here's an example:
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
|
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||||
|
version="3.0">
|
||||||
|
|
||||||
|
<module-name>customer-portal</module-name>
|
||||||
|
|
||||||
|
<security-constraint>
|
||||||
|
<web-resource-collection>
|
||||||
|
<web-resource-name>Customers</web-resource-name>
|
||||||
|
<url-pattern>/*</url-pattern>
|
||||||
|
</web-resource-collection>
|
||||||
|
<auth-constraint>
|
||||||
|
<role-name>user</role-name>
|
||||||
|
</auth-constraint>
|
||||||
|
</security-constraint>
|
||||||
|
|
||||||
|
<security-constraint>
|
||||||
|
<web-resource-collection>
|
||||||
|
<url-pattern>/*</url-pattern>
|
||||||
|
</web-resource-collection>
|
||||||
|
<user-data-constraint>
|
||||||
|
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
|
||||||
|
</user-data-constraint>
|
||||||
|
</security-constraint>
|
||||||
|
|
||||||
|
<login-config>
|
||||||
|
<auth-method>BASIC</auth-method>
|
||||||
|
<realm-name>this is ignored currently/realm-name>
|
||||||
|
</login-config>
|
||||||
|
|
||||||
|
<security-role>
|
||||||
|
<role-name>admin</role-name>
|
||||||
|
</security-role>
|
||||||
|
<security-role>
|
||||||
|
<role-name>user</role-name>
|
||||||
|
</security-role>
|
||||||
|
</web-app>
|
||||||
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
Executable
+338
@@ -0,0 +1,338 @@
|
|||||||
|
<chapter id="proxy">
|
||||||
|
<title>Keycloak Security Proxy</title>
|
||||||
|
<para>
|
||||||
|
Keycloak has an HTTP(S) proxy that you can put in front of web applications and services where it is not possible
|
||||||
|
to install the keycloak adapter. You can set up URL filters so that certain URLs are secured either by browser login
|
||||||
|
and/or bearer token authentication. You can also define role constraints for URL patterns within your applications.
|
||||||
|
</para>
|
||||||
|
<section>
|
||||||
|
<title>Proxy Install and Run</title>
|
||||||
|
<para>Download the keycloak proxy distribution from the Keycloak download pages and unzip it.
|
||||||
|
<programlisting>
|
||||||
|
$ unzip keycloak-proxy-dist.zip
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
To run it you must have a proxy config file (which we'll discuss in a moment).
|
||||||
|
<programlisting>
|
||||||
|
$ java -jar bin/launcher.jar [your-config.json]
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
If you do not specify a path to the proxy config file, the launcher will look in the current working directory
|
||||||
|
for the file named <literal>proxy.json</literal>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<title>Proxy Configuration</title>
|
||||||
|
<para>
|
||||||
|
Here's an example configuration file.
|
||||||
|
<programlisting><![CDATA[
|
||||||
|
{
|
||||||
|
"target-url": "http://localhost:8082",
|
||||||
|
"send-access-token": true,
|
||||||
|
"bind-address": "localhost",
|
||||||
|
"http-port": "8080",
|
||||||
|
"https-port": "8443",
|
||||||
|
"keystore": "classpath:ssl.jks",
|
||||||
|
"keystore-password": "password",
|
||||||
|
"key-password": "password",
|
||||||
|
"applications": [
|
||||||
|
{
|
||||||
|
"base-path": "/customer-portal",
|
||||||
|
"error-page": "/error.html",
|
||||||
|
"adapter-config": {
|
||||||
|
"realm": "demo",
|
||||||
|
"resource": "customer-portal",
|
||||||
|
"realm-public-key": "MIGfMA0GCSqGSIb",
|
||||||
|
"auth-server-url": "http://localhost:8081/auth",
|
||||||
|
"ssl-required" : "external",
|
||||||
|
"principal-attribute": "name",
|
||||||
|
"credentials": {
|
||||||
|
"secret": "password"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
,
|
||||||
|
"constraints": [
|
||||||
|
{
|
||||||
|
"pattern": "/users/*",
|
||||||
|
"roles-allowed": [
|
||||||
|
"user"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pattern": "/admins/*",
|
||||||
|
"roles-allowed": [
|
||||||
|
"admin"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pattern": "/users/permit",
|
||||||
|
"permit": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pattern": "/users/deny",
|
||||||
|
"deny": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}]]>
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
<section>
|
||||||
|
<title>Basic Config</title>
|
||||||
|
<para>
|
||||||
|
The basic configuration options for the server are as follows:
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term>target-url</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The URL this server is proxying <emphasis>REQUIRED.</emphasis>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>send-access-token</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Boolean flag. If true, this will send the access token via the KEYCLOAK_ACCESS_TOKEN header to the
|
||||||
|
proxied server. <emphasis>OPTIONAL.</emphasis>. Default is false.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>bind-address</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
DNS name or IP address to bind the proxy server's sockets to.
|
||||||
|
<emphasis>OPTIONAL.</emphasis>. The default value is <emphasis>localhost</emphasis>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>http-port</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Port to listen for HTTP requests. If you do not specify this value, then the proxy will
|
||||||
|
not listen for regular HTTP requests.
|
||||||
|
<emphasis>OPTIONAL.</emphasis>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>https-port</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Port to listen for HTTPS requests. If you do not specify this value, then the proxy will
|
||||||
|
not listen for HTTPS requests.
|
||||||
|
<emphasis>OPTIONAL.</emphasis>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>keystore</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Path to a Java keystore file that contains private key and certificate for the server to be
|
||||||
|
able to handle HTTPS requests. Can be a file path, or, if you prefix it with <literal>classpath:</literal>
|
||||||
|
it will look for this file in the classpath.
|
||||||
|
<emphasis>OPTIONAL.</emphasis>. If you have enabled HTTPS, but have not defined a keystore, the proxy
|
||||||
|
will auto-generate a self-signed certificate and use that.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>buffer-size</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
HTTP server socket buffer size. Usually the default is good enough. <emphasis>OPTIONAL.</emphasis>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>buffers-per-region</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
HTTP server socket buffers per region. Usually the default is good enough. <emphasis>OPTIONAL.</emphasis>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>io-threads</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Number of threads to handle IO. Usually default is good enough. <emphasis>OPTIONAL.</emphasis>.
|
||||||
|
The default is the number of available processors * 2.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>worker-threads</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Number of threads to handle requests. Usually the default is good enough. <emphasis>OPTIONAL.</emphasis>.
|
||||||
|
The default is the number of available processors * 16.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<title>Application Config</title>
|
||||||
|
<para>
|
||||||
|
Next under the <literal>applications</literal> array attribute, you can define one or more applications per host you are proxying.
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term>base-path</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The base context root for the application. Must start with '/' <emphasis>REQUIRED.</emphasis>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>error-page</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
If the proxy has an error, it will display the target application's error page relative URL <emphasis>OPTIONAL.</emphasis>.
|
||||||
|
This is a relative path to the base-path. In the example above it would be <literal>/customer-portal/error.html</literal>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>adapter-config</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<emphasis>REQUIRED.</emphasis>. Same configuration as any other keycloak adapter. See <link linkend='adapter-config'>Adapter Config</link>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</para>
|
||||||
|
<section>
|
||||||
|
<title>Constraint Config</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Next under each application you can define one or more constraints in the <literal>constraints</literal> array attribute.
|
||||||
|
A constraint defines a URL pattern relative to the base-path. You can deny, permit, or require authentication for
|
||||||
|
a specific URL pattern. You can specify roles allowed for that path as well. More specific constraints will take
|
||||||
|
precedence over more general ones.
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term>pattern</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
URL pattern to match relative to the base-path of the application. Must start with '/' <emphasis>REQUIRED.</emphasis>.
|
||||||
|
You may only have one wildcard and it must come at the end of the pattern. Valid <literal>/foo/bar/*</literal> and <literal>/foo/*.txt</literal>
|
||||||
|
Not valid: <literal>/*/foo/*</literal>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>roles-allowed</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Array of strings of roles allowed to access this url pattern. <emphasis>OPTIONAL.</emphasis>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>methods</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Array of strings of HTTP methods that will exclusively match this pattern and HTTP request. <emphasis>OPTIONAL.</emphasis>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>excluded-methods</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Array of strings of HTTP methods that will be ignored when match this pattern. <emphasis>OPTIONAL.</emphasis>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>deny</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Deny all access to this URL pattern. <emphasis>OPTIONAL.</emphasis>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>permit</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Permit all access without requiring authentication or a role mapping. <emphasis>OPTIONAL.</emphasis>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>authenticate</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Require authentication for this pattern, but no role mapping. <emphasis>OPTIONAL.</emphasis>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<title>Keycloak Identity Headers</title>
|
||||||
|
<para>
|
||||||
|
When forwarding requests to the proxied server, Keycloak Proxy will set some additional headers with values from the
|
||||||
|
OIDC identity token it received for authentication.
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term>KEYCLOAK_SUBJECT</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
User id. Corresponds to JWT <literal>sub</literal> and will be the user id Keycloak uses to store
|
||||||
|
this user.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>KEYCLOAK_USERNAME</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Username. Corresponds to JWT <literal>preferred_username</literal>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>KEYCLOAK_EMAIL</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Email address of user if set.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>KEYCLOAK_NAME</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Full name of user if set.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>KEYCLOAK_ACCESS_TOKEN</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Send the access token in this header if the proxy was configured to send it. This token can
|
||||||
|
be used to make bearer token requests.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
</chapter>
|
||||||
@@ -41,10 +41,6 @@ keycloak-appliance-dist-all-&project.version;/
|
|||||||
standalone/configuration/
|
standalone/configuration/
|
||||||
keycloak-server.json
|
keycloak-server.json
|
||||||
themes/
|
themes/
|
||||||
adapters/
|
|
||||||
keycloak-as7-adapter-dist-&project.version;.zip
|
|
||||||
keycloak-eap6-adapter-dist-&project.version;.zip
|
|
||||||
keycloak-wildfly-adapter-dist-&project.version;.zip
|
|
||||||
examples/
|
examples/
|
||||||
docs/
|
docs/
|
||||||
</programlisting>
|
</programlisting>
|
||||||
@@ -86,10 +82,6 @@ keycloak-war-dist-all-&project.version;/
|
|||||||
configuration/
|
configuration/
|
||||||
keycloak-server.json
|
keycloak-server.json
|
||||||
themes/
|
themes/
|
||||||
adapters/
|
|
||||||
keycloak-as7-adapter-dist-&project.version;.zip
|
|
||||||
keycloak-eap6-adapter-dist-&project.version;.zip
|
|
||||||
keycloak-wildfly-adapter-dist-&project.version;.zip
|
|
||||||
examples/
|
examples/
|
||||||
docs/
|
docs/
|
||||||
</programlisting>
|
</programlisting>
|
||||||
@@ -107,7 +99,7 @@ keycloak-war-dist-all-&project.version;/
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
After these steps you should also <link linkend='jboss-adapter-installation'>install the client adapter</link>
|
After these steps you MUST then <link linkend='jboss-adapter-installation'>download and install the client adapter</link>
|
||||||
as this may contain modules the server needs (like Bouncycastle). You will also need to install the adapter
|
as this may contain modules the server needs (like Bouncycastle). You will also need to install the adapter
|
||||||
to run the examples on the same server.
|
to run the examples on the same server.
|
||||||
</para>
|
</para>
|
||||||
@@ -121,7 +113,7 @@ keycloak-war-dist-all-&project.version;/
|
|||||||
enter in a new password.
|
enter in a new password.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
If you have Keycloak on JBoss AS 7.1.1 <link linkend="as7-specifics">these steps</link>.
|
You can no longer run Keycloak on JBoss AS 7.1.1. You must run on EAP 6.x or Wildfly.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
@@ -392,47 +384,8 @@ keycloak-war-dist-all-&project.version;/
|
|||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="as7-specifics">
|
<section>
|
||||||
<title>AS7 specifics</title>
|
<title>EAP6.x Logging</title>
|
||||||
<para>
|
|
||||||
If you have Keycloak on JBoss AS 7.1.1 you need to do few other things in order to have Keycloak up and running. This includes:
|
|
||||||
<orderedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Remove or comment the element from file <literal>KEYCLOAK_HOME/standalone/deployments/auth-server.war/WEB-INF/jboss-deployment-structure.xml</literal>.
|
|
||||||
<programlisting><![CDATA[
|
|
||||||
<exclude-subsystems>
|
|
||||||
<subsystem name="webservices"/>
|
|
||||||
</exclude-subsystems>
|
|
||||||
]]></programlisting>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Then either:
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Disable webservices extension and subsystem by remove (or comment) both in <literal>KEYCLOAK_HOME/standalone/configuration/standalone.xml</literal>.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
If you want to use webservices subsystem, the alternative is to remove 2 JAR files
|
|
||||||
<literal>KEYCLOAK_HOME/standalone/deployments/auth-server.war/WEB-INF/lib/keycloak-saml-protocol-&project.version;.jar</literal>
|
|
||||||
and <literal>KEYCLOAK_HOME/standalone/deployments/auth-server.war/WEB-INF/lib/picketlink-federation-&picketlink.version;.jar</literal>
|
|
||||||
but note that <link linkend="saml">SAML</link> won't work.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</orderedlist>
|
|
||||||
</para>
|
|
||||||
<section>
|
|
||||||
<title>AS7/EAP6.x Logging</title>
|
|
||||||
<para>
|
<para>
|
||||||
Accessing the admin console will get these annoying log messages:
|
Accessing the admin console will get these annoying log messages:
|
||||||
</para>
|
</para>
|
||||||
@@ -452,7 +405,6 @@ keycloak-war-dist-all-&project.version;/
|
|||||||
</logger>
|
</logger>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</section>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="ssl_modes">
|
<section id="ssl_modes">
|
||||||
@@ -644,10 +596,10 @@ keycloak-war-dist-all-&project.version;/
|
|||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<title>Installing the keystore to JBoss EAP6/AS7</title>
|
<title>Installing the keystore to JBoss EAP6</title>
|
||||||
<para>
|
<para>
|
||||||
Now that you have a Java keystore with the appropriate certificates, you need to configure your
|
Now that you have a Java keystore with the appropriate certificates, you need to configure your
|
||||||
JBoss EAP6/AS7 installation to use it. First step is to move the keystore file to a directory
|
JBoss EAP6 installation to use it. First step is to move the keystore file to a directory
|
||||||
you can reference in configuration. I like to put it in <literal>standalone/configuration</literal>.
|
you can reference in configuration. I like to put it in <literal>standalone/configuration</literal>.
|
||||||
Then you need to edit <literal>standalone/configuration/standalone.xml</literal> to enable SSL/HTTPS.
|
Then you need to edit <literal>standalone/configuration/standalone.xml</literal> to enable SSL/HTTPS.
|
||||||
</para>
|
</para>
|
||||||
@@ -713,7 +665,7 @@ keycloak-war-dist-all-&project.version;/
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<title>AS7/EAP</title>
|
<title>EAP</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Open <literal>standalone/configuration/standalone.xml</literal> in your favorite editor.
|
Open <literal>standalone/configuration/standalone.xml</literal> in your favorite editor.
|
||||||
@@ -749,4 +701,175 @@ keycloak-war-dist-all-&project.version;/
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
</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>
|
</chapter>
|
||||||
@@ -1,22 +1,29 @@
|
|||||||
<section id="tomcat-adapter">
|
<section id="tomcat-adapter">
|
||||||
<title>Tomcat 7 Adapter</title>
|
<title>Tomcat 6, 7 and 8 Adapters</title>
|
||||||
<para>
|
<para>
|
||||||
To be able to secure WAR apps deployed on Tomcat 7 you must install the Keycloak Tomcat 7 adapter
|
To be able to secure WAR apps deployed on Tomcat 6, 7 and 8 you must install the Keycloak Tomcat 6, 7 or 8 adapter
|
||||||
into your Tomcat installation. You then have to provide some extra configuration in each WAR you deploy to
|
into your Tomcat installation. You then have to provide some extra configuration in each WAR you deploy to
|
||||||
Tomcat. Let's go over these steps.
|
Tomcat. Let's go over these steps.
|
||||||
</para>
|
</para>
|
||||||
<section id="tomcat-adapter-installation">
|
<section id="tomcat-adapter-installation">
|
||||||
<title>Adapter Installation</title>
|
<title>Adapter Installation</title>
|
||||||
|
<para>
|
||||||
|
Adapters are no longer included with the appliance or war distribution. Each adapter is a separate download on
|
||||||
|
the Keycloak download site. They are also available as a maven artifact.
|
||||||
|
</para>
|
||||||
<para>
|
<para>
|
||||||
There is a adapter zip file for Tomcat 7 in the <literal>adapters/</literal> directory in the Keycloak appliance
|
You must unzip the adapter distro into Tomcat's <literal>lib/</literal> directory. Including
|
||||||
or war distribution. You must unzip this file into Tomcat's <literal>lib/</literal> directory. Including
|
|
||||||
adapter's jars within your WEB-INF/lib directory will not work! The Keycloak adapter is implemented as a Valve
|
adapter's jars within your WEB-INF/lib directory will not work! The Keycloak adapter is implemented as a Valve
|
||||||
and valve code must reside in Tomcat's main lib/ directory.
|
and valve code must reside in Tomcat's main lib/ directory.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
$ cd $TOMCAT_HOME/lib
|
$ cd $TOMCAT_HOME/lib
|
||||||
|
$ unzip keycloak-tomcat6-adapter-dist.zip
|
||||||
|
or
|
||||||
$ unzip keycloak-tomcat7-adapter-dist.zip
|
$ unzip keycloak-tomcat7-adapter-dist.zip
|
||||||
|
or
|
||||||
|
$ unzip keycloak-tomcat8-adapter-dist.zip
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
@@ -33,7 +40,7 @@ $ unzip keycloak-tomcat7-adapter-dist.zip
|
|||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<Context path="/your-context-path">
|
<Context path="/your-context-path">
|
||||||
<Valve className="org.keycloak.adapters.tomcat7.KeycloakAuthenticatorValve"/>
|
<Valve className="org.keycloak.adapters.tomcat.KeycloakAuthenticatorValve"/>
|
||||||
</Context>]]>
|
</Context>]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 88 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 59 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 103 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 65 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 80 KiB |
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-events-parent</artifactId>
|
<artifactId>keycloak-events-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-events-parent</artifactId>
|
<artifactId>keycloak-events-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-events-parent</artifactId>
|
<artifactId>keycloak-events-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-events-parent</artifactId>
|
<artifactId>keycloak-events-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-events-parent</artifactId>
|
<artifactId>keycloak-events-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
Regular → Executable
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>keycloak-parent</artifactId>
|
<artifactId>keycloak-parent</artifactId>
|
||||||
<groupId>org.keycloak</groupId>
|
<groupId>org.keycloak</groupId>
|
||||||
<version>1.1.0.Beta1</version>
|
<version>1.1.0.Beta2</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
Keycloak Example - Basic Authentication
|
||||||
|
=======================================
|
||||||
|
|
||||||
|
The following example was tested on Wildfly 8.1.0.Final and JBoss EAP 6.3. It should be compatible with any JBoss AS, JBoss EAP or Wildfly that supports Java EE 7.
|
||||||
|
|
||||||
|
This example demonstrates basic authentication support for a Keycloak protected REST service. However, more importantly it enables a REST service to be secured using both basic and bearer token authentication, which is useful where the service needs to be accessed both as part of a single signon session, and also as a standalone REST service.
|
||||||
|
|
||||||
|
|
||||||
|
Step 1: Setup a basic Keycloak server
|
||||||
|
--------------------------------------------------------------
|
||||||
|
Install Keycloak server and start it on port 8080. Check the Reference Guide if unsure on how to do it.
|
||||||
|
|
||||||
|
Once the Keycloak server is up and running, import the realm basicauthrealm.json.
|
||||||
|
|
||||||
|
|
||||||
|
Step 2: Deploy and run the example
|
||||||
|
--------------------------------------------------------------
|
||||||
|
|
||||||
|
- Build and deploy this sample's WAR file. For this example, deploy on the same server that is running the Keycloak Server, although this is not required for real world scenarios.
|
||||||
|
|
||||||
|
- Open a command window and perform the following command:
|
||||||
|
|
||||||
|
curl http://admin:password@localhost:8080/basicauth/service/echo?value=hello
|
||||||
|
|
||||||
|
This should result in the value 'hello' being returned as a response.
|
||||||
|
|
||||||
|
Simply change the username (currently 'admin') or password (currently 'password') in the command to see an "Unauthorized" response.
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"realm": "basic-auth",
|
||||||
|
"enabled": true,
|
||||||
|
"accessTokenLifespan": 60,
|
||||||
|
"accessCodeLifespan": 60,
|
||||||
|
"accessCodeLifespanUserAction": 300,
|
||||||
|
"ssoSessionIdleTimeout": 600,
|
||||||
|
"ssoSessionMaxLifespan": 36000,
|
||||||
|
"passwordCredentialGrantAllowed": true,
|
||||||
|
"sslRequired": "external",
|
||||||
|
"registrationAllowed": false,
|
||||||
|
"social": false,
|
||||||
|
"updateProfileOnInitialSocialLogin": false,
|
||||||
|
"privateKey": "MIICXAIBAAKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQABAoGAfmO8gVhyBxdqlxmIuglbz8bcjQbhXJLR2EoS8ngTXmN1bo2L90M0mUKSdc7qF10LgETBzqL8jYlQIbt+e6TH8fcEpKCjUlyq0Mf/vVbfZSNaVycY13nTzo27iPyWQHK5NLuJzn1xvxxrUeXI6A2WFpGEBLbHjwpx5WQG9A+2scECQQDvdn9NE75HPTVPxBqsEd2z10TKkl9CZxu10Qby3iQQmWLEJ9LNmy3acvKrE3gMiYNWb6xHPKiIqOR1as7L24aTAkEAtyvQOlCvr5kAjVqrEKXalj0Tzewjweuxc0pskvArTI2Oo070h65GpoIKLc9jf+UA69cRtquwP93aZKtW06U8dQJAF2Y44ks/mK5+eyDqik3koCI08qaC8HYq2wVl7G2QkJ6sbAaILtcvD92ToOvyGyeE0flvmDZxMYlvaZnaQ0lcSQJBAKZU6umJi3/xeEbkJqMfeLclD27XGEFoPeNrmdx0q10Azp4NfJAY+Z8KRyQCR2BEG+oNitBOZ+YXF9KCpH3cdmECQHEigJhYg+ykOvr1aiZUMFT72HU0jnmQe2FVekuG+LJUt2Tm7GtMjTFoGpf0JwrVuZN39fOYAlo+nTixgeW7X8Y=",
|
||||||
|
"publicKey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB",
|
||||||
|
"requiredCredentials": [ "password" ],
|
||||||
|
"users" : [
|
||||||
|
{
|
||||||
|
"username" : "admin",
|
||||||
|
"enabled": true,
|
||||||
|
"email" : "admin@admin.com",
|
||||||
|
"firstName": "Admin",
|
||||||
|
"lastName": "Burke",
|
||||||
|
"credentials" : [
|
||||||
|
{ "type" : "password",
|
||||||
|
"value" : "password" }
|
||||||
|
],
|
||||||
|
"realmRoles": [ "user","admin" ],
|
||||||
|
"applicationRoles": {
|
||||||
|
"realm-management": [ "realm-admin" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"roles" : {
|
||||||
|
"realm" : [
|
||||||
|
{
|
||||||
|
"name": "user",
|
||||||
|
"description": "User privileges"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "admin",
|
||||||
|
"description": "Administrator privileges"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"applications": [
|
||||||
|
{
|
||||||
|
"name": "basic-auth-service",
|
||||||
|
"enabled": true,
|
||||||
|
"adminUrl": "/basicauth",
|
||||||
|
"baseUrl": "/basicauth",
|
||||||
|
"secret": "password"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
}
|
||||||
Executable
+94
@@ -0,0 +1,94 @@
|
|||||||
|
<?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">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<artifactId>keycloak-parent</artifactId>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<version>1.1.0.Beta2</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<name>Keycloak Examples - Basic Auth</name>
|
||||||
|
<artifactId>examples-basicauth</artifactId>
|
||||||
|
<packaging>war</packaging>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
Keycloak Basic Auth Example
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>jboss</id>
|
||||||
|
<name>jboss repo</name>
|
||||||
|
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.resteasy</groupId>
|
||||||
|
<artifactId>resteasy-jaxrs</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<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>basicauth</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jboss.as.plugins</groupId>
|
||||||
|
<artifactId>jboss-as-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<skip>false</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.wildfly.plugins</groupId>
|
||||||
|
<artifactId>wildfly-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<skip>false</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<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>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
package org.keycloak.example.basicauth;
|
||||||
|
|
||||||
|
import org.jboss.resteasy.annotations.cache.NoCache;
|
||||||
|
|
||||||
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
import javax.ws.rs.QueryParam;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
||||||
|
* @version $Revision: 1 $
|
||||||
|
*/
|
||||||
|
@Path("service")
|
||||||
|
public class BasicAuthService {
|
||||||
|
@GET
|
||||||
|
@NoCache
|
||||||
|
@Path("echo")
|
||||||
|
public String echo(@QueryParam("value") String value) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loaded 100 of 544 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user