diff --git a/docs/documentation/securing_apps/topics/oidc/java/client-authentication.adoc b/docs/documentation/securing_apps/topics/oidc/java/client-authentication.adoc index 496f9ae717..2787f7620a 100644 --- a/docs/documentation/securing_apps/topics/oidc/java/client-authentication.adoc +++ b/docs/documentation/securing_apps/topics/oidc/java/client-authentication.adoc @@ -53,9 +53,6 @@ For set up on the adapter side you need to have something like this in your `key With this configuration, the keystore file `keystore-client.jks` must be available on classpath in your WAR. If you do not use the prefix `classpath:` you can point to any file on the file system where the client application is running. -ifeval::[{project_community}==true] -For inspiration, you can take a look at the examples distribution into the main demo example into the `product-portal` application. - ===== Client authentication with Signed JWT using client secret This is the same as Client Authentication with Signed JWT except for using the client secret instead of the private key and certificate. @@ -79,4 +76,3 @@ This "algorithm" field is optional so that HS256 is applied automatically if the ===== Add your own client authentication method You can add your own client authentication method as well. You will need to implement both client-side and server-side providers. For more details see the `Authentication SPI` section in link:{developerguide_link}[{developerguide_name}]. -endif::[] diff --git a/docs/documentation/securing_apps/topics/oidc/javascript-adapter.adoc b/docs/documentation/securing_apps/topics/oidc/javascript-adapter.adoc index 68c46ceee1..03f389ce52 100644 --- a/docs/documentation/securing_apps/topics/oidc/javascript-adapter.adoc +++ b/docs/documentation/securing_apps/topics/oidc/javascript-adapter.adoc @@ -185,8 +185,6 @@ While this mode is easy to set up, it also has some disadvantages: * The InApp-Browser might also be slower, especially when rendering more complex themes. * There are security concerns to consider, before using this mode, such as that it is possible for the app to gain access to the credentials of the user, as it has full control of the browser rendering the login page, so do not allow its use in apps you do not trust. -Use this example app to help you get started: https://github.com/keycloak/keycloak/tree/master/examples/cordova - The alternative mode is`cordova-native`, which takes a different approach. It opens the login page using the system's browser. After the user has authenticated, the browser redirects back into the application using a special URL. From there, the {project_name} adapter can finish the login by reading the code or token from the URL. You can activate the native mode by passing the adapter type `cordova-native` to the `init()` method: @@ -221,8 +219,6 @@ Furthermore, we recommend the following steps to improve compatibility with the ---- -There is an example app that shows how to use the native-mode: https://github.com/keycloak/keycloak/tree/master/examples/cordova-native - [#custom-adapters] ==== Custom Adapters diff --git a/docs/documentation/server_admin/topics/authentication/kerberos.adoc b/docs/documentation/server_admin/topics/authentication/kerberos.adoc index 0f01e71a50..542933072b 100644 --- a/docs/documentation/server_admin/topics/authentication/kerberos.adoc +++ b/docs/documentation/server_admin/topics/authentication/kerberos.adoc @@ -161,10 +161,6 @@ GSSContext context = gssManager.createContext(serviceName, krb5Oid, deserializedGssCredential, GSSContext.DEFAULT_LIFETIME); ---- -ifeval::[{project_community}==true] -Examples of this code exist in `examples/kerberos` in the {project_name} example distribution or demo distribution download. You can also check the example sources directly https://github.com/keycloak/keycloak/tree/main/examples/kerberos[here]. -endif::[] - [NOTE] ==== Configure `forwardable` Kerberos tickets in `krb5.conf` file and add support for delegated credentials to your browser. diff --git a/docs/documentation/server_development/topics/extensions.adoc b/docs/documentation/server_development/topics/extensions.adoc index fcb844da08..850f689018 100644 --- a/docs/documentation/server_development/topics/extensions.adoc +++ b/docs/documentation/server_development/topics/extensions.adoc @@ -1,4 +1,4 @@ -[[_extensions]] +ExampleSpi[[_extensions]] == Extending the server @@ -24,13 +24,10 @@ Object getResource(); ---- -Use this method to return an object, which acts as a https://github.com/jax-rs[JAX-RS Resource]. For more details, see the Javadoc and our examples. +Use this method to return an object, which acts as a https://github.com/jax-rs[JAX-RS Resource]. Your JAX-RS resource is only recognized by the server and registered as a valid endpoint if it includes the following configuration: - adding an empty file named `beans.xml` under `META-INF` - annotating the JAX-RS class with the annotation `jakarta.ws.rs.ext.Provider`. -There is a very simple example in the example distribution in `providers/rest` and there is a more advanced example in `providers/domain-extension`, -which shows how to add an authenticated REST endpoint and other functionalities like <<_extensions_spi, Adding your own SPI>> -or <<_extensions_jpa,Extending the datamodel with custom JPA entities>>. For details on how to package and deploy a custom provider, refer to the <<_providers,Service Provider Interfaces>> chapter. @@ -45,10 +42,6 @@ A custom SPI is especially useful with Custom REST endpoints. Use this procedure + [source,java] ---- -package org.keycloak.examples.domainextension.spi; - -import ... - public class ExampleSpi implements Spi { @Override @@ -80,7 +73,7 @@ public class ExampleSpi implements Spi { + [source] ---- -org.keycloak.examples.domainextension.spi.ExampleSpi +ExampleSpi ---- . Create the interfaces `ExampleServiceProviderFactory`, which extends from `ProviderFactory` and `ExampleService`, which extends from `Provider`. @@ -89,8 +82,6 @@ is always scoped per application, however `ExampleService` is scoped per-request . Finally you need to implement your providers in the same manner as described in the <<_providers,Service Provider Interfaces>> chapter. -For more details, take a look at the example distribution at `providers/domain-extension`, which shows an Example SPI similar to the one above. - [role="_additional-resources"] .Additional resources * <<_extensions_rest,Custom REST endpoints>> @@ -153,6 +144,4 @@ is always done at the server startup, so to trigger a DB update of your schema, it's the file `META-INF/example-changelog.xml` which must be packed in same JAR as the JPA entities and `ExampleJpaEntityProvider`) and then restart server. The DB schema will be automatically updated at startup. -For more details, take a look at the example distribution at example `providers/domain-extension`, which shows the `ExampleJpaEntityProvider` and `example-changelog.xml` described above. - NOTE: Don't forget to always back up your database before doing any changes in the Liquibase changelog and triggering a DB update. diff --git a/examples/README.md b/examples/README.md deleted file mode 100755 index 932a853770..0000000000 --- a/examples/README.md +++ /dev/null @@ -1,41 +0,0 @@ -Keycloak Examples -================= - -This directory contains a number of examples for Keycloak. - - -Admin Client ------------- - -Example using the Admin Client. For more information look at `admin-client/README.md`. - -CORS ----- - -Example CORS application. For more information look at `cors/README.md`. - - -JS Console ----------- - -Example JavaScript application that lets you experiment with the JavaScript adapter. For more information look at `js-console/README.md`. - - -Providers ---------- - -Example providers for Event Listener SPI, Event Store SPI and User Federation SPI. For more information look at: - -* User Federation that loads users from a text file - `providers/federation-provider/README.md` - - -Themes ------- - -Example themes to change the look and feel of login forms, account management console and admin console. For more information look at `themes/README.md`. - - -SAML ----- - -This is set of demo applications, showing how to secure your own SAML web applications. Fore more information look at `saml/README.md` diff --git a/examples/admin-client/README.md b/examples/admin-client/README.md deleted file mode 100644 index 7b195b045c..0000000000 --- a/examples/admin-client/README.md +++ /dev/null @@ -1,17 +0,0 @@ -Admin Client Example -==================== - -Start and configure Keycloak ----------------------------- - -Start Keycloak: - - bin/standalone.sh - -Open the Keycloak admin console, click on Add Realm, click on 'Choose a JSON file', select example-realm.json and click Upload. - -Deploy the Admin Client Example to Keycloak by running: - - mvn install wildfly:deploy - -Open the console at http://localhost:8080/examples-admin-client. The page should list all applications in the example realm, with a link to the applications that have a baseUrl configured. diff --git a/examples/admin-client/example-realm.json b/examples/admin-client/example-realm.json deleted file mode 100755 index 1687627350..0000000000 --- a/examples/admin-client/example-realm.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "realm": "example", - "enabled": true, - "sslRequired": "external", - "registrationAllowed": true, - "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": "examples-admin-client", - "enabled": true, - "credentials": [ - { - "type": "password", - "value": "password" - } - ], - "clientRoles": { - "realm-management": [ "realm-admin" ], - "account": [ "manage-account" ] - } - } - ], - "clients": [ - { - "clientId": "examples-admin-client", - "directAccessGrantsEnabled": true, - "enabled": true, - "fullScopeAllowed": true, - "baseUrl": "/examples-admin-client", - "redirectUris": [ - "/examples-admin-client/*" - ], - "secret": "password" - } - ] -} diff --git a/examples/admin-client/pom.xml b/examples/admin-client/pom.xml deleted file mode 100755 index 713d1db1d7..0000000000 --- a/examples/admin-client/pom.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - 4.0.0 - - - keycloak-examples-parent - org.keycloak - 999.0.0-SNAPSHOT - - - Keycloak Examples - Admin Client - examples-admin-client - war - - - Keycloak Admin Client Example - - - - - org.keycloak - keycloak-admin-client-jee - - - - - ${project.artifactId} - - - org.jboss.as.plugins - jboss-as-maven-plugin - - false - - - - org.wildfly.plugins - wildfly-maven-plugin - - false - - - - - - diff --git a/examples/admin-client/src/main/webapp/WEB-INF/web.xml b/examples/admin-client/src/main/webapp/WEB-INF/web.xml deleted file mode 100755 index 5c2f0be790..0000000000 --- a/examples/admin-client/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - examples-admin-client - - diff --git a/examples/admin-client/src/main/webapp/index.jsp b/examples/admin-client/src/main/webapp/index.jsp deleted file mode 100644 index d2c1b440e6..0000000000 --- a/examples/admin-client/src/main/webapp/index.jsp +++ /dev/null @@ -1,33 +0,0 @@ -<%@ page import="org.keycloak.admin.client.Keycloak" %> -<%@ page import="org.keycloak.admin.client.resource.ClientsResource" %> -<%@ page import="org.keycloak.common.util.UriUtils" %> -<%@ page import="org.keycloak.representations.idm.ClientRepresentation" %> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %> -<%@ page session="false" %> - - - Applications - - -<% - String authServer = UriUtils.getOrigin(request.getRequestURL().toString()) + "/auth"; - - Keycloak keycloak = Keycloak.getInstance(authServer, "example", "examples-admin-client", "password", "examples-admin-client", "password"); - ClientsResource clients = keycloak.realm("example").clients(); - - out.println("

Applications

"); - out.println(""); -%> -

- - diff --git a/examples/js-console/README.md b/examples/js-console/README.md deleted file mode 100644 index 652bc1eb65..0000000000 --- a/examples/js-console/README.md +++ /dev/null @@ -1,17 +0,0 @@ -Basic JavaScript Example -======================== - -Start and configure Keycloak ----------------------------- - -Start Keycloak: - - bin/standalone.sh - -Open the Keycloak admin console, click on Add Realm, click on 'Choose a JSON file', select example-realm.json and click Upload. - -Deploy the JS Console to Keycloak by running: - - mvn install wildfly:deploy - -Open the console at http://localhost:8080/js-console and login with username: 'user', and password: 'password'. diff --git a/examples/js-console/example-realm.json b/examples/js-console/example-realm.json deleted file mode 100755 index 826fbee5d8..0000000000 --- a/examples/js-console/example-realm.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "realm": "example", - "enabled": true, - "sslRequired": "external", - "registrationAllowed": true, - "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" : "user", - "enabled": true, - "email" : "sample-user@example", - "firstName": "Sample", - "lastName": "User", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": [ "user" ], - "clientRoles": { - "account": ["view-profile", "manage-account"] - } - } - ], - "roles" : { - "realm" : [ - { - "name": "user", - "description": "User privileges" - }, - { - "name": "admin", - "description": "Administrator privileges" - } - ] - }, - "scopeMappings": [ - { - "client": "js-console", - "roles": ["user"] - } - ], - "clients": [ - { - "clientId": "js-console", - "enabled": true, - "publicClient": true, - "baseUrl": "/js-console", - "redirectUris": [ - "/js-console/*" - ], - "webOrigins": [] - } - ], - "clientScopeMappings": { - "account": [ - { - "client": "js-console", - "roles": ["view-profile"] - } - ] - } -} diff --git a/examples/js-console/pom.xml b/examples/js-console/pom.xml deleted file mode 100755 index e26e650e56..0000000000 --- a/examples/js-console/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - keycloak-examples-parent - org.keycloak - 999.0.0-SNAPSHOT - - - 4.0.0 - org.keycloak.example.demo - js-console - war - JS Console - - - - js-console - - - org.jboss.as.plugins - jboss-as-maven-plugin - - false - - - - org.wildfly.plugins - wildfly-maven-plugin - - false - - - - - diff --git a/examples/js-console/src/main/webapp/WEB-INF/web.xml b/examples/js-console/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 16e8b239d2..0000000000 --- a/examples/js-console/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - js-console - \ No newline at end of file diff --git a/examples/js-console/src/main/webapp/index.html b/examples/js-console/src/main/webapp/index.html deleted file mode 100644 index ff930fe475..0000000000 --- a/examples/js-console/src/main/webapp/index.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
- -

Result

-

-
-

Events

-

-
-
-
-
-
diff --git a/examples/js-console/src/main/webapp/keycloak.json b/examples/js-console/src/main/webapp/keycloak.json
deleted file mode 100644
index cc4bab3394..0000000000
--- a/examples/js-console/src/main/webapp/keycloak.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-  "realm" : "example",
-  "auth-server-url" : "/auth",
-  "ssl-required" : "external",
-  "resource" : "js-console",
-  "public-client" : true
-}
diff --git a/examples/kerberos/README.md b/examples/kerberos/README.md
deleted file mode 100644
index 042498c4af..0000000000
--- a/examples/kerberos/README.md
+++ /dev/null
@@ -1,206 +0,0 @@
-Keycloak Example - Kerberos Credential Delegation
-=================================================
-
-This example requires that Keycloak is configured with Kerberos/SPNEGO authentication. It's showing how the forwardable TGT is sent from
-the Keycloak auth-server to the application, which deserializes it and authenticates with it to further Kerberized service, which in the example is LDAP server.
-
-Example is using built-in ApacheDS Kerberos server  and the realm with preconfigured federation provider and `gss delegation credential` protocol mapper.
-It also needs to enable forwardable ticket support in Kerberos configuration and your browser.
-
-Detailed steps:
-
-**1)** Build and deploy this sample's WAR file. For this example, deploy on the same server that is running the Keycloak Server (the easiest way is to use Keycloak Demo distribution), although this is not required for real world scenarios.
-
-If Keycloak Server is running locally, you can deploy the WAR using maven:
-
-    mvn wildfly:deploy
-
-**2)** Open `kerberosrealm.json` file for edit. Find `keyTab` config property, and adjust the path to `http.keytab` file, which is in project's root directory, to be an absolute path.
-For example:
-```
-   "keyTab" : "/home/user1/devel/keycloak/examples/kerberos/http.keytab"
-```
-
-On Windows you have to use forward slashes or double backslashes (\\) - e.g.`c:/Users/User1/devel/keycloak/examples/kerberos/http.keytab`.
-
-You can also move the file to another location if you want.
-**WARNING**: In production, keytab file should be in secured location accessible only to the user under which the Keycloak server is running.
-
-
-**3)** Run Keycloak server and import `kerberosrealm.json` into it through admin console. This will import realm with sample application
-and configured LDAP federation provider with Kerberos/SPNEGO authentication support enabled and with `gss delegation credential` protocol mapper 
-added to the application.
-
-Also if you are on Linux, make sure that record like:
-```
-127.0.0.1       localhost
-```
-is in your `/etc/hosts` before other records for the 127.0.0.1 host to avoid issues related to incompatible reverse lookup (Ensure the similar for other OS as well)
-
-**4)** Install kerberos client. This is platform dependent. If you are on Fedora, Ubuntu or RHEL, you can install package `freeipa-client`, which contains Kerberos client and a bunch of other stuff.
-
-
-**5)** Configure Kerberos client (On linux it's in file `/etc/krb5.conf` ). You need to configure `KEYCLOAK.ORG` realm for host `localhost` and enable `forwardable` flag, which is needed 
-for credential delegation example, as application needs to forward Kerberos ticket and authenticate with it against LDAP server. 
-See [this file](../../testsuite/integration-arquillian/tests/base/src/test/resources/kerberos/test-krb5.conf) for inspiration.
-On OS X the file to edit (or create) is `/Library/Preferences/edu.mit.Kerberos` with the same syntax as `krb5.conf`.
-On Windows the file to edit (or create) is `c:\Windows\krb5.ini` with the same syntax as `krb5.conf`.
-
-**WARNING**: `test-krb5.conf` is just a sample configuration which contains insecure algorithms. Therefore it shouldn't be used in production.
-
-**6)**  Run ApacheDS based LDAP server. You can run the command like this (assuming you're in the `kerberos` directory with this example):
-
-```
-mvn exec:java -Pkerberos
-```
-
-This will also automatically import the LDIF from `kerberos-example-users.ldif` of kerberos example into the LDAP server. Replace with your own LDIF file if you want different users.
-
-A bit more details about embedded Kerberos server in [Executing Tests](https://github.com/keycloak/keycloak/blob/main/docs/tests.md#kerberos-server).
-
-**WARNING**: ApacheDS kerberos server shouldn't be used in production.
-
-  
-**7)** Configure browser (Firefox, Chrome or other) and enable SPNEGO authentication and credential delegation for `localhost` . 
-Consult the documentation of your browser and OS on how to do it. For example in Firefox it can be done by adding `localhost` to 
-both `network.negotiate-auth.trusted-uris` and `network.negotiate-auth.delegation-uris` and switch `network.negotiate-auth.allow-non-fqdn` to `true`. 
-A bit more details in [Executing Tests](https://github.com/keycloak/keycloak/blob/main/docs/tests.md#kerberos-server).  
- 
- 
-**8)** Test the example. Obtain kerberos ticket by running command from Terminal / CMD:
-```
-kinit hnelson@KEYCLOAK.ORG
-```
-with password `secret` .
-
-Then in your web browser open `http://localhost:8080/kerberos-portal` . You should be logged-in automatically through SPNEGO without displaying Keycloak login screen.
-Keycloak will also transmit the delegated GSS credential to the application inside access token and application will be able to log in with this credential
-to the LDAP server and retrieve some data from it (Actually it just retrieve few simple data about authenticated user themself).
-
-
-Troubleshooting
----------------
-
-You followed the instructions, but things don't seem to be working. Follow these instructions to troubleshoot.
-
-**1)** Make sure to use the default user in all Terminal / CMD sessions. Do not use 'sudo' or 'su'.
-The reason is that when you open Firefox, it will open within the context of currently signed-in user. And it will use that user's Kerberos ticket to perform authentication.
-When you obtain Kerberos ticket using Terminal session, you have to be that same user, otherwise the ticket will not be visible to the browser.
-
-Of course make sure to obtain the ticket:
-
-```
-kinit hnelson@KEYCLOAK.ORG
-```
-with password `secret`.
-
-
-**2)** On Linux make sure that the first entry in your /etc/hosts file is:
-```
-127.0.0.1  localhost
-```
-
-Even if it already contains a similar entry like:
-
-    127.0.0.1  localhost.localdomain localhost
-
-Make sure to insert the short one before the existing one.
-
-**3)** Make sure you have properly adjusted the path to `http.keytab` file in `kerberosrealm.json`.
-On Windows either use `/` as path delimiter or `\\` (two backslashes).
-
-**4)** Make sure that you have configured Firefox attributes via about:config url, and set `network.negotiate-auth.trusted-uris` and `network.negotiate-auth.delegation-uris` to `localhost`,
-and `network.negotiate-auth.allow-non-fqdn` to `true`.
-
-
-
-Symptoms and solutions
-----------------------
-
-Here are some typical errors, and how to overcome them. It often helps to close and reopen browser, or restart servers in order for remedy to take effect.
-
-
-### Symptom
-
-  There is an error when starting embedded LDAP server:
-
-```
-GSSException: Invalid name provided (Mechanism level: KrbException: Cannot locate default realm)
-```
-### Solution
-
-  Make sure that krb5.conf file exists - location and file name is OS specific. See step no. 5 of the instructions.
-
-
-### Symptom
-
-  Browser redirects to normal login screen. There are no errors in Wildfly log.
-
-### Solution
-
-  Make sure to perform `kinit`, and properly configure Firefox. See points no. 1, and no. 4 above.
-
-
-### Symptom
-
-  Browser redirects to a normal login screen. There is a warning in Wildfly log:
-
-```
-11:31:48,267 WARN  [org.keycloak.federation.kerberos.impl.SPNEGOAuthenticator] (default task-6) GSS Context accepted, but no context initiator recognized. Check your kerberos configuration and reverse DNS lookup configuration
-```
-
-  There is also a warning similar to the following in Embedded LDAP log:
-
-```
-11:31:47,923 WARN  [org.apache.directory.server.KERBEROS_LOG] No server entry found for kerberos principal name HTTP/localhost.localdomain@KEYCLOAK.ORG
-11:31:47,925 WARN  [org.apache.directory.server.KERBEROS_LOG] Server not found in Kerberos database (7)
-```
-
-### Solution
-
-  Make sure that 127.0.0.1 reverse resolution returns 'localhost'. See point no. 2 above.
-
-
-### Symptom
-
-  Browser redirects to a normal login screen. There is a stacktrace in Wildfly log:
-```
-15:10:04,531 WARN  [org.keycloak.federation.kerberos.impl.SPNEGOAuthenticator] (default task-3) SPNEGO login failed: java.security.PrivilegedActionException: GSSException: Failure unspecified at GSS-API level (Mechanism level: Invalid argument (400) - Cannot find key of appropriate type to decrypt AP REP - DES3 CBC mode with SHA1-KD)
-   at java.security.AccessController.doPrivileged(Native Method)
-   at javax.security.auth.Subject.doAs(Subject.java:422)
-   at org.keycloak.federation.kerberos.impl.SPNEGOAuthenticator.authenticate(SPNEGOAuthenticator.java:46)
-```
-
-### Solution
-
-  Make sure `http.keytab` is available at the location specified in `kerberosrealm.json`. See point no. 3 above.
-
-
-### Symptom
-
-  Browser opens /kerberos-portal page, but reports an error retrieving user details from LDAP. There is a stacktrace in Wildfly log:
-```
-15:29:39,685 ERROR [stderr] (default task-6) javax.naming.AuthenticationException: GSSAPI [Root exception is javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Server not found in Kerberos database (7) - Server not found in Kerberos database)]]
-15:29:39,687 ERROR [stderr] (default task-6) 	at com.sun.jndi.ldap.sasl.LdapSasl.saslBind(LdapSasl.java:169)
-15:29:39,687 ERROR [stderr] (default task-6) 	at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:236)
-15:29:39,689 ERROR [stderr] (default task-6) 	at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2788)
-```
-
-### Solution
-
-  Make sure `http.keytab` is available in location specified in `kerberosrealm.json`. See point no. 3 above. Also delete embedded server's cache directory:
-
-    rm -rf /tmp/server-work-keycloakDS
-
-
-### Symptom
-```
-17:32:19,825 ERROR [stderr] (default task-24) org.keycloak.common.util.KerberosSerializationUtils$KerberosSerializationException: Null credential given as input. Did you enable kerberos credential delegation for your web browser and mapping of gss credential to access token?, Java version: 1.8.0_60, runtime version: 1.8.0_60-b27, vendor: Oracle Corporation, os: 4.1.6-200.fc22.x86_64
-17:32:19,826 ERROR [stderr] (default task-24) 	at org.keycloak.common.util.KerberosSerializationUtils.deserializeCredential(KerberosSerializationUtils.java:109)
-17:32:19,827 ERROR [stderr] (default task-24) 	at org.keycloak.example.kerberos.GSSCredentialsClient.getUserFromLDAP(GSSCredentialsClient.java:42)
-```
-
-### Solution
-
-  Make sure to properly configure Firefox. See point no. 4 above.
-
diff --git a/examples/kerberos/http.keytab b/examples/kerberos/http.keytab
deleted file mode 100644
index 0e7fd96fa7..0000000000
Binary files a/examples/kerberos/http.keytab and /dev/null differ
diff --git a/examples/kerberos/kerberos-example-users.ldif b/examples/kerberos/kerberos-example-users.ldif
deleted file mode 100644
index fd9936cfa9..0000000000
--- a/examples/kerberos/kerberos-example-users.ldif
+++ /dev/null
@@ -1,90 +0,0 @@
-dn: dc=keycloak,dc=org
-objectclass: dcObject
-objectclass: organization
-o: Keycloak
-dc: Keycloak
-
-dn: ou=People,dc=keycloak,dc=org
-objectClass: organizationalUnit
-objectClass: top
-ou: People
-
-dn: uid=krbtgt,ou=People,dc=keycloak,dc=org
-objectClass: top
-objectClass: person
-objectClass: inetOrgPerson
-objectClass: krb5principal
-objectClass: krb5kdcentry
-cn: KDC Service
-sn: Service
-uid: krbtgt
-userPassword: secret
-krb5PrincipalName: krbtgt/KEYCLOAK.ORG@KEYCLOAK.ORG
-krb5KeyVersionNumber: 0
-
-dn: uid=ldap,ou=People,dc=keycloak,dc=org
-objectClass: top
-objectClass: person
-objectClass: inetOrgPerson
-objectClass: krb5principal
-objectClass: krb5kdcentry
-cn: LDAP
-sn: Service
-uid: ldap
-userPassword: randall
-krb5PrincipalName: ${ldapSaslPrincipal}
-krb5KeyVersionNumber: 0
-
-dn: uid=HTTP,ou=People,dc=keycloak,dc=org
-objectClass: top
-objectClass: person
-objectClass: inetOrgPerson
-objectClass: krb5principal
-objectClass: krb5kdcentry
-cn: HTTP
-sn: Service
-uid: HTTP
-userPassword: httppwd
-krb5PrincipalName: HTTP/${hostname}@KEYCLOAK.ORG
-krb5KeyVersionNumber: 0
-
-dn: uid=hnelson,ou=People,dc=keycloak,dc=org
-objectClass: top
-objectClass: person
-objectClass: inetOrgPerson
-objectClass: krb5principal
-objectClass: krb5kdcentry
-cn: Horatio
-sn: Nelson
-mail: hnelson@keycloak.org
-uid: hnelson
-userPassword: secret
-krb5PrincipalName: hnelson@KEYCLOAK.ORG
-krb5KeyVersionNumber: 0
-
-dn: uid=jduke,ou=People,dc=keycloak,dc=org
-objectClass: top
-objectClass: person
-objectClass: inetOrgPerson
-objectClass: krb5principal
-objectClass: krb5kdcentry
-cn: Java
-sn: Duke
-mail: jduke@keycloak.org
-uid: jduke
-userPassword: theduke
-krb5PrincipalName: jduke@KEYCLOAK.ORG
-krb5KeyVersionNumber: 0
-
-dn: uid=gsstestserver,ou=People,dc=keycloak,dc=org
-objectClass: top
-objectClass: person
-objectClass: inetOrgPerson
-objectClass: krb5principal
-objectClass: krb5kdcentry
-cn: gsstestserver
-sn: Service
-uid: gsstestserver
-userPassword: gsstestpwd
-krb5PrincipalName: gsstestserver/xxx@KEYCLOAK.ORG
-krb5KeyVersionNumber: 0
diff --git a/examples/kerberos/kerberosrealm.json b/examples/kerberos/kerberosrealm.json
deleted file mode 100644
index 4c7e55d5d8..0000000000
--- a/examples/kerberos/kerberosrealm.json
+++ /dev/null
@@ -1,91 +0,0 @@
-{
-    "id": "kerberos-demo",
-    "realm": "kerberos-demo",
-    "enabled": true,
-    "sslRequired": "external",
-    "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", "kerberos" ],
-    "defaultRoles": [ "user" ],
-    "scopeMappings": [
-        {
-            "client": "kerberos-app",
-            "roles": [ "user" ]
-        }
-    ],
-    "clients": [
-        {
-            "clientId": "kerberos-app",
-            "enabled": true,
-            "baseUrl": "/kerberos-portal",
-            "redirectUris": [
-                "/kerberos-portal/*"
-            ],
-            "adminUrl": "/kerberos-portal",
-            "secret": "password",
-            "protocolMappers": [
-        		{
-		        	"protocolMapper" : "oidc-usermodel-property-mapper",
-			        "protocol" : "openid-connect",
-			        "name" : "username",
-			        "config" : {
-				        "Claim JSON Type" : "String",
-				        "user.attribute" : "username",
-				        "claim.name" : "preferred_username",
-				        "id.token.claim" : "true",
-				        "access.token.claim" : "true"
-			        }
-		        },
-                {
-			        "protocolMapper" : "oidc-usersessionmodel-note-mapper",
-			        "protocol" : "openid-connect",
-			        "name" : "gss delegation credential",
-			        "config" : {
-				        "user.session.note" : "gss_delegation_credential",
-				        "claim.name" : "gss_delegation_credential",
-                        "id.token.claim" : "false",
-                        "access.token.claim" : "true"
-			        }
-		        }
-            ]
-        }
-    ],
-    "roles" : {
-        "realm" : [
-            {
-                "name": "user",
-                "description": "Have User privileges"
-            }
-        ]
-    },
-    "userFederationProviders": [
-        {
-            "displayName": "kerberos-ldap-provider",
-            "providerName": "ldap",
-            "priority": 1,
-            "fullSyncPeriod": -1,
-            "changedSyncPeriod": -1,
-            "config": {
-                "syncRegistrations" : "false",
-                "connectionPooling" : "true",
-                "pagination" : "true",
-                "allowKerberosAuthentication" : "true",
-                "debug" : "true",
-                "editMode" : "WRITABLE",
-                "vendor" : "other",
-                "usernameLDAPAttribute" : "uid",
-                "rdnLDAPAttribute" : "uid",
-                "uuidLDAPAttribute" : "entryUUID",
-                "userObjectClasses" : "inetOrgPerson, organizationalPerson",
-                "connectionUrl" : "ldap://localhost:10389",
-                "usersDn" : "ou=People,dc=keycloak,dc=org",
-                "bindDn" : "uid=admin,ou=system",
-                "bindCredential" : "secret",
-                "kerberosRealm" : "KEYCLOAK.ORG",
-                "serverPrincipal" : "HTTP/localhost@KEYCLOAK.ORG",
-                "useKerberosForPasswordAuthentication": "true",
-                "keyTab" : "http.keytab"
-            }
-        }
-    ]
-}
diff --git a/examples/kerberos/pom.xml b/examples/kerberos/pom.xml
deleted file mode 100755
index 985373bde0..0000000000
--- a/examples/kerberos/pom.xml
+++ /dev/null
@@ -1,107 +0,0 @@
-
-
-
-    4.0.0
-
-    
-        keycloak-examples-parent
-        org.keycloak
-        999.0.0-SNAPSHOT
-    
-
-    Keycloak Examples - Kerberos Credential Delegation
-    examples-kerberos
-    war
-
-    
-        Kerberos Credential Delegation Example
-    
-
-    
-        
-            jakarta.servlet
-            jakarta.servlet-api
-            provided
-        
-        
-            org.keycloak
-            keycloak-core
-            provided
-        
-        
-            org.keycloak
-            keycloak-adapter-core
-            provided
-        
-        
-            org.keycloak
-            keycloak-util-embedded-ldap
-            test
-        
-    
-
-    
-        kerberos-portal
-        
-            
-                org.jboss.as.plugins
-                jboss-as-maven-plugin
-                
-                    false
-                
-            
-            
-                org.wildfly.plugins
-                wildfly-maven-plugin
-                
-                    false
-                
-            
-        
-    
-
-    
-        
-            kerberos
-            
-                
-                    
-                        org.codehaus.mojo
-                        exec-maven-plugin
-                        
-                            org.keycloak.testsuite.KerberosEmbeddedServer
-                            test
-                            
-                                
-                                    ldap.ldif
-                                    kerberos-example-users.ldif
-                                
-                                
-                                    workingDirectory
-                                    ${project.basedir}/target
-                                
-                            
-                        
-                    
-                
-            
-        
-    
-
-
diff --git a/examples/kerberos/src/main/java/org/keycloak/example/kerberos/GSSCredentialsClient.java b/examples/kerberos/src/main/java/org/keycloak/example/kerberos/GSSCredentialsClient.java
deleted file mode 100644
index e28005ebc8..0000000000
--- a/examples/kerberos/src/main/java/org/keycloak/example/kerberos/GSSCredentialsClient.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright 2016 Red Hat, Inc. and/or its affiliates
- * and other contributors as indicated by the @author tags.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.keycloak.example.kerberos;
-
-import org.ietf.jgss.GSSCredential;
-import org.keycloak.KeycloakPrincipal;
-import org.keycloak.common.constants.KerberosConstants;
-import org.keycloak.common.util.KerberosSerializationUtils;
-import org.keycloak.representations.AccessToken;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.InitialDirContext;
-import javax.security.sasl.Sasl;
-import jakarta.servlet.http.HttpServletRequest;
-import java.util.Hashtable;
-
-/**
- * Sample client able to authenticate against ApacheDS LDAP server with Krb5 GSS Credential.
- *
- * Credential was previously retrieved from SPNEGO authentication against Keycloak auth-server and transmitted from
- * Keycloak to the application in OIDC access token
- *
- * We can use GSSCredential to further GSS API calls . Note that if you will use GSS API directly, you can
- * attach GSSCredential when creating GSSContext like this:
- * GSSContext context = gssManager.createContext(serviceName, KerberosSerializationUtils.KRB5_OID, deserializedGssCredential, GSSContext.DEFAULT_LIFETIME);
- *
- * In this example we authenticate against LDAP server, which calls GSS API under the hood when credential is attached to env under Sasl.CREDENTIALS key
- *
- * @author Marek Posolda
- */
-public class GSSCredentialsClient {
-
-    public static LDAPUser getUserFromLDAP(HttpServletRequest req) throws Exception {
-        KeycloakPrincipal keycloakPrincipal = (KeycloakPrincipal) req.getUserPrincipal();
-        AccessToken accessToken = keycloakPrincipal.getKeycloakSecurityContext().getToken();
-        String username = accessToken.getPreferredUsername();
-
-        // Retrieve kerberos credential from accessToken and deserialize it
-        String serializedGssCredential = (String) accessToken.getOtherClaims().get(KerberosConstants.GSS_DELEGATION_CREDENTIAL);
-        GSSCredential deserializedGssCredential = KerberosSerializationUtils.deserializeCredential(serializedGssCredential);
-
-        // First try to invoke without gssCredential. It should fail. This is here just for illustration purposes
-        try {
-            invokeLdap(null, username);
-            throw new RuntimeException("Not expected to authenticate to LDAP without credential");
-        } catch (NamingException nse) {
-            System.out.println("GSSCredentialsClient: Expected exception: " + nse.getMessage());
-        }
-
-        return invokeLdap(deserializedGssCredential, username);
-    }
-
-    private static LDAPUser invokeLdap(GSSCredential gssCredential, String username) throws NamingException {
-        Hashtable env = new Hashtable(11);
-        env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
-        env.put(Context.PROVIDER_URL, "ldap://localhost:10389");
-
-        if (gssCredential != null) {
-            env.put(Context.SECURITY_AUTHENTICATION, "GSSAPI");
-            env.put(Sasl.CREDENTIALS, gssCredential);
-        }
-
-        DirContext ctx = new InitialDirContext(env);
-        try {
-            Attributes attrs = ctx.getAttributes("uid=" + username + ",ou=People,dc=keycloak,dc=org");
-            String uid = username;
-            String cn = (String) attrs.get("cn").get();
-            String sn = (String) attrs.get("sn").get();
-            return new LDAPUser(uid, cn, sn);
-        } finally {
-            ctx.close();
-        }
-    }
-
-    public static class LDAPUser {
-
-        private final String uid;
-        private final String cn;
-        private final String sn;
-
-        public LDAPUser(String uid, String cn, String sn) {
-            this.uid = uid;
-            this.cn = cn;
-            this.sn = sn;
-        }
-
-        public String getUid() {
-            return uid;
-        }
-
-        public String getCn() {
-            return cn;
-        }
-
-        public String getSn() {
-            return sn;
-        }
-    }
-}
diff --git a/examples/kerberos/src/main/webapp/WEB-INF/keycloak.json b/examples/kerberos/src/main/webapp/WEB-INF/keycloak.json
deleted file mode 100644
index 7e9d91a7da..0000000000
--- a/examples/kerberos/src/main/webapp/WEB-INF/keycloak.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-  "realm" : "kerberos-demo",
-  "resource" : "kerberos-app",
-  "auth-server-url": "/auth",
-  "ssl-required" : "external",
-  "credentials": {
-      "secret": "password"
-  }
-}
\ No newline at end of file
diff --git a/examples/kerberos/src/main/webapp/WEB-INF/web.xml b/examples/kerberos/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 79d0ddd64b..0000000000
--- a/examples/kerberos/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
-
-    kerberos-portal
-
-    
-        
-            KerberosApp
-            /*
-        
-        
-            user
-        
-    
-
-    
-
-    
-        KEYCLOAK
-        does-not-matter
-    
-
-    
-        user
-    
-
\ No newline at end of file
diff --git a/examples/kerberos/src/main/webapp/index.jsp b/examples/kerberos/src/main/webapp/index.jsp
deleted file mode 100644
index 62c39567ef..0000000000
--- a/examples/kerberos/src/main/webapp/index.jsp
+++ /dev/null
@@ -1,36 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
-         pageEncoding="ISO-8859-1" %>
-<%@ page import="org.keycloak.common.util.KeycloakUriBuilder" %>
-<%@ page import="org.keycloak.constants.ServiceUrlConstants" %>
-<%@ page import="org.keycloak.example.kerberos.GSSCredentialsClient" %>
-<%@ page session="false" %>
-
-
-
-    
-        Kerberos Credentials Delegation Example
-    
-    
-        

Kerberos Credentials Delegation Example

-
- -<% - String logoutUri = KeycloakUriBuilder.fromUri("/auth").path(ServiceUrlConstants.TOKEN_SERVICE_LOGOUT_PATH) - .build("kerberos-demo").toString(); -%> - Details about user from LDAP | Logout
-
-<% - try { - GSSCredentialsClient.LDAPUser ldapUser = GSSCredentialsClient.getUserFromLDAP(request); - out.println("

uid: " + ldapUser.getUid() + "

"); - out.println("

cn: " + ldapUser.getCn() + "

"); - out.println("

sn: " + ldapUser.getSn() + "

"); - } catch (Exception e) { - e.printStackTrace(); - out.println("There was a failure in retrieve GSS credential or invoking LDAP. Check server.log for more details"); - } -%> - - \ No newline at end of file diff --git a/examples/ldap/README.md b/examples/ldap/README.md deleted file mode 100644 index e4ff88ab9a..0000000000 --- a/examples/ldap/README.md +++ /dev/null @@ -1,34 +0,0 @@ -Keycloak Example - LDAP -======================= - -This example shows how to configure Keycloak with LDAP and use LDAP for authenticating users into Keycloak and provision data about users. - -Example is using built-in ApacheDS LDAP server with preconfigured LDIF file with some example LDAP data (you can override with your own LDIF file) -and preconfigured realm JSON file with LDAP Federation provider and sample set of preconfigured LDAP mappers and protocol mappers. -This shows mapping of basic LDAP data (username, firstName, lastName, email), but also some custom attributes ( postal code, street) and also -propagation of role mappings from LDAP to the Keycloak. LDAP mappers are used to import data from LDAP user records into user records in Keycloak database. -Then there are protocol mappers, which are used to propagate the data from user record in Keycloak database into the IDToken and Access Token, which is then shown in the example application. - -The example application is then showing all the basic claims of current user together with custom claims and role mappings. - -Detailed steps how to make the example working: - -**1)** Build and deploy this sample's WAR file in `target/ldap-portal.war` . For this example, deploy on the same server that is running the Keycloak Server, -although this is not required for real world scenarios. - - -**2)** Run ApacheDS based LDAP server. You can run the command like this (assuming you're in the "ldap" directory with this example): - -``` -mvn exec:java -Pldap -``` - -This will also automatically import the LDIF from `ldap-example-users.ldif` into the LDAP server. Replace with your own LDIF file if you want different users. - - -**3)** Run Keycloak server and import `ldaprealm.json` into it through admin console. This contains the realm with preconfigured LDAP federation provider and LDAP mappers -and protocol mappers. Note that there are not any roles or users in this file. All of users, roles and role mappings data will be imported automatically from LDAP. - - -**4)** Test the example. In your web browser open `http://localhost:8080/ldap-portal` . You can log in either as `jbrown` with password `password` or as -`bwilson` with password `password` . You can see that access token contains all the claims and role mappings corresponding to the LDAP data provided in LDIF. diff --git a/examples/ldap/ldap-example-users.ldif b/examples/ldap/ldap-example-users.ldif deleted file mode 100644 index 082ee53ce2..0000000000 --- a/examples/ldap/ldap-example-users.ldif +++ /dev/null @@ -1,67 +0,0 @@ -dn: dc=keycloak,dc=org -objectclass: dcObject -objectclass: organization -o: Keycloak -dc: Keycloak - -dn: ou=People,dc=keycloak,dc=org -objectclass: top -objectclass: organizationalUnit -ou: People - -dn: ou=RealmRoles,dc=keycloak,dc=org -objectclass: top -objectclass: organizationalUnit -ou: RealmRoles - -dn: ou=FinanceRoles,dc=keycloak,dc=org -objectclass: top -objectclass: organizationalUnit -ou: FinanceRoles - -dn: uid=jbrown,ou=People,dc=keycloak,dc=org -objectclass: top -objectclass: person -objectclass: organizationalPerson -objectclass: inetOrgPerson -uid: jbrown -cn: James -sn: Brown -mail: jbrown@keycloak.org -postalCode: 88441 -userPassword: password - -dn: uid=bwilson,ou=People,dc=keycloak,dc=org -objectclass: top -objectclass: person -objectclass: organizationalPerson -objectclass: inetOrgPerson -uid: bwilson -cn: Bruce -sn: Wilson -mail: bwilson@keycloak.org -postalCode: 88441 -postalCode: 77332 -postalCode: 66221 -street: Elm 5 -userPassword: password -jpegPhoto:: /9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAMDAwMDAwQEBAQFBQUFBQcHBgYHBwsICQgJCAsRCwwLCwwLEQ8SDw4PEg8bFRMTFRsfGhkaHyYiIiYwLTA+PlQBAwMDAwMDBAQEBAUFBQUFBwcGBgcHCwgJCAkICxELDAsLDAsRDxIPDg8SDxsVExMVGx8aGRofJiIiJjAtMD4+VP/CABEIAFIAWAMBIgACEQEDEQH/xAAdAAACAgMBAQEAAAAAAAAAAAAGCAUHAwQJAgAB/9oACAEBAAAAAElmzK1aOaraUmpiktrD10DayAIMkKunPQdk+hrZwkUNkMrM88VDtt7r7C1KCJtprbSBP2J6K+VDqUlwErkDnOm/HF9IPDaWQ+cP85sXS7OCj1Iybjj2zVvJA0b91BqJ1JuQDYfkuSWrGdFzsMsWkaIUGHh4IuY1glqtWrK8G89YeJk+ldfT1pHz9//EABoBAAIDAQEAAAAAAAAAAAAAAAUHAwYIBAD/2gAIAQIQAAAApKICefJOj5haleI6vyhC1+FEa9UydaFaD7hDLtU9jttBsCJni6f/xAAaAQADAQEBAQAAAAAAAAAAAAAFBgcDBAII/9oACAEDEAAAAF5+Mdc4X6LUuz2kyGquiYYI/PzvUctR8d5289ghjS48fuOK/wD/xAA5EAABAwIEBAMGAwcFAAAAAAABAgMEABEFBhIhEzFBURQiMgdCYXGBwSOhsRUkM3KCkdFSU2J04f/aAAgBAQABPwGHLbkIVbmjmPhSF60BSL2VUPDhLYLjL4KuotyP0NQPZq5iWBmUiWPGFarIV/DIHS/MGpeC4lhrnh5MdxLgJBuna/wPWsFyW2/kVaH2/wB7dK5LSyPMDbb6KtWD+zqBKypKTIZQJ89q4dPNG10f+1GydizuAPSSgstwlHiawQVnVby/LrTrfBOkqF6gyW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TlfX6aNL37ZqG49CurT0UnWzE8obKay/hPNWtXpdqhSFdV7qsoqmrStqq+cj4WuYPB5SVfu7twJWmAXDKhnT7COKslxnW6cMtvIg0qIW22Pav7i2hwOq7EdF3VujZJiuI+MnrzDVuO30owEmtvuq/lVrh+2G1dbZLfbkDBceDW4iEmlM99SVFVhY7e6l6e5KhLTtmjXAFafQTbwuyjsua454JC4223QLXHajNhJQnhBNO2MZ/NWLl0/Luk39Q2rcQeu2Cki6s9gJK4e5ZXNqUSzxT9KXWbcHOC2T0qlcPWz+k2dmC+YPi1kQXTjLefShJ7pTUiO2pAaIqpjG2MJQft/irl+9Ka+4XwtJ9qmu4/NF99z4D/mv/xAAsEQACAQMCBAUDBQAAAAAAAAABAgMABBEFEgYhMUETFCIycVFSYRUzNGJy/9oACAEDAQE/AE09bmQ+F8kNWhcIsrs9wAYmHp+vMVYcIx291cO+JInQqoPXJ61c8MWzW6Rx5HhoQP7HHKtZ0W5tMJMMhjkN8V5B/uFcM2EodZDAjxMNpY9qtoRyIxtHUVLNawYyBQEM6+nGcVxVFB5F96bmHsI7ZokZ61wdEP0pJcDdJzPqzSnZESprWricTAktWgtNtBfJJ7GtRtYZonWRAQQeXatdsXtr90VNoxyAbIrhDXbaJYrKO1IZurA5yfqajYk7GwAwqWxikOSVNJFHbx5BBP4q9uikEojdC/hnCEg1LNHM5Zwuc9xWnRywSq8UrJjmDitP4ha2neS6kYnwiFB+7NXvFFtawxEOrTPtJUdgetapxVBDZFrdwZPSy5/PUGtS1iO7n8xEGQuPUuT1qEhgx25yerVb9Kv/AHU/8l/8VcftrSe5fmovYK//2Q== - -dn: cn=ldap-user,ou=RealmRoles,dc=keycloak,dc=org -objectclass: top -objectclass: groupOfNames -cn: ldap-user -member: uid=jbrown,ou=People,dc=keycloak,dc=org -member: uid=bwilson,ou=People,dc=keycloak,dc=org - -dn: cn=ldap-admin,ou=RealmRoles,dc=keycloak,dc=org -objectclass: top -objectclass: groupOfNames -cn: ldap-admin -member: uid=jbrown,ou=People,dc=keycloak,dc=org - -dn: cn=accountant,ou=FinanceRoles,dc=keycloak,dc=org -objectclass: top -objectclass: groupOfNames -cn: accountant -member: uid=bwilson,ou=People,dc=keycloak,dc=org diff --git a/examples/ldap/ldaprealm.json b/examples/ldap/ldaprealm.json deleted file mode 100644 index 600d08758a..0000000000 --- a/examples/ldap/ldaprealm.json +++ /dev/null @@ -1,290 +0,0 @@ -{ - "id": "ldap-demo", - "realm": "ldap-demo", - "enabled": true, - "sslRequired": "external", - "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" ], - "clients": [ - { - "clientId": "finance", - "enabled": true, - "bearerOnly": true - }, - { - "clientId": "ldap-app", - "enabled": true, - "baseUrl": "/ldap-portal", - "redirectUris": [ - "/ldap-portal/*" - ], - "adminUrl": "/ldap-portal", - "secret": "password", - "fullScopeAllowed": true, - "protocolMappers": [ - { - "protocolMapper" : "oidc-usermodel-property-mapper", - "protocol" : "openid-connect", - "name" : "username", - "config" : { - "Claim JSON Type" : "String", - "user.attribute" : "username", - "claim.name" : "preferred_username", - "id.token.claim" : "true", - "access.token.claim" : "true" - } - }, - { - "protocolMapper" : "oidc-full-name-mapper", - "protocol" : "openid-connect", - "name" : "full name", - "config" : { - "id.token.claim" : "true", - "access.token.claim" : "true" - } - }, - { - "protocolMapper" : "oidc-usermodel-property-mapper", - "protocol" : "openid-connect", - "name" : "given name", - "config" : { - "Claim JSON Type" : "String", - "user.attribute" : "firstName", - "claim.name" : "given_name", - "id.token.claim" : "true", - "access.token.claim" : "true" - } - }, - { - "protocolMapper" : "oidc-usermodel-property-mapper", - "protocol" : "openid-connect", - "name" : "family name", - "config" : { - "Claim JSON Type" : "String", - "user.attribute" : "lastName", - "claim.name" : "family_name", - "id.token.claim" : "true", - "access.token.claim" : "true" - } - }, - { - "protocolMapper" : "oidc-usermodel-property-mapper", - "protocol" : "openid-connect", - "name" : "email", - "config" : { - "Claim JSON Type" : "String", - "user.attribute" : "email", - "claim.name" : "email", - "id.token.claim" : "true", - "access.token.claim" : "true" - } - }, - { - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "protocol" : "openid-connect", - "name" : "postal code", - "config" : { - "Claim JSON Type" : "String", - "user.attribute" : "postal_code", - "claim.name" : "postal_code", - "multivalued": "true", - "id.token.claim" : "true", - "access.token.claim" : "true" - } - }, - { - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "protocol" : "openid-connect", - "name" : "street", - "config" : { - "Claim JSON Type" : "String", - "user.attribute" : "street", - "claim.name" : "street", - "multivalued": "false", - "id.token.claim" : "true", - "access.token.claim" : "true" - } - }, - { - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "protocol" : "openid-connect", - "name" : "picture", - "config" : { - "Claim JSON Type" : "String", - "user.attribute" : "picture", - "claim.name" : "picture", - "multivalued": "false", - "id.token.claim" : "true", - "access.token.claim" : "true" - } - } - ] - } - ], - "userFederationProviders": [ - { - "displayName": "ldap-apacheds", - "providerName": "ldap", - "priority": 1, - "fullSyncPeriod": -1, - "changedSyncPeriod": -1, - "config": { - "pagination" : "true", - "debug" : "false", - "searchScope" : "1", - "connectionPooling" : "true", - "usersDn" : "ou=People,dc=keycloak,dc=org", - "userObjectClasses" : "inetOrgPerson, organizationalPerson", - "usernameLDAPAttribute" : "uid", - "bindDn" : "uid=admin,ou=system", - "bindCredential" : "secret", - "rdnLDAPAttribute" : "uid", - "vendor" : "other", - "editMode" : "WRITABLE", - "uuidLDAPAttribute" : "entryUUID", - "connectionUrl" : "ldap://localhost:10389", - "syncRegistrations" : "true", - "authType" : "simple" - } - } - ], - "userFederationMappers" : [ - { - "name" : "username", - "federationMapperType" : "user-attribute-ldap-mapper", - "federationProviderDisplayName" : "ldap-apacheds", - "config" : { - "ldap.attribute" : "uid", - "user.model.attribute" : "username", - "is.mandatory.in.ldap" : "true", - "read.only" : "false", - "always.read.value.from.ldap" : "false" - } - }, - { - "name" : "first name", - "federationMapperType" : "user-attribute-ldap-mapper", - "federationProviderDisplayName" : "ldap-apacheds", - "config" : { - "ldap.attribute" : "cn", - "user.model.attribute" : "firstName", - "is.mandatory.in.ldap" : "true", - "read.only" : "false", - "always.read.value.from.ldap" : "false" - } - }, - { - "name" : "last name", - "federationMapperType" : "user-attribute-ldap-mapper", - "federationProviderDisplayName" : "ldap-apacheds", - "config" : { - "ldap.attribute" : "sn", - "user.model.attribute" : "lastName", - "is.mandatory.in.ldap" : "true", - "read.only" : "false", - "always.read.value.from.ldap" : "false" - } - }, - { - "name" : "email", - "federationMapperType" : "user-attribute-ldap-mapper", - "federationProviderDisplayName" : "ldap-apacheds", - "config" : { - "ldap.attribute" : "mail", - "user.model.attribute" : "email", - "is.mandatory.in.ldap" : "false", - "read.only" : "false", - "always.read.value.from.ldap" : "false" - } - }, - { - "name" : "creation date", - "federationMapperType" : "user-attribute-ldap-mapper", - "federationProviderDisplayName" : "ldap-apacheds", - "config" : { - "ldap.attribute" : "createTimestamp", - "user.model.attribute" : "createTimestamp", - "is.mandatory.in.ldap" : "false", - "read.only" : "true", - "always.read.value.from.ldap" : "false" - } - }, - { - "name" : "modify date", - "federationMapperType" : "user-attribute-ldap-mapper", - "federationProviderDisplayName" : "ldap-apacheds", - "config" : { - "ldap.attribute" : "modifyTimestamp", - "user.model.attribute" : "modifyTimestamp", - "is.mandatory.in.ldap" : "false", - "read.only" : "true", - "always.read.value.from.ldap" : "false" - } - }, - { - "name" : "postal code", - "federationMapperType" : "user-attribute-ldap-mapper", - "federationProviderDisplayName" : "ldap-apacheds", - "config" : { - "ldap.attribute" : "postalCode", - "user.model.attribute" : "postal_code", - "is.mandatory.in.ldap" : "false", - "read.only" : "false", - "always.read.value.from.ldap" : "false" - } - }, - { - "name" : "street", - "federationMapperType" : "user-attribute-ldap-mapper", - "federationProviderDisplayName" : "ldap-apacheds", - "config" : { - "ldap.attribute" : "street", - "user.model.attribute" : "street", - "is.mandatory.in.ldap" : "false", - "read.only" : "false", - "always.read.value.from.ldap" : "false" - } - }, - { - "name" : "picture", - "federationMapperType" : "user-attribute-ldap-mapper", - "federationProviderDisplayName" : "ldap-apacheds", - "config" : { - "ldap.attribute" : "jpegPhoto", - "user.model.attribute" : "picture", - "is.mandatory.in.ldap" : "false", - "read.only" : "false", - "always.read.value.from.ldap" : "true", - "is.binary.attribute" : "true" - } - }, - { - "name" : "realm roles", - "federationMapperType" : "role-ldap-mapper", - "federationProviderDisplayName" : "ldap-apacheds", - "config" : { - "roles.dn" : "ou=RealmRoles,dc=keycloak,dc=org", - "membership.ldap.attribute" : "member", - "role.name.ldap.attribute" : "cn", - "role.object.classes" : "groupOfNames", - "mode" : "LDAP_ONLY", - "use.realm.roles.mapping" : "true" - } - }, - { - "name" : "finance roles", - "federationMapperType" : "role-ldap-mapper", - "federationProviderDisplayName" : "ldap-apacheds", - "config" : { - "roles.dn" : "ou=FinanceRoles,dc=keycloak,dc=org", - "membership.ldap.attribute" : "member", - "role.name.ldap.attribute" : "cn", - "role.object.classes" : "groupOfNames", - "mode" : "LDAP_ONLY", - "use.realm.roles.mapping" : "false", - "client.id" : "finance" - } - } - ] -} \ No newline at end of file diff --git a/examples/ldap/pom.xml b/examples/ldap/pom.xml deleted file mode 100644 index 9e2bd4c205..0000000000 --- a/examples/ldap/pom.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - keycloak-examples-parent - org.keycloak - 999.0.0-SNAPSHOT - - - 4.0.0 - org.keycloak.example.demo - keycloak-examples-ldap - war - LDAP Demo Application - - - - jakarta.servlet - jakarta.servlet-api - provided - - - org.keycloak - keycloak-core - provided - - - org.keycloak - keycloak-util-embedded-ldap - test - - - - - ldap-portal - - - org.jboss.as.plugins - jboss-as-maven-plugin - - false - - - - org.wildfly.plugins - wildfly-maven-plugin - - false - - - - - - - - ldap - - - - org.codehaus.mojo - exec-maven-plugin - - org.keycloak.util.ldap.LDAPEmbeddedServer - test - - - ldap.ldif - ldap-example-users.ldif - - - - - - - - - - diff --git a/examples/ldap/src/main/java/org/keycloak/example/ldap/LDAPPictureServlet.java b/examples/ldap/src/main/java/org/keycloak/example/ldap/LDAPPictureServlet.java deleted file mode 100644 index 688556255f..0000000000 --- a/examples/ldap/src/main/java/org/keycloak/example/ldap/LDAPPictureServlet.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.example.ldap; - -import java.io.IOException; -import java.util.List; - -import jakarta.servlet.ServletException; -import jakarta.servlet.ServletOutputStream; -import jakarta.servlet.http.HttpServlet; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; - -import org.keycloak.KeycloakSecurityContext; -import org.keycloak.common.util.Base64; -import org.keycloak.representations.IDToken; - -/** - * Tests binary LDAP attribute - * - * @author Marek Posolda - */ -public class LDAPPictureServlet extends HttpServlet { - - @Override - protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - resp.setContentType("image/jpeg"); - ServletOutputStream outputStream = resp.getOutputStream(); - - KeycloakSecurityContext securityContext = (KeycloakSecurityContext) req.getAttribute(KeycloakSecurityContext.class.getName()); - IDToken idToken = securityContext.getIdToken(); - - String profilePicture = idToken.getPicture(); - - if (profilePicture != null) { - byte[] decodedPicture = Base64.decode(profilePicture); - outputStream.write(decodedPicture); - } - - outputStream.flush(); - } - -} diff --git a/examples/ldap/src/main/webapp/WEB-INF/keycloak.json b/examples/ldap/src/main/webapp/WEB-INF/keycloak.json deleted file mode 100644 index f43107b054..0000000000 --- a/examples/ldap/src/main/webapp/WEB-INF/keycloak.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "realm" : "ldap-demo", - "resource" : "ldap-app", - "auth-server-url": "/auth", - "ssl-required" : "external", - "credentials": { - "secret": "password" - } -} \ No newline at end of file diff --git a/examples/ldap/src/main/webapp/WEB-INF/web.xml b/examples/ldap/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 64f703ac89..0000000000 --- a/examples/ldap/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - ldap-portal - - - Picture - org.keycloak.example.ldap.LDAPPictureServlet - - - - Picture - /picture/* - - - - - LDAPApp - /* - - - ldap-user - - - - - - - KEYCLOAK - does-not-matter - - - - ldap-user - - \ No newline at end of file diff --git a/examples/ldap/src/main/webapp/index.jsp b/examples/ldap/src/main/webapp/index.jsp deleted file mode 100644 index 72b8c2e8bb..0000000000 --- a/examples/ldap/src/main/webapp/index.jsp +++ /dev/null @@ -1,69 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1" %> -<%@ page import="org.keycloak.KeycloakSecurityContext" %> -<%@ page import="org.keycloak.common.util.KeycloakUriBuilder" %> -<%@ page import="org.keycloak.constants.ServiceUrlConstants" %> -<%@ page import="org.keycloak.representations.AccessToken" %> -<%@ page import="org.keycloak.representations.AccessToken.Access" %> -<%@ page import="org.keycloak.representations.IDToken" %> -<%@ page import="java.util.Map" %> -<%@ page session="false" %> - - - - - LDAP Example - - -

LDAP Example

-
- -<% - String logoutUri = KeycloakUriBuilder.fromUri("/auth").path(ServiceUrlConstants.TOKEN_SERVICE_LOGOUT_PATH) - .build("ldap-demo").toString(); - - KeycloakSecurityContext securityContext = (KeycloakSecurityContext) request.getAttribute(KeycloakSecurityContext.class.getName()); - IDToken idToken = securityContext.getIdToken(); - AccessToken accessToken = securityContext.getToken(); -%> - Logout
-
- - -

ID Token - basic claims

-

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

-

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

-

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

-

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

-

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

- <% if (idToken.getPicture() != null) { %> -

Profile picture:

- <% } %> -
- - -

ID Token - other claims

-<% - for (Map.Entry claim : idToken.getOtherClaims().entrySet()) { -%> -

<%= claim.getKey() %>: <%= claim.getValue().toString() %> -<% - } -%> -


- - -

Access Token - roles

-

Realm roles: <%= accessToken.getRealmAccess().getRoles().toString() %>

-<% - for (Map.Entry acc : accessToken.getResourceAccess().entrySet()) { -%> -

Resource: <%= acc.getKey() %>, Roles: <%= acc.getValue().getRoles().toString() %>

-<% - } -%> -
- - - \ No newline at end of file diff --git a/examples/pom.xml b/examples/pom.xml deleted file mode 100755 index b2a2186f7b..0000000000 --- a/examples/pom.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - keycloak-parent - org.keycloak - 999.0.0-SNAPSHOT - - - Keycloak Examples - - 4.0.0 - - keycloak-examples-parent - pom - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - - - - org.apache.maven.plugins - maven-war-plugin - - false - - - - - - admin-client - providers - js-console - kerberos - themes - saml - ldap - - diff --git a/examples/providers/pom.xml b/examples/providers/pom.xml deleted file mode 100755 index 231b2aa4b8..0000000000 --- a/examples/providers/pom.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - keycloak-examples-parent - org.keycloak - 999.0.0-SNAPSHOT - - - Provider Examples - - 4.0.0 - - keycloak-examples-providers-parent - pom - - - rest - - diff --git a/examples/providers/rest/README.md b/examples/providers/rest/README.md deleted file mode 100644 index f66f1c523f..0000000000 --- a/examples/providers/rest/README.md +++ /dev/null @@ -1,7 +0,0 @@ -Example Realm REST Resource provider -==================================== - -You can deploy the provider by running: `mvn package` and dropping the jar under `$KEYCLOAK_HOME/providers` - -When the server has started, open http://localhost:8080/auth/realms/master/hello and look for the message _Hello master_. -You can also invoke the endpoint for other realms by replacing `master` with the realm name in the above url. diff --git a/examples/providers/rest/pom.xml b/examples/providers/rest/pom.xml deleted file mode 100755 index dead2d3594..0000000000 --- a/examples/providers/rest/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - keycloak-examples-providers-parent - org.keycloak - 999.0.0-SNAPSHOT - - - REST Example - - 4.0.0 - - keycloak-examples-providers-rest - jar - - - - org.keycloak - keycloak-core - provided - - - org.keycloak - keycloak-server-spi - provided - - - org.keycloak - keycloak-server-spi-private - provided - - - jakarta.ws.rs - jakarta.ws.rs-api - - - - - hello-rest-example - - diff --git a/examples/providers/rest/src/main/java/org/keycloak/examples/rest/HelloResourceProvider.java b/examples/providers/rest/src/main/java/org/keycloak/examples/rest/HelloResourceProvider.java deleted file mode 100644 index 3d70f5f6de..0000000000 --- a/examples/providers/rest/src/main/java/org/keycloak/examples/rest/HelloResourceProvider.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.examples.rest; - -import org.keycloak.models.KeycloakSession; -import org.keycloak.services.resource.RealmResourceProvider; - -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.Produces; - -/** - * @author Stian Thorgersen - */ -public class HelloResourceProvider implements RealmResourceProvider { - - private KeycloakSession session; - - public HelloResourceProvider(KeycloakSession session) { - this.session = session; - } - - @Override - public Object getResource() { - return this; - } - - @GET @Path("") - @Produces("text/plain; charset=utf-8") - public String get() { - String name = session.getContext().getRealm().getDisplayName(); - if (name == null) { - name = session.getContext().getRealm().getName(); - } - return "Hello " + name; - } - - @Override - public void close() { - } - -} diff --git a/examples/providers/rest/src/main/java/org/keycloak/examples/rest/HelloResourceProviderFactory.java b/examples/providers/rest/src/main/java/org/keycloak/examples/rest/HelloResourceProviderFactory.java deleted file mode 100644 index 584a90f515..0000000000 --- a/examples/providers/rest/src/main/java/org/keycloak/examples/rest/HelloResourceProviderFactory.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.examples.rest; - -import org.keycloak.Config.Scope; -import org.keycloak.models.KeycloakSession; -import org.keycloak.models.KeycloakSessionFactory; -import org.keycloak.services.resource.RealmResourceProvider; -import org.keycloak.services.resource.RealmResourceProviderFactory; - -/** - * @author Stian Thorgersen - */ -public class HelloResourceProviderFactory implements RealmResourceProviderFactory { - - public static final String ID = "hello"; - - @Override - public String getId() { - return ID; - } - - @Override - public RealmResourceProvider create(KeycloakSession session) { - return new HelloResourceProvider(session); - } - - @Override - public void init(Scope config) { - } - - @Override - public void postInit(KeycloakSessionFactory factory) { - } - - @Override - public void close() { - } - -} diff --git a/examples/providers/rest/src/main/resources/META-INF/beans.xml b/examples/providers/rest/src/main/resources/META-INF/beans.xml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/examples/providers/rest/src/main/resources/META-INF/services/org.keycloak.services.resource.RealmResourceProviderFactory b/examples/providers/rest/src/main/resources/META-INF/services/org.keycloak.services.resource.RealmResourceProviderFactory deleted file mode 100644 index 3d053e0047..0000000000 --- a/examples/providers/rest/src/main/resources/META-INF/services/org.keycloak.services.resource.RealmResourceProviderFactory +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright 2016 Red Hat, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -org.keycloak.examples.rest.HelloResourceProviderFactory \ No newline at end of file diff --git a/examples/saml/README.md b/examples/saml/README.md deleted file mode 100755 index df85871049..0000000000 --- a/examples/saml/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# Keycloak SAML - -## Introduction - -These examples show using Keycloak Server's SAML support with Keycloak's SAML client adapter. These examples run on JBoss Enterprise Application Platform 6 or WildFly. - -We recommend using the Keycloak Demo Distribution to test the examples as it has already some things pre-set for you. -There is individual README.md file specific for each example. Here are just some general info about the requirements for running the examples. - -## Start the Demo Distribution - -See the documentation for more details. - -## Import the test realm - -Next thing you have to do is import the test realm for these examples. Clicking on the below link will bring you to the -create realm page in the Admin UI. The username/password is admin/admin to login in. Keycloak will ask you to -create a new admin password before you can go to the create realm page. - -[http://localhost:8080/auth/admin/master/console/#/create/realm](http://localhost:8080/auth/admin/master/console/#/create/realm) - -Import the testsaml.json file that is in the saml/ example directory. - -## Build and Deploy - -``` -$ mvn clean install wildfly:deploy -``` - diff --git a/examples/saml/pom.xml b/examples/saml/pom.xml deleted file mode 100755 index c65cff5ac2..0000000000 --- a/examples/saml/pom.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - keycloak-examples-parent - org.keycloak - 999.0.0-SNAPSHOT - - - SAML Examples - - 4.0.0 - - keycloak-examples-saml-parent - pom - - - servlet-filter - - diff --git a/examples/saml/servlet-filter/README.md b/examples/saml/servlet-filter/README.md deleted file mode 100755 index e9424ffd39..0000000000 --- a/examples/saml/servlet-filter/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# Keycloak SAML Client Adapter using HTTP POST Binding With Signatures - -## Introduction - -Basic example that demonstrates how to set up an application as a SAML v2.0 Service Provider using SAML HTTP POST Binding with Signature Support. This example uses the Keycloak Servlet Filter to accomplish this -Note that no role checks are done with the servlet filter. You would have to do this manually. - -## Import the test realm - -If you haven't already done so, you need to import the test realm for this example. Clicking on the below link will bring you to the -create realm page in the Admin UI. The username/password is admin/admin to login in. Keycloak will ask you to -create a new admin password before you can go to the create realm page. - -[http://localhost:8080/auth/admin/master/console/#/create/realm](http://localhost:8080/auth/admin/master/console/#/create/realm) - -Import the testsaml.json file that is in the saml/ example directory. - -## Build and Deploy - -``` -$ mvn clean install wildfly:deploy -``` - -## Access the application - -The application will be running at the following URL: . Login with: - - username: bburke - password: password - - diff --git a/examples/saml/servlet-filter/pom.xml b/examples/saml/servlet-filter/pom.xml deleted file mode 100755 index 3b48824ae0..0000000000 --- a/examples/saml/servlet-filter/pom.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - 4.0.0 - - - keycloak-examples-saml-parent - org.keycloak - 999.0.0-SNAPSHOT - - - saml-servlet-filter - - war - - Keycloak SAML Adapter as a Servlet Filter - - - - Apache License, Version 2.0 - repo - http://www.apache.org/licenses/LICENSE-2.0.html - - - - - org.keycloak - keycloak-saml-servlet-filter-adapter - - - org.keycloak - keycloak-crypto-default - - - - - - ${project.artifactId} - - - org.jboss.as.plugins - jboss-as-maven-plugin - - false - - - - org.wildfly.plugins - wildfly-maven-plugin - - false - - - - - \ No newline at end of file diff --git a/examples/saml/servlet-filter/src/main/webapp/META-INF/jboss-deployment-structure.xml b/examples/saml/servlet-filter/src/main/webapp/META-INF/jboss-deployment-structure.xml deleted file mode 100644 index b2ee9668db..0000000000 --- a/examples/saml/servlet-filter/src/main/webapp/META-INF/jboss-deployment-structure.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/examples/saml/servlet-filter/src/main/webapp/WEB-INF/keycloak-saml.xml b/examples/saml/servlet-filter/src/main/webapp/WEB-INF/keycloak-saml.xml deleted file mode 100755 index dd9db242dc..0000000000 --- a/examples/saml/serv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GVzLXBvc3Qtc2lnLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1RvGu8RjemSJA23nnMksoHA37MqY1DDTxOECY4rPAd9egr7GUNIXE0y1MokaR5R2crNpN8RIRwR8phQtQDjXL82c6W+NLQISxztarQJ7rdNJIYwHY0d5ri1XRpDP8zAuxubPYiMAVYcDkIcvlbBpwh/dRM5I2eElRK+eSiaMkCUCAwEAATANBgkqhkiG9w0BAQsFAAOBgQCLms6htnPaY69k1ntm9a5jgwSn/K61cdai8R8B0ccY7zvinn9AfRD7fiROQpFyY29wKn8WCLrJ86NBXfgFUGyR5nLNHVy3FghE36N2oHy53uichieMxffE6vhkKJ4P8ChfJMMOZlmCPsQPDvjoAghHt4mriFiQgRdPgIy/zDjSNw== - - - - - - - - - diff --git a/examples/saml/servlet-filter/src/main/webapp/WEB-INF/web.xml b/examples/saml/servlet-filter/src/main/webapp/WEB-INF/web.xml deleted file mode 100755 index 3e11f57843..0000000000 --- a/examples/saml/servlet-filter/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - saml-servlet-filter - - Keycloak Filter - org.keycloak.adapters.saml.servlet.SamlFilter - - - Keycloak Filter - /saml - /protected/* - - diff --git a/examples/saml/servlet-filter/src/main/webapp/css/idp.css b/examples/saml/servlet-filter/src/main/webapp/css/idp.css deleted file mode 100755 index f0afa32b13..0000000000 --- a/examples/saml/servlet-filter/src/main/webapp/css/idp.css +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -body { - background: url(images/rh_bg.png) repeat-x scroll 0 0 #F3F3F3; - color: #555555; - font: 12px/1.4 "Lucida Sans Unicode", "Lucida Grande", sans-serif; -} - -.loginBox { - position:absolute; - top: 50%; - left: 50%; - width:30em; - height:3em; - margin-top: -9em; /*set to a negative number 1/2 of your height*/ - margin-left: -15em; /*set to a negative number 1/2 of your width*/ - border: 1px solid #ccc; - background-color: #f3f3f3; -} - -.wrapper { - margin-left: auto; - margin-right: auto; - width: 50em; - text-align: left; -} - -a { - text-decoration: none; - color: #5e8a9a; -} - -h1 { - padding-top: 20px; - color: #7b1e1e; -} - -a:hover { - text-decoration: underline; - color: #8ec6d9; -} - -.content { - margin-left: 230px; -} - -.dualbrand { - padding-top: 20px; -} - -.as7 { - float: left; - margin-left: 10px; -} - -.note { - font-size: 8pt; - color: #aaaaaa; -} \ No newline at end of file diff --git a/examples/saml/servlet-filter/src/main/webapp/error.jsp b/examples/saml/servlet-filter/src/main/webapp/error.jsp deleted file mode 100755 index 71ef06000c..0000000000 --- a/examples/saml/servlet-filter/src/main/webapp/error.jsp +++ /dev/null @@ -1,38 +0,0 @@ - - - - - -PicketLink Example Application - - - - - - -
-
-

- The Service Provider could not process the request. -

-
-
- - diff --git a/examples/saml/servlet-filter/src/main/webapp/favicon.ico b/examples/saml/servlet-filter/src/main/webapp/favicon.ico deleted file mode 100755 index c31d0fa862..0000000000 Binary files a/examples/saml/servlet-filter/src/main/webapp/favicon.ico and /dev/null differ diff --git a/examples/saml/servlet-filter/src/main/webapp/images/bkg.gif b/examples/saml/servlet-filter/src/main/webapp/images/bkg.gif deleted file mode 100755 index 523877c087..0000000000 Binary files a/examples/saml/servlet-filter/src/main/webapp/images/bkg.gif and /dev/null differ diff --git a/examples/saml/servlet-filter/src/main/webapp/images/keycloak_default_banner-1180px.png b/examples/saml/servlet-filter/src/main/webapp/images/keycloak_default_banner-1180px.png deleted file mode 100755 index 10ef213a75..0000000000 Binary files a/examples/saml/servlet-filter/src/main/webapp/images/keycloak_default_banner-1180px.png and /dev/null differ diff --git a/examples/saml/servlet-filter/src/main/webapp/images/rh_bg.png b/examples/saml/servlet-filter/src/main/webapp/images/rh_bg.png deleted file mode 100755 index b0e6a006d0..0000000000 Binary files a/examples/saml/servlet-filter/src/main/webapp/images/rh_bg.png and /dev/null differ diff --git a/examples/saml/servlet-filter/src/main/webapp/index.jsp b/examples/saml/servlet-filter/src/main/webapp/index.jsp deleted file mode 100755 index 66692108ab..0000000000 --- a/examples/saml/servlet-filter/src/main/webapp/index.jsp +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - Page Redirection - - -If you are not redirected automatically, follow the link to example - - \ No newline at end of file diff --git a/examples/saml/servlet-filter/src/main/webapp/logout.jsp b/examples/saml/servlet-filter/src/main/webapp/logout.jsp deleted file mode 100755 index 0c24edf998..0000000000 --- a/examples/saml/servlet-filter/src/main/webapp/logout.jsp +++ /dev/null @@ -1,38 +0,0 @@ - - - - - -Keycloak SAML Client Adapter Example Application - - - - - - -
-
-

- Logged out. Login again. -

-
-
- - diff --git a/examples/saml/servlet-filter/src/main/webapp/protected/chart.jsp b/examples/saml/servlet-filter/src/main/webapp/protected/chart.jsp deleted file mode 100755 index cae2feac02..0000000000 --- a/examples/saml/servlet-filter/src/main/webapp/protected/chart.jsp +++ /dev/null @@ -1,15 +0,0 @@ -
-

SalesTool

-
-Welcome to the Sales Tool, <%=request.getUserPrincipal().getName()%> -
- Click to LogOut -
-
-Here is your sales chart: -
- - -
- -
diff --git a/examples/saml/servlet-filter/src/main/webapp/protected/piechart.gif b/examples/saml/servlet-filter/src/main/webapp/protected/piechart.gif deleted file mode 100755 index 57bfe37752..0000000000 Binary files a/examples/saml/servlet-filter/src/main/webapp/protected/piechart.gif and /dev/null differ diff --git a/examples/saml/testsaml.json b/examples/saml/testsaml.json deleted file mode 100755 index aae0eb357c..0000000000 --- a/examples/saml/testsaml.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "id": "saml-demo", - "realm": "saml-demo", - "enabled": true, - "sslRequired": "external", - "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" ], - "defaultRoles": [ "user" ], - "smtpServer": { - "from": "auto@keycloak.org", - "host": "localhost", - "port":"3025" - }, - "users" : [ - { - "username" : "bburke", - "enabled": true, - "email" : "bburke@redhat.com", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": ["manager"] - } - ], - "clients": [ - { - "clientId": "http://localhost:8080/sales-post-sig/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8080/sales-post-sig/", - "adminUrl": "http://localhost:8080/sales-post-sig/saml", - "redirectUris": [ - "http://localhost:8080/sales-post-sig/*" - ], - "attributes": { - "saml.server.signature": "true", - "saml.signature.algorithm": "RSA_SHA256", - "saml.client.signature": "true", - "saml.authnstatement": "true", - "saml.signing.private.key": "MIICWwIBAAKBgQDVG8a7xGN6ZIkDbeecySygcDfsypjUMNPE4QJjis8B316CvsZQ0hcTTLUyiRpHlHZys2k3xEhHBHymFC1AONcvzZzpb40tAhLHO1qtAnut00khjAdjR3muLVdGkM/zMC7G5s9iIwBVhwOQhy+VsGnCH91EzkjZ4SVEr55KJoyQJQIDAQABAoGADaTtoG/+foOZUiLjRWKL/OmyavK9vjgyFtThNkZY4qHOh0h3og0RdSbgIxAsIpEa1FUwU2W5yvI6mNeJ3ibFgCgcxqPk6GkAC7DWfQfdQ8cS+dCuaFTs8ObIQEvU50YzeNPiiFxRA+MnauCUXaKm/PnDfjd4tPgru7XZvlGh0wECQQDsBbN2cKkBKpr/b5oJiBcBaSZtWiMNuYBDn9x8uORj+Gy/49BUIMHF2EWyxOWz6ocP5YiynNRkPe21Zus7PEr1AkEA5yWQOkxUTIg43s4pxNSeHtL+Ebqcg54lY2xOQK0yufxUVZI8ODctAKmVBMiCKpU3mZQquOaQicuGtocpgxlScQI/YM31zZ5nsxLGf/5GL6KhzPJT0IYn2nk7IoFu7bjn9BjwgcPurpLA52TNMYWQsTqAKwT6DEhG1NaRqNWNpb4VAkBehObAYBwMm5udyHIeEc+CzUalm0iLLa0eRdiN7AUVNpCJ2V2Uo0NcxPux1AgeP5xXydXafDXYkwhINWcNO9qRAkEA58ckAC5loUGwU5dLaugsGH/a2Q8Ac8bmPglwfCstYDpl8Gp/eimb1eKyvDEELOhyImAv4/uZV9wN85V0xZXWsw==", - "saml.signing.certificate": "MIIB1DCCAT0CBgFJGP5dZDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1zaWcvMB4XDTE0MTAxNjEyNDQyM1oXDTI0MTAxNjEyNDYwM1owMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3Qtc2lnLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1RvGu8RjemSJA23nnMksoHA37MqY1DDTxOECY4rPAd9egr7GUNIXE0y1MokaR5R2crNpN8RIRwR8phQtQDjXL82c6W+NLQISxztarQJ7rdNJIYwHY0d5ri1XRpDP8zAuxubPYiMAVYcDkIcvlbBpwh/dRM5I2eElRK+eSiaMkCUCAwEAATANBgkqhkiG9w0BAQsFAAOBgQCLms6htnPaY69k1ntm9a5jgwSn/K61cdai8R8B0ccY7zvinn9AfRD7fiROQpFyY29wKn8WCLrJ86NBXfgFUGyR5nLNHVy3FghE36N2oHy53uichieMxffE6vhkKJ4P8ChfJMMOZlmCPsQPDvjoAghHt4mriFiQgRdPgIy/zDjSNw==" - } - }, - { - "clientId": "http://localhost:8080/saml-servlet-filter/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8080/saml-servlet-filter/", - "adminUrl": "http://localhost:8080/saml-servlet-filter/saml", - "redirectUris": [ - "http://localhost:8080/saml-servlet-filter/*" - ], - "attributes": { - "saml.server.signature": "true", - "saml.signature.algorithm": "RSA_SHA256", - "saml.client.signature": "true", - "saml.authnstatement": "true", - "saml.signing.private.key": "MIICWwIBAAKBgQDVG8a7xGN6ZIkDbeecySygcDfsypjUMNPE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GUNIXE0y1MokaR5R2crNpN8RIRwR8phQtQDjXL82c6W+NLQISxztarQJ7rdNJIYwHY0d5ri1XRpDP8zAuxubPYiMAVYcDkIcvlbBpwh/dRM5I2eElRK+eSiaMkCUCAwEAATANBgkqhkiG9w0BAQsFAAOBgQCLms6htnPaY69k1ntm9a5jgwSn/K61cdai8R8B0ccY7zvinn9AfRD7fiROQpFyY29wKn8WCLrJ86NBXfgFUGyR5nLNHVy3FghE36N2oHy53uichieMxffE6vhkKJ4P8ChfJMMOZlmCPsQPDvjoAghHt4mriFiQgRdPgIy/zDjSNw==" - } - }, - { - "clientId": "http://localhost:8080/sales-post-enc/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8080/sales-post-enc/", - "adminUrl": "http://localhost:8080/sales-post-enc/saml", - "redirectUris": [ - "http://localhost:8080/sales-post-enc/*" - ], - "attributes": { - "saml.server.signature": "true", - "saml.signature.algorithm": "RSA_SHA512", - "saml.client.signature": "true", - "saml.encrypt": "true", - "saml.authnstatement": "true", - "saml.signing.private.key": "MIICXQIBAAKBgQDb7kwJPkGdU34hicplwfp6/WmNcaLh94TSc7Jyr9Undp5pkyLgb0DE7EIE+6kSs4LsqCb8HDkB0nLD5DXbBJFd8n0WGoKstelvtg6FtVJMnwN7k7yZbfkPECWH9zF70VeOo9vbzrApNRnct8ZhH5fbflRB4JMA9L9R+LbURdoSKQIDAQABAoGBANtbZG9bruoSGp2s5zhzLzd4hczT6Jfk3o9hYjzNb5Z60ymN3Z1omXtQAdEiiNHkRdNxK+EM7TcKBfmoJqcaeTkW8cksVEAW23ip8W9/XsLqmbU2mRrJiKa+KQNDSHqJi1VGyimi4DDApcaqRZcaKDFXg2KDr/Qt5JFD/o9IIIPZAkEA+ZENdBIlpbUfkJh6Ln+bUTss/FZ1FsrcPZWu13rChRMrsmXsfzu9kZUWdUeQ2Dj5AoW2Q7L/cqdGXS7Mm5XhcwJBAOGZq9axJY5YhKrsksvYRLhQbStmG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dJyw+Q12wSRXfJ9FhqCrLXpb7YOhbVSTJ8De5O8mW35DxAlh/cxe9FXjqPb286wKTUZ3LfGYR+X235UQeCTAPS/Ufi21EXaEikCAwEAATANBgkqhkiG9w0BAQsFAAOBgQBMrfGD9QFfx5v7ld/OAto5rjkTe3R1Qei8XRXfcs83vLaqEzjEtTuLGrJEi55kXuJgBpVmQpnwCCkkjSy0JxbqLDdVi9arfWUxEGmOr01ZHycELhDNaQcFqVMPr5kRHIHgktT8hK2IgCvd3Fy9/JCgUgCPxKfhwecyEOKxUc857g==" - } - }, - { - "clientId": "http://localhost:8080/employee-sig/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8080/employee-sig/", - "adminUrl": "http://localhost:8080/employee-sig/saml", - "redirectUris": [ - "http://localhost:8080/employee-sig/*" - ], - "attributes": { - "saml.server.signature": "true", - "saml.client.signature": "true", - "saml.signature.algorithm": "RSA_SHA1", - "saml.authnstatement": "true", - "saml.signing.private.key": "MIICXQIBAAKBgQC+9kVgPFpshjS2aT2g52lqTv2lqb1jgvXZVk7iFF4LAO6SdCXKXRZI4SuzIRkVNpE1a42V1kQRlaozoFklgvX5sje8tkpa9ylq+bxGXM9RRycqRu2B+oWUV7Aqq7Bs0Xud0WeHQYRcEoCjqsFKGy65qkLRDdT70FTJgpSHts+gDwIDAQABAoGANU1efgc6ojIvwn7Lsf8GAKN9z2D6uS0T3I9nw1k2CtI+xWhgKAUltEANx5lEfBRYIdYclidRpqrk8DYgzASrDYTHXzqVBJfAk1VrAGpqyRq+TNMLUHkXiTiSDOQ6WqhX93UGMmAgQm1RsLa6+fy1BO/B2y85+Yf2OUylsKS6avECQQDslRDiNFdtEjdvyOL20tQ7+W+eKVxVxKAyQ3gFjIIDizELZt+Jq1Wz6XV9NhK1JFtlVugeD1tlW/+K16fEmDYXAkEAzqKoN/JeGb20rfQldAUWdQbb0jrQAYlgoSU/9fYH9YVJT8vnkfhPBTwIw9H9euf1//lRP/jHltHd5ch4230YyQJBAN3rOkoltPiABPZbpuLGgwS7BwOCYrWlWmurtBLoaTCvyVKbrgXybNL1pBrOtR+rufvGWLeRyja65Gs1vY6BBQMCQQCTsNq/MjJj/522f7yNUl2cw4w2lOa7Um+IflFbAcDqkZu2ty0Kvgns2d4B6INeZ5ECpjaWnMA7YkFRzZnkd2NRAkB8lEY56ScnNigoZkkjtEUd2ejdhZPYuS9SKfv9zHwN+I+DE2vVFZz8GPq/iLcMx13PkZaYaJNQ4FtQY/hRLSn5", - "saml.signing.certificate": "MIIB0DCCATkCBgFJH5u0EDANBgkqhkiG9w0BAQsFADAuMSwwKgYDVQQDEyNodHRwOi8vbG9jYWxob3N0OjgwODAvZW1wbG95ZWUtc2lnLzAeFw0xNDEwMTcxOTMzNThaFw0yNDEwMTcxOTM1MzhaMC4xLDAqBgNVBAMTI2h0dHA6Ly9sb2NhbGhvc3Q6ODA4MC9lbXBsb3llZS1zaWcvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+9kVgPFpshjS2aT2g52lqTv2lqb1jgvXZVk7iFF4LAO6SdCXKXRZI4SuzIRkVNpE1a42V1kQRlaozoFklgvX5sje8tkpa9ylq+bxGXM9RRycqRu2B+oWUV7Aqq7Bs0Xud0WeHQYRcEoCjqsFKGy65qkLRDdT70FTJgpSHts+gDwIDAQABMA0GCSqGSIb3DQEBCwUAA4GBACKyPLGqMX8GsIrCfJU8eVnpaqzTXMglLVo/nTcfAnWe9UAdVe8N3a2PXpDBvuqNA/DEAhVcQgxdlOTWnB6s8/yLTRuH0bZgb3qGdySif+lU+E7zZ/SiDzavAvn+ABqemnzHcHyhYO+hNRGHvUbW5OAii9Vdjhm8BI32YF1NwhKp" - } - } - ], - "roles" : { - "realm" : [ - { - "name": "manager", - "description": "Have Manager privileges" - } - ] - } -} diff --git a/examples/themes/README.md b/examples/themes/README.md deleted file mode 100644 index 5089ca1e7f..0000000000 --- a/examples/themes/README.md +++ /dev/null @@ -1,55 +0,0 @@ -Example Themes -============== - -Deploy Themes -------------- - -You can either deploy the themes by copying to the themes folder or as modules. - -### Copy - -Simplest way to deploy the themes is to copy `src/main/resources/theme/*` to `themes/`. - -### Module - -Alternatively you can deploy as modules. This can be done by first running: - - mvn clean install - $KEYCLOAK_HOME/bin/jboss-cli.sh --command="module add --name=org.keycloak.example.themes --resources=target/keycloak-example-themes.jar" - -Then open `standalone/configuration/standalone.xml` and register the theme module by adding: - - - ... - - org.keycloak.example.themes - - - -Address Theme -------------------- - -Example theme that adds address fields to registration page, account management and admin console. To enable the theme open the admin console, select your realm, click on `Theme`. In the dropdown for `Login Theme` and `Account Theme` select `address`. Click `Save` and login to the realm to see the new theme in action. - -One thing to note is that to change the admin console for the master admin console (`/auth/admin`) you need to change the theme for the master realm. Changing the admin console theme for any other realms will only change the admin console for that specific realm (for example `/auth/admin/myrealm/console`). - - -Sunrise Login Theme -------------------- - -Example login theme that changes the look of the login forms. To enable the theme open the admin console, select your realm, click on `Theme`. In the dropdown for `Login Theme` select `sunrise`. Click `Save` and login to the realm to see the new theme in action. - - -Change Logo Theme ------------------ - -To enable the theme open the admin console, select your realm, click on `Theme`. In the dropdowns for `Login Theme`, `Account Theme` and `Admin Console Theme` select `logo-example`. Click `Save` and login to the realm to see the new theme in action. - -To change the theme for the welcome pages open `standalone/configuration/standalone.xml` find the config for `theme` and add 'welcomeTheme': - - - ... - logo-example - - -One thing to note is that to change the admin console for the master admin console (`/auth/admin`) you need to change the theme for the master realm. Changing the admin console theme for any other realms will only change the admin console for that specific realm (for example `/auth/admin/myrealm/console`). diff --git a/examples/themes/pom.xml b/examples/themes/pom.xml deleted file mode 100755 index d4190e3ac7..0000000000 --- a/examples/themes/pom.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - keycloak-examples-parent - org.keycloak - 999.0.0-SNAPSHOT - - - Themes Examples - - 4.0.0 - - keycloak-example-themes - jar - - - keycloak-example-themes - - diff --git a/examples/themes/src/main/resources/META-INF/keycloak-themes.json b/examples/themes/src/main/resources/META-INF/keycloak-themes.json deleted file mode 100644 index aafb6e883c..0000000000 --- a/examples/themes/src/main/resources/META-INF/keycloak-themes.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "themes": [{ - "name" : "address", - "types": [ "admin", "account", "login" ] - }, { - "name" : "logo-example", - "types": [ "admin", "account", "login", "welcome" ] - }, { - "name" : "sunrise", - "types": [ "login" ] - }] -} diff --git a/examples/themes/src/main/resources/theme/address/account/account.ftl b/examples/themes/src/main/resources/theme/address/account/account.ftl deleted file mode 100755 index 49effa40b5..0000000000 --- a/examples/themes/src/main/resources/theme/address/account/account.ftl +++ /dev/null @@ -1,114 +0,0 @@ -<#import "template.ftl" as layout> -<@layout.mainLayout active='account' bodyClass='user'; section> - -
-
-

${msg("editAccountHtmlTitle")}

-
-
- * ${msg("requiredFields")} -
-
- -
- - - -
-
- <#if realm.editUsernameAllowed>* -
- -
- disabled="disabled" value="${(account.username!'')}"/> -
-
- -
-
- * -
- -
- -
-
- -
-
- * -
- -
- -
-
- -
-
- * -
- -
- -
-
- -
-
- -
- -
- -
-
-
-
- -
- -
- -
-
-
-
- -
- -
- -
-
-
-
- -
- -
- -
-
-
-
- -
- -
- -
-
- - - - - \ No newline at end of file diff --git a/examples/themes/src/main/resources/theme/address/account/theme.properties b/examples/themes/src/main/resources/theme/address/account/theme.properties deleted file mode 100644 index 3e50437b9a..0000000000 --- a/examples/themes/src/main/resources/theme/address/account/theme.properties +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright 2016 Red Hat, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -parent=keycloak \ No newline at end of file diff --git a/examples/themes/src/main/resources/theme/address/admin/resources/partials/user-attributes.html b/examples/themes/src/main/resources/theme/address/admin/resources/partials/user-attributes.html deleted file mode 100755 index af512de26e..0000000000 --- a/examples/themes/src/main/resources/theme/address/admin/resources/partials/user-attributes.html +++ /dev/null @@ -1,72 +0,0 @@ - - -
- - - - -
-
- -
- -
- Street address. -
-
- -
- -
- City or locality. -
-
- -
- -
- State, province, prefecture, or region. -
-
- -
- -
- Zip code or postal code. -
-
- -
- -
- Country name. -
- -
-
- - -
-
-
-
- - diff --git a/examples/themes/src/main/resources/theme/address/admin/theme.properties b/examples/themes/src/main/resources/theme/address/admin/theme.properties deleted file mode 100644 index 3e50437b9a..0000000000 --- a/examples/themes/src/main/resources/theme/address/admin/theme.properties +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright 2016 Red Hat, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -parent=keycloak \ No newline at end of file diff --git a/examples/themes/src/main/resources/theme/address/login/login-update-profile.ftl b/examples/themes/src/main/resources/theme/address/login/login-update-profile.ftl deleted file mode 100755 index e9aa00770f..0000000000 --- a/examples/themes/src/main/resources/theme/address/login/login-update-profile.ftl +++ /dev/null @@ -1,95 +0,0 @@ -<#import "template.ftl" as layout> -<@layout.registrationLayout; section> - <#if section = "title"> - ${msg("loginProfileTitle")} - <#elseif section = "header"> - ${msg("loginProfileTitle")} - <#elseif section = "form"> -
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
- -
- -
-
-
-
- -
- -
- -
-
-
-
- -
- -
- -
-
-
-
- -
- -
- -
-
-
-
- -
- -
- -
-
- - -
-
-
-
-
- -
- -
-
-
- - \ No newline at end of file diff --git a/examples/themes/src/main/resources/theme/address/login/register.ftl b/examples/themes/src/main/resources/theme/address/login/register.ftl deleted file mode 100755 index deca37fd14..0000000000 --- a/examples/themes/src/main/resources/theme/address/login/register.ftl +++ /dev/null @@ -1,131 +0,0 @@ -<#import "template.ftl" as layout> -<@layout.registrationLayout; section> - <#if section = "title"> - ${msg("registerWithTitle",(realm.name!''))} - <#elseif section = "header"> - ${msg("registerWithTitleHtml",(realm.name!''))} - <#elseif section = "form"> -
- <#if !realm.registrationEmailAsUsername> -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- - <#if passwordRequired> -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
- -
- -
-
-
-
- -
- -
- -
-
-
-
- -
- -
- -
-
-
-
- -
- -
- -
-
-
-
- -
- -
- -
-
- <#if recaptchaRequired??> -
-
-
-
-
- - -
- - -
- -
-
-
- - \ No newline at end of file diff --git a/examples/themes/src/main/resources/theme/address/login/theme.properties b/examples/themes/src/main/resources/theme/address/login/theme.properties deleted file mode 100644 index 3e50437b9a..0000000000 --- a/examples/themes/src/main/resources/theme/address/login/theme.properties +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright 2016 Red Hat, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -parent=keycloak \ No newline at end of file diff --git a/examples/themes/src/main/resources/theme/logo-example/account/resources/css/logo.css b/examples/themes/src/main/resources/theme/logo-example/account/resources/css/logo.css deleted file mode 100755 index 7f384d0cef..0000000000 --- a/examples/themes/src/main/resources/theme/logo-example/account/resources/css/logo.css +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -.navbar-title { - background: url('../img/red-hat-logo.png') no-repeat; - height: 45px; - width: 150px; -} \ No newline at end of file diff --git a/examples/themes/src/main/resources/theme/logo-example/account/resources/img/red-hat-logo.png b/examples/themes/src/main/resources/theme/logo-example/account/resources/img/red-hat-logo.png deleted file mode 100755 index 273939b543..0000000000 Binary files a/examples/themes/src/main/resources/theme/logo-example/account/resources/img/red-hat-logo.png and /dev/null differ diff --git a/examples/themes/src/main/resources/theme/logo-example/account/theme.properties b/examples/themes/src/main/resources/theme/logo-example/account/theme.properties deleted file mode 100755 index 29c2a75987..0000000000 --- a/examples/themes/src/main/resources/theme/logo-example/account/theme.properties +++ /dev/null @@ -1,21 +0,0 @@ -# -# Copyright 2016 Red Hat, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -parent=keycloak -import=common/keycloak - -styles=lib/patternfly/css/patternfly.css css/account.css css/logo.css \ No newline at end of file diff --git a/examples/themes/src/main/resources/theme/logo-example/admin/resources/css/logo.css b/examples/themes/src/main/resources/theme/logo-example/admin/resources/css/logo.css deleted file mode 100755 index e196102127..0000000000 --- a/examples/themes/src/main/resources/theme/logo-example/admin/resources/css/logo.css +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -.navbar-pf .navbar-brand { - background: url('../img/red-hat-logo.png') no-repeat 0px 5px; -} \ No newline at end of file diff --git a/examples/themes/src/main/resources/theme/logo-example/admin/resources/img/red-hat-logo.png b/examples/themes/src/main/resources/theme/logo-example/admin/resources/img/red-hat-logo.png deleted file mode 100755 index 273939b543..0000000000 Binary files a/examples/themes/src/main/resources/theme/logo-example/admin/resources/img/red-hat-logo.png and /dev/null differ diff --git a/examples/themes/src/main/resources/theme/logo-example/admin/theme.properties b/examples/themes/src/main/resources/theme/logo-example/admin/theme.properties deleted file mode 100755 index 234adc3bb0..0000000000 --- a/examples/themes/src/main/resources/theme/logo-example/admin/theme.properties +++ /dev/null @@ -1,20 +0,0 @@ -# -# Copyright 2016 Red Hat, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -parent=keycloak -import=common/keycloak -styles=lib/patternfly/css/patternfly.css node_modules/select2/select2.css css/styles.css node_modules/text-security/text-security.css css/logo.css diff --git a/examples/themes/src/main/resources/theme/logo-example/login/resources/css/logo.css b/examples/themes/src/main/resources/theme/logo-example/login/resources/css/logo.css deleted file mode 100755 index a820be94f9..0000000000 --- a/examples/themes/src/main/resources/theme/logo-example/login/resources/css/logo.css +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -div.kc-logo-text { - background: url(../img/red-hat-logo.png) no-repeat center center; - background-size: contain; -} diff --git a/examples/themes/src/main/resources/theme/logo-example/login/resources/img/red-hat-logo.png b/examples/themes/src/main/resources/theme/logo-example/login/resources/img/red-hat-logo.png deleted file mode 100644 index 45a80951d4..0000000000 Binary files a/examples/themes/src/main/resources/theme/logo-example/login/resources/img/red-hat-logo.png and /dev/null differ diff --git a/examples/themes/src/main/resources/theme/logo-example/login/theme.properties b/examples/themes/src/main/resources/theme/logo-example/login/theme.properties deleted file mode 100755 index ddd3c58231..0000000000 --- a/examples/themes/src/main/resources/theme/logo-example/login/theme.properties +++ /dev/null @@ -1,21 +0,0 @@ -# -# Copyright 2016 Red Hat, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -parent=keycloak -import=common/keycloak - -styles=css/login.css css/tile.css css/logo.css \ No newline at end of file diff --git a/examples/themes/src/main/resources/theme/logo-example/welcome/index.ftl b/examples/themes/src/main/resources/theme/logo-example/welcome/index.ftl deleted file mode 100755 index 004b6b3260..0000000000 --- a/examples/themes/src/main/resources/theme/logo-example/welcome/index.ftl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - Welcome to Keycloak - - - - - -
-
- -

Welcome to Keycloak

- -

Your Keycloak is running.

- -

Documentation | Administration Console

- -

Keycloak Project | - Mailing List | - Report an issue

-
-
- - diff --git a/examples/themes/src/main/resources/theme/logo-example/welcome/resources/red-hat-logo.png b/examples/themes/src/main/resources/theme/logo-example/welcome/resources/red-hat-logo.png deleted file mode 100644 index 273939b543..0000000000 Binary files a/examples/themes/src/main/resources/theme/logo-example/welcome/resources/red-hat-logo.png and /dev/null differ diff --git a/examples/themes/src/main/resources/theme/logo-example/welcome/theme.properties b/examples/themes/src/main/resources/theme/logo-example/welcome/theme.properties deleted file mode 100755 index 3e50437b9a..0000000000 --- a/examples/themes/src/main/resources/theme/logo-example/welcome/theme.properties +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright 2016 Red Hat, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -parent=keycloak \ No newline at end of file diff --git a/examples/themes/src/main/resources/theme/sunrise/login/resources/css/styles.css b/examples/themes/src/main/resources/theme/sunrise/login/resources/css/styles.css deleted file mode 100644 index c98bd9d57c..0000000000 --- a/examples/themes/src/main/resources/theme/sunrise/login/resources/css/styles.css +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -body { - background-color: #040507; - background-image: url('../img/bkgrnd.jpg'); - background-size: cover; - background-repeat: no-repeat; - - color: #fff; - font-family: sans-serif; - text-shadow: 0px 0px 10px #000; -} - -a { - color: #fff; -} - -div#kc-content { - position: absolute; - top: 20%; - left: 50%; - width: 550px; - margin-left: -225px; -} - -div#kc-form { - float: left; - width: 350px; -} - -div#kc-form label { - display: block; - font-size: 16px; -} - -div#info-area { - position: fixed; - bottom: 0; - left: 0; - margin-top: 40px; - background-color: rgba(0, 0, 0, 0.4); - padding: 20px; - width: 100%; -} - -div#info-area p { - margin-right: 30px; - display: inline; - text-shadow: none; -} - -input[type=text], input[type=password] { - color: #ddd; - font-size: 18px; - margin-bottom: 20px; - background-color: rgba(3,70,114,0.15); - border: 0px solid rgba(0,0,0,0.2); - box-shadow:inset 0 0 2px 2px rgba(0,0,0,0.15); - padding: 10px; - width: 296px; -} - -input[type=text]:hover, input[type=password]:hover { - background-color: rgba(3,70,114,0.4); -} - -input[type=submit] { - border: none; - - background: -webkit-linear-gradient(top, rgba(255,255,255,0.8), rgba(255,255,255,0.1)); - background: -moz-linear-gradient(top, rgba(255,255,255,0.8), rgba(255,255,255,0.1)); - background: -ms-linear-gradient(top, rgba(255,255,255,0.8), rgba(255,255,255,0.1)); - background: -o-linear-gradient(top, rgba(255,255,255,0.8), rgba(255,255,255,0.1)); - - box-shadow: 0px 0px 6px rgba(0,0,0,0.5); - - color: rgba(0,0,0,0.6); - - font-size: 14px; - font-weight: bold; - - padding: 10px; - margin-top: 20px; - margin-right: 10px; - width: 150px; -} - -input[type=submit]:hover { - background-color: rgba(255,255,255,0.8); -} - -div#kc-form-options div { - display: inline-block; - margin-right: 20px; - font-size: 12px; -} - -div#kc-form-options div label { - font-size: 12px; -} - -div#kc-feedback { - box-shadow: 0px 0px 6px rgba(0,0,0,0.5); - position: fixed; - top: 0; - left: 0; - width: 100%; - text-align: center; -} - -div#kc-feedback-wrapper { - padding: 1em; -} - -div.feedback-success { - background-color: rgba(155,155,255,0.1); -} - -div.feedback-warning { - background-color: rgba(255,175,0,0.1); -} - -div.feedback-error { - background-color: rgba(255,0,0,0.1); -} - -div#kc-header { - display: none; -} - -div#kc-registration { - margin-bottom: 20px; -} - -#input-error { - color: orangered; - position: relative; - top: -15px; -} - -#kc-social-providers { - background-color: rgba(3, 70, 114, 0.15); - border: 0 solid rgba(0, 0, 0, 0.2); - box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, 0.15); - padding: 20px; - margin: 20px 0; - text-align: center; - width: 276px; -} - -#kc-social-providers ul { - margin: 0; - padding: 0; -} - -#kc-social-providers a { - display: block; - text-decoration: none; - padding: 10px; - margin: 10px; - border: 1px solid rgba(255, 255, 255, 0.2); - background-color: rgba(255, 255, 255, 0.2); -} - -#kc-social-providers a:hover{ - background-color: rgba(3,70,114,0.4); -} \ No newline at end of file diff --git a/examples/themes/src/main/resources/theme/sunrise/login/resources/img/bkgrnd.jpg b/examples/themes/src/main/resources/theme/sunrise/login/resources/img/bkgrnd.jpg deleted file mode 100644 index bc11ffb83b..0000000000 Binary files a/examples/themes/src/main/resources/theme/sunrise/login/resources/img/bkgrnd.jpg and /dev/null differ diff --git a/examples/themes/src/main/resources/theme/sunrise/login/theme.properties b/examples/themes/src/main/resources/theme/sunrise/login/theme.properties deleted file mode 100644 index 882a51fb49..0000000000 --- a/examples/themes/src/main/resources/theme/sunrise/login/theme.properties +++ /dev/null @@ -1,19 +0,0 @@ -# -# Copyright 2016 Red Hat, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -parent=base -styles=css/styles.css \ No newline at end of file diff --git a/pom.xml b/pom.xml index 42945c7691..e4f1fb5f24 100644 --- a/pom.xml +++ b/pom.xml @@ -1894,18 +1894,6 @@ - - examples - - - !skipExamples - - - - examples - - - eap8-adapters