Added book-product.json to fix links in product build

This commit is contained in:
Stian Thorgersen 2016-06-09 10:14:10 +02:00
parent db87c63914
commit 7edb440cdc
11 changed files with 94 additions and 94 deletions

3
.gitignore vendored
View file

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

View file

@ -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

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"
],
"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"
}
}

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)
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']

View file

@ -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}}.

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
initial admin user as shown in the <<fake/../../first-boot.adoc#_install-boot, Install and Boot>> 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

View file

@ -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.

View file

@ -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.

View file

@ -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]