Merge pull request #2 from keycloak/master

sync with latest changes
This commit is contained in:
aasingh 2016-06-09 14:21:19 +05:30
commit 06e253893f
11 changed files with 87 additions and 87 deletions

3
.gitignore vendored
View file

@ -1,3 +1,6 @@
node_modules
_book
# Intellij # Intellij
################### ###################
.idea .idea

View file

@ -1,10 +1,9 @@
{{book.project.name}} Getting Started Tutorials = {{book.title}}
======================
image:images/keycloak_logo.png[alt="Keycloak"] image:images/keycloak_logo.png[alt="Keycloak"]
*{{book.project.name}}* _Documentation_ for {{book.project.version}} {{book.project.name}} {{book.project.version}}
http://www.keycloak.org http://www.keycloak.org

34
book-product.json Executable file
View file

@ -0,0 +1,34 @@
{
"gitbook": "2.x.x",
"structure": {
"readme": "README.adoc"
},
"plugins": [
"toggle-chapters",
"ungrey",
"splitter"
],
"variables": {
"title": "Getting Started Tutorials",
"project": {
"name": "Red Hat Single Sign-On",
"version": "7.0.0"
},
"community": false,
"product": true,
"images": "rhsso-images",
"installguide": {
"name": "Server Installation and Configuration Guide",
"link": "https://access.qa.redhat.com/documentation/en/red-hat-single-sign-on/7.0.0/server-installation-and-configuration-guide/"
},
"adminguide": {
"name": "Administration Guide",
"link": "https://access.qa.redhat.com/documentation/en/red-hat-single-sign-on/7.0.0/server-administration-guide/"
},
"clientadapter": "RH-SSO-{{book.project.version}}-eap7-adapter.zip",
"appServer": "JBoss EAP 10",
"quickstartRepo": "https://github.com/redhat-developer/redhat-sso-quickstarts"
}
}

View file

@ -9,78 +9,26 @@
"splitter" "splitter"
], ],
"variables": { "variables": {
"title": "Keycloak Getting Started Tutorials", "title": "Getting Started Tutorials",
"project": {
"name": "Keycloak",
"version": "1.9.7.Final"
},
"community": true, "community": true,
"product": false, "product": false,
"images": "keycloak-images", "images": "keycloak-images",
"appserver": {
"name": "Wildfly",
"version": "10",
"admindoc": {
"name": "JBoss EAP Administration and Configuration Guide",
"link": "https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html/Administration_and_Configuration_Guide/"
},
"datasource": {
"name": "JBoss EAP Administration and Configuration Guide",
"link": "https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html/Administration_and_Configuration_Guide/chap-Datasource_Management.html"
},
"network": {
"name": "JBoss EAP Administration and Configuration Guide",
"link": "https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html/Administration_and_Configuration_Guide/chap-Network_and_Port_Configuration.html#Configure_interfaces"
},
"socket": {
"name": "JBoss EAP Administration and Configuration Guide",
"link": "https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html/Administration_and_Configuration_Guide/sect-Socket_Binding_Groups.html"
},
"loadbalancer": {
"name": "JBoss EAP Administration and Configuration Guide",
"link": "https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html/Administration_and_Configuration_Guide/sect-Web_HTTP_Connectors_and_HTTP_Clustering.html"
},
"jgroups": {
"name": "JBoss EAP Administration and Configuration Guide",
"link": "https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html/Administration_and_Configuration_Guide/sect-JGroups.html"
}
},
"caching": {
"name": "JBoss Data Grid",
"version": "???",
"admindoc": {
"name": "JBoss Data Grid Administration and Configuration Guide",
"link": "https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Data_Grid/6.6/html/Administration_and_Configuration_Guide/index.html",
"eviction": "https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Data_Grid/7.0/html/Administration_and_Configuration_Guide/sect-Eviction_Strategies.html"
}
},
"jpa": {
"name": "Hibernate",
"version": "???",
"admindoc": {
"name": "JBoss Development Guide",
"link": "https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html/Development_Guide/sect-Java_Persistence_API_JPA.html#sect-Configuration2"
}
},
"developerguide": {
"name": "Keycloak Server Developer Guide",
"link": "https://keycloak.gitbooks.io/server-developer-guide/content/"
},
"installguide": { "installguide": {
"name": "Keycloak Server Installation and Configuration Guide", "name": "Server Installation and Configuration Guide",
"link": "https://keycloak.gitbooks.io/server-installation-guide/content/" "link": "https://keycloak.gitbooks.io/server-installation-and-configuration/content/"
}, },
"adminguide": { "adminguide": {
"name": "Keycloak Adminstration Guide", "name": "Server Adminstration Guide",
"link": "https://keycloak.gitbooks.io/server-adminstration-guide/content/" "link": "https://keycloak.gitbooks.io/server-adminstration-guide/content/"
}, },
"appguide": { "clientadapter": "RH-SSO-{{book.project.version}}-eap7-adapter.zip",
"name": "Securing Applications with Keycloak", "appServer": "WildFly 10",
"link": "https://keycloak.gitbooks.io/server-adminstration-guide/content/" "quickstartRepo": "https://github.com/redhat-developer/redhat-sso-quickstarts"
},
"clientadapter": "RH-SSO-7.0.0.ER10-eap7-adapter.zip",
"project": {
"name": "Keycloak",
"version": "1.9.3.Final-SNAPSHOT"
}
} }
} }

7
build.sh Executable file
View file

@ -0,0 +1,7 @@
#!/bin/bash
cd $(readlink -f `dirname $0`)
python gitlab-conversion.py
cd target
asciidoctor master.adoc

View file

@ -67,8 +67,8 @@ input = re.sub(r"[ ]*\.+\s*link:(.*)\[(.*)\]", "include::\g<1>[]", input)
input = applyTransformation(input) input = applyTransformation(input)
output.write(input) output.write(input)
# parse book.json file and create document attributes # parse book-product.json file and create document attributes
with open('book.json') as data_file: with open('book-product.json') as data_file:
data = json.load(data_file) data = json.load(data_file)
variables = data['variables'] variables = data['variables']

View file

@ -1,8 +1,7 @@
== Securing a JBoss Servlet Application == Securing a JBoss Servlet Application
In this section you will learn how to secure a Java Servlet application on the JBoss EAP 7 or Wildfly 10 application In this section you will learn how to secure a Java Servlet application on the {{book.appServer}} application server. You will learn how to install the
servers. You will learn how to install the {{book.project.name}} Client Adapter onto a JBoss EAP or Wildfly Application Server {{book.project.name}} Client Adapter onto a {{book.appServer}} application server distribution. You will create and register a client application in the
distribution. You will create and register a client application in the {{book.project.name}} Admin Console. Finally, {{book.project.name}} Admin Console. Finally, you will configure the application to be secured by {{book.project.name}}.
you will configure the application to be secured by {{book.project.name}}.

View file

@ -3,7 +3,7 @@
Before you can participate in this tutorial, you need to complete the installation of {{book.project.name}} and create the Before you can participate in this tutorial, you need to complete the installation of {{book.project.name}} and create the
initial admin user as shown in the <<fake/../../first-boot.adoc#_install-boot, Install and Boot>> tutorial. There is one initial admin user as shown in the <<fake/../../first-boot.adoc#_install-boot, Install and Boot>> tutorial. There is one
caveat to this. You have to run a separate JBoss EAP 7 or Wildfly 10 instance on the same machine as the caveat to this. You have to run a separate {{book.appServer}} instance on the same machine as the
{{book.project.name}} server. This separate instance will run your Java Servlet application. Because of this you will {{book.project.name}} server. This separate instance will run your Java Servlet application. Because of this you will
have to run the {{book.project.name}} under a different port so that there are no port conflicts when running on the have to run the {{book.project.name}} under a different port so that there are no port conflicts when running on the
same machine. Use the `jboss.socket.binding.port-offset` system property on the command line. The value of this property same machine. Use the `jboss.socket.binding.port-offset` system property on the command line. The value of this property

View file

@ -13,7 +13,7 @@ On the right hand side you should see a button named `Create`. Click this butto
.Add Client .Add Client
image:../../{{book.images}}/add-client.png[] image:../../{{book.images}}/add-client.png[]
After clicking the `Save` button your client application entry will be created. You now have to go back to the JBoss EAP or Wildfly After clicking the `Save` button your client application entry will be created. You now have to go back to the {{book.appServer}}
instance that the application is deployed on and configure it so that this app is secured by {{book.project.name}}. You can obtain instance that the application is deployed on and configure it so that this app is secured by {{book.project.name}}. You can obtain
a template for the configuration you need by going to the `Installation` tab in the client entry in the {{book.project.name}} Admin Console. a template for the configuration you need by going to the `Installation` tab in the client entry in the {{book.project.name}} Admin Console.

View file

@ -1,29 +1,28 @@
=== Download, Build, Deploy Application Code === Download, Build, Deploy Application Code
The project and code for the application you are going to secure is at Github.com. You will need the following The project and code for the application you are going to secure is available in link:{{book.quickstartRepo}}[Red Hat Developers GitHub]. You will need the following
installed on your machine and available in your PATH before you can continue: installed on your machine and available in your PATH before you can continue:
* Java JDK 8 * Java JDK 8
* Apache Maven 3.1.1 or higher * Apache Maven 3.1.1 or higher
You can obtain the code by cloning the You can obtain the code by cloning the repository at {{book.quickstartRepo}}. Follow these steps to download the code, build it,
quickstart repo at git@github.com:jboss-developer/rh-sso-quickstarts.git. Follow these steps to download the code, build it, and deploy it. Make sure your {{book.appServer}} application server is started before you run these steps.
and deploy it. Make sure your JBoss EAP or Wildfly app server instance is running before you start these steps!
.Clone Project .Clone Project
[source] [source]
---- ----
$ git clone git@github.com:jboss-developer/rh-sso-quickstarts.git $ git clone {{book.quickstartRepo}}
$ cd rh-sso-quickstarts/app-profile-jee-vanilla $ cd rh-sso-quickstarts/app-profile-jee-vanilla
$ mvn clean wildfly:deploy $ mvn clean wildfly:deploy
---- ----
You should see some text scroll down in the app server console window. After the app is successfully deployed go to: You should see some text scroll down in the application server console window. After the application is successfully deployed go to:
http://localhost:8080/vanilla http://localhost:8080/vanilla
.App Login Page .Application Login Page
image:../../{{book.images}}/app-login-page.png[] image:../../{{book.images}}/app-login-page.png[]
If you open up the application's _web.xml_ file you would see that the application is secured via `BASIC` authentication. If you open up the application's _web.xml_ file you would see that the application is secured via `BASIC` authentication.
@ -31,11 +30,11 @@ If you click on the login button on the login page, the browser
will pop up a BASIC auth login dialog. will pop up a BASIC auth login dialog.
.App Login Dialog .Application Login Dialog
image:../../{{book.images}}/client-auth-required.png[] image:../../{{book.images}}/client-auth-required.png[]
The app is not secured by any identity provider, so anything you enter in the dialog box will result in a `Forbidden` message being The application is not secured by any identity provider, so anything you enter in the dialog box will result in a `Forbidden` message being
sent back by the server. The next section describes how you can take this deployed app and secure it. sent back by the server. The next section describes how you can take this deployed application and secure it.

View file

@ -1,9 +1,20 @@
=== Install the Client Adapter === Install the Client Adapter
Download the JBoss EAP 7 or Wildfly 10 distribution you are going to use to run your example application and unzip Download the {{book.appServer}} distribution and unzip
it into a directory on your machine. Next download the {{book.clientadapter}} distribution. Unzip it into a directory on your machine.
this file into the root directory of your JBoss EAP or Wildfly 10 distribution. Next perform the following actions
{% if book.community %}
Next download the keycloak-wildfly-adapter-dist-{{book.project.version}}.zip distribution.
{% endif %}
{% if book.product %}
Next download the RH-SSO-{{book.project.version}}-eap7-adapter.zip distribution.
{% endif %}
Unzip this file into the root directory of your {{book.appServer}} distribution.
Next perform the following actions:
.Linux/Unix .Linux/Unix
[source] [source]