From db87c639149646f36412ab924d5db2e9705a3ccb Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Thu, 9 Jun 2016 08:14:45 +0200 Subject: [PATCH 1/2] Set version to 1.9.7 --- book.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book.json b/book.json index a83bbf6c54..7336cdc8c3 100755 --- a/book.json +++ b/book.json @@ -80,7 +80,7 @@ "clientadapter": "RH-SSO-7.0.0.ER10-eap7-adapter.zip", "project": { "name": "Keycloak", - "version": "1.9.3.Final-SNAPSHOT" + "version": "1.9.7.Final" } } } \ No newline at end of file From 7edb440cdc99cca3cfb0072b38a79983137c0756 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Thu, 9 Jun 2016 10:14:10 +0200 Subject: [PATCH 2/2] Added book-product.json to fix links in product build --- .gitignore | 3 + README.adoc | 5 +- book-product.json | 34 +++++++ book.json | 88 ++++--------------- build.sh | 7 ++ gitlab-conversion.py | 4 +- topics/secure-jboss-app.adoc | 7 +- topics/secure-jboss-app/before.adoc | 2 +- topics/secure-jboss-app/create-client.adoc | 2 +- .../download-quickstarts.adoc | 19 ++-- .../install-client-adapter.adoc | 17 +++- 11 files changed, 94 insertions(+), 94 deletions(-) create mode 100755 book-product.json create mode 100755 build.sh diff --git a/.gitignore b/.gitignore index 44612eb8b4..9e08017c20 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +node_modules +_book + # Intellij ################### .idea diff --git a/README.adoc b/README.adoc index 5114684d75..9baa64183f 100755 --- a/README.adoc +++ b/README.adoc @@ -1,10 +1,9 @@ -{{book.project.name}} Getting Started Tutorials -====================== += {{book.title}} 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 diff --git a/book-product.json b/book-product.json new file mode 100755 index 0000000000..78e4cdf236 --- /dev/null +++ b/book-product.json @@ -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" + } +} \ No newline at end of file diff --git a/book.json b/book.json index 7336cdc8c3..961e90fe0f 100755 --- a/book.json +++ b/book.json @@ -9,78 +9,26 @@ "splitter" ], "variables": { - "title": "Keycloak Getting Started Tutorials", - "community": true, - "product": false, - "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": { - "name": "Keycloak Server Installation and Configuration Guide", - "link": "https://keycloak.gitbooks.io/server-installation-guide/content/" - - }, - "adminguide": { - "name": "Keycloak Adminstration Guide", - "link": "https://keycloak.gitbooks.io/server-adminstration-guide/content/" - }, - "appguide": { - "name": "Securing Applications with Keycloak", - "link": "https://keycloak.gitbooks.io/server-adminstration-guide/content/" - }, - "clientadapter": "RH-SSO-7.0.0.ER10-eap7-adapter.zip", + "title": "Getting Started Tutorials", "project": { "name": "Keycloak", "version": "1.9.7.Final" - } + }, + "community": true, + "product": false, + "images": "keycloak-images", + + "installguide": { + "name": "Server Installation and Configuration Guide", + "link": "https://keycloak.gitbooks.io/server-installation-and-configuration/content/" + + }, + "adminguide": { + "name": "Server Adminstration Guide", + "link": "https://keycloak.gitbooks.io/server-adminstration-guide/content/" + }, + "clientadapter": "RH-SSO-{{book.project.version}}-eap7-adapter.zip", + "appServer": "WildFly 10", + "quickstartRepo": "https://github.com/redhat-developer/redhat-sso-quickstarts" } } \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100755 index 0000000000..fc1e19f7fb --- /dev/null +++ b/build.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +cd $(readlink -f `dirname $0`) + +python gitlab-conversion.py +cd target +asciidoctor master.adoc diff --git a/gitlab-conversion.py b/gitlab-conversion.py index 630665f150..88f04063c3 100755 --- a/gitlab-conversion.py +++ b/gitlab-conversion.py @@ -67,8 +67,8 @@ input = re.sub(r"[ ]*\.+\s*link:(.*)\[(.*)\]", "include::\g<1>[]", input) input = applyTransformation(input) output.write(input) -# parse book.json file and create document attributes -with open('book.json') as data_file: +# parse book-product.json file and create document attributes +with open('book-product.json') as data_file: data = json.load(data_file) variables = data['variables'] diff --git a/topics/secure-jboss-app.adoc b/topics/secure-jboss-app.adoc index 008daf1a5b..ffe967344c 100644 --- a/topics/secure-jboss-app.adoc +++ b/topics/secure-jboss-app.adoc @@ -1,8 +1,7 @@ == 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 -servers. You will learn how to install the {{book.project.name}} Client Adapter onto a JBoss EAP or Wildfly Application Server -distribution. You will create and register a client application in the {{book.project.name}} Admin Console. Finally, -you will configure the application to be secured by {{book.project.name}}. +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 +{{book.project.name}} Client Adapter onto a {{book.appServer}} application server distribution. You will create and register a client application in the +{{book.project.name}} Admin Console. Finally, you will configure the application to be secured by {{book.project.name}}. diff --git a/topics/secure-jboss-app/before.adoc b/topics/secure-jboss-app/before.adoc index 099344b6fa..9d53c23b38 100755 --- a/topics/secure-jboss-app/before.adoc +++ b/topics/secure-jboss-app/before.adoc @@ -3,7 +3,7 @@ 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 <> tutorial. There is one -caveat to this. You are going to have to run a separate JBoss EAP 7 or Wildfly 10 instance on the same machine as the +caveat to this. You are going to 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 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 diff --git a/topics/secure-jboss-app/create-client.adoc b/topics/secure-jboss-app/create-client.adoc index 25db8e4a5c..02a75a98e0 100644 --- a/topics/secure-jboss-app/create-client.adoc +++ b/topics/secure-jboss-app/create-client.adoc @@ -13,7 +13,7 @@ On the right hand side you should see a button named `Create`. Click this butto .Add Client 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 a template for the configuration you need by going to the `Installation` tab in the client entry in the {{book.project.name}} Admin Console. diff --git a/topics/secure-jboss-app/download-quickstarts.adoc b/topics/secure-jboss-app/download-quickstarts.adoc index bb49a9d5b2..e184a867a4 100644 --- a/topics/secure-jboss-app/download-quickstarts.adoc +++ b/topics/secure-jboss-app/download-quickstarts.adoc @@ -1,29 +1,28 @@ === Download, Build, Deploy Application Code -The project and code for the application you are going to secure it 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: * Java JDK 8 * Apache Maven 3.1.1 or higher -You can obtain the code by cloning the -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 JBoss EAP or Wildfly app server instance is running before you start these steps! +You can obtain the code by cloning the repository at {{book.quickstartRepo}}. 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. .Clone Project [source] ---- -$ git clone git@github.com:jboss-developer/rh-sso-quickstarts.git +$ git clone {{book.quickstartRepo}} $ cd rh-sso-quickstarts/app-profile-jee-vanilla $ 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 -.App Login Page +.Application Login Page 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. @@ -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. -.App Login Dialog +.Application Login Dialog image:../../{{book.images}}/client-auth-required.png[] -The app is not secured by any identity provider, so anything you enter in the dialog will result in a `Forbidden` message being -sent back by the server. The next section describes how you can take this existing deployed app and secure it. +The application is not secured by any identity provider, so anything you enter in the dialog will result in a `Forbidden` message being +sent back by the server. The next section describes how you can take this existing deployed application and secure it. diff --git a/topics/secure-jboss-app/install-client-adapter.adoc b/topics/secure-jboss-app/install-client-adapter.adoc index c7d3a7fa85..906a6fe916 100644 --- a/topics/secure-jboss-app/install-client-adapter.adoc +++ b/topics/secure-jboss-app/install-client-adapter.adoc @@ -1,9 +1,20 @@ === 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 -it into a directory of your choosing on your machine. Next download the {{book.clientadapter}} distribution. Unzip -this file into the root directory of your JBoss EAP or Wildfly 10 distribution. Next perform the following actions +Download the {{book.appServer}} distribution and unzip +it into a directory of your choosing on your machine. + +{% 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 [source]