Minor updates to docs

This commit is contained in:
Stian Thorgersen 2014-02-18 10:36:58 +00:00
parent cbb6ec8b2c
commit 7a8b5587d7
4 changed files with 55 additions and 68 deletions

View file

@ -2,7 +2,7 @@
<title>Overview</title>
<para>
Keycloak is an SSO solution for web apps and RESTful web services. It is an authentication server where users
Keycloak is an SSO solution for web apps, mobile and RESTful web services. It is an authentication server where users
can centrally login, logout, register, and manage their user accounts. The Keycloak admin UI can manage roles
and role mappings for any application secured by Keycloak. The Keycloak Server can also be used to perform
social logins via the user's favorite social media site i.e. Google, Facebook, Twitter etc.
@ -20,7 +20,7 @@
</listitem>
<listitem>
Social Broker. Enable Google, Facebook, Yahoo, Twitter social login with no code required.
Social Broker. Enable Google, GitHub, Facebook, Twitter social login with no code required.
</listitem>
<listitem>
@ -90,7 +90,7 @@
<section>
<title>How Does Security Work in Keycloak?</title>
<para>
Keycloak uses <emphasis>access tokens</emphasis>. Access tokens are contains security metadata specifying the
Keycloak uses <emphasis>access tokens</emphasis>. Access tokens contains security metadata specifying the
identity of the user as well as the role mappings for that user. The format of these tokens is a Keycloak
extension to the <ulink url="http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-14">JSON Web Token</ulink> specification. Each realm has a private and public key pair
which it uses to digitally sign the access token using the <ulink url="http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-19">JSON Web Signature</ulink> specification.

View file

@ -93,7 +93,7 @@
<listitem>
<para>
Ensures that all communication to and from the Keycloak server from the adapter is over HTTPS.
This is<emphasis>OPTIONAL</emphasis>. The default value is
This is <emphasis>OPTIONAL</emphasis>. The default value is
<emphasis>false</emphasis>
meaning
that HTTPS is required by default.
@ -107,7 +107,7 @@
If set to true, the adapter will look inside the token for application level role mappings for
the
user. If false, it will look at the realm level for user role mappings.
This is<emphasis>OPTIONAL</emphasis>. The default value is<emphasis>false</emphasis>.
This is <emphasis>OPTIONAL</emphasis>. The default value is <emphasis>false</emphasis>.
</para>
</listitem>
</varlistentry>
@ -117,7 +117,7 @@
<para>
This enables CORS support. It will handle CORS preflight requests. It will also look into
the access token to determine valid origins.
This is<emphasis>OPTIONAL</emphasis>. The default value is<emphasis>false</emphasis>.
This is <emphasis>OPTIONAL</emphasis>. The default value is <emphasis>false</emphasis>.
</para>
</listitem>
</varlistentry>
@ -128,7 +128,7 @@
If CORS is enabled, this sets the value of the
<literal>Access-Control-Max-Age</literal>
header.
This is<emphasis>OPTIONAL</emphasis>. If not set, this header is not returned in CORS
This is <emphasis>OPTIONAL</emphasis>. If not set, this header is not returned in CORS
responses.
</para>
</listitem>
@ -140,7 +140,7 @@
If CORS is enabled, this sets the value of the
<literal>Access-Control-Allow-Methods</literal>
header. This should be a JSON list of strings.
This is<emphasis>OPTIONAL</emphasis>. If not set, this header is not returned in CORS
This is <emphasis>OPTIONAL</emphasis>. If not set, this header is not returned in CORS
responses.
</para>
</listitem>
@ -149,11 +149,11 @@
<term>bearer-only</term>
<listitem>
<para>
This tells the adapter to only to bearer token authentication. That is, it will not do
This tells the adapter to only do bearer token authentication. That is, it will not do
OAuth 2.0 redirects, but only accept bearer tokens through the
<literal>Authorization</literal>
header.
This is<emphasis>OPTIONAL</emphasis>. The default value is<emphasis>false</emphasis>.
This is <emphasis>OPTIONAL</emphasis>. The default value is <emphasis>false</emphasis>.
</para>
</listitem>
</varlistentry>
@ -161,9 +161,9 @@
<term>expose-token</term>
<listitem>
<para>
If<literal>true</literal>, an authenticated browser client (via a Javascript HTTP invocation)
can obtain the signed access token via the URL<literal>root/k_query_bearer_token</literal>.
This is<emphasis>OPTIONAL</emphasis>. The default value is<emphasis>false</emphasis>.
If <literal>true</literal>, an authenticated browser client (via a Javascript HTTP invocation)
can obtain the signed access token via the URL <literal>root/k_query_bearer_token</literal>.
This is <emphasis>OPTIONAL</emphasis>. The default value is <emphasis>false</emphasis>.
</para>
</listitem>
</varlistentry>
@ -175,7 +175,7 @@
is the credential type and the value if the value of the credential type. Currently only
<literal>password</literal>
is supported.
This is<emphasis>REQUIRED</emphasis>.
This is <emphasis>REQUIRED</emphasis>.
</para>
</listitem>
</varlistentry>
@ -187,7 +187,7 @@
Adapters will make separate HTTP invocations to the Keycloak Server to turn an access code
into an access token. This config option defines how many connections to the Keycloak Server
should be pooled.
This is<emphasis>OPTIONAL</emphasis>. The default value is <literal>20</literal>.
This is <emphasis>OPTIONAL</emphasis>. The default value is <literal>20</literal>.
</para>
</listitem>
</varlistentry>
@ -198,7 +198,7 @@
If the Keycloak Server requires HTTPS and this config option is set to <literal>true</literal>
you do not have to specify a truststore. While convenient, this setting is not recommended
as you will not be verifying the host name of the Keycloak Server.
This is<emphasis>OPTIONAL</emphasis>. The default value is <literal>false</literal>.
This is <emphasis>OPTIONAL</emphasis>. The default value is <literal>false</literal>.
</para>
</listitem>
</varlistentry>
@ -209,7 +209,7 @@
If the Keycloak Server requires HTTPS and this config option is set to <literal>true</literal>
the Keycloak Server's certificate is validated via the truststore, but host name validation is
not done. This is not a recommended. This seting may be useful in test environments
This is<emphasis>OPTIONAL</emphasis>. The default value is <literal>false</literal>.
This is <emphasis>OPTIONAL</emphasis>. The default value is <literal>false</literal>.
</para>
</listitem>
</varlistentry>
@ -220,7 +220,7 @@
<para>
This setting is for Java adapters. This is the file path to a Java keystore file.
Used for outgoing HTTPS communications to the Keycloak server. Client making HTTPS
requests need a way to verify the host of the server they are talking to. THis is
requests need a way to verify the host of the server they are talking to. This is
what the trustore does. The keystore contains one or more trusted
host certificates or certificate authorities. You can
create this truststore by extracting the public certificate of the Keycloak server's SSL
@ -233,7 +233,7 @@
<literal>false</literal>
or
<literal>disable-trust-manager</literal>
is<literal>true</literal>. The default value is<emphasis>false</emphasis>.
is <literal>true</literal>. The default value is<emphasis>false</emphasis>.
</para>
</listitem>
</varlistentry>
@ -259,7 +259,7 @@
This setting is for Java adapters. This is the file path to a Java keystore file.
This keystore contains client certificate for two-way SSL when the adapter makes
HTTPS requests to the Keycloak server.
This is<emphasis>OPTIONAL</emphasis>.
This is <emphasis>OPTIONAL</emphasis>.
</para>
</listitem>
</varlistentry>
@ -293,4 +293,4 @@
</varlistentry>
</variablelist>
</para>
</section>
</section>

View file

@ -23,15 +23,15 @@
<para>
Open
<ulink url="https://openshift.redhat.com/app/console/applications"/>
and click on<literal>Add Application</literal>.
and click on <literal>Add Application</literal>.
Scroll down to the bottom of the page to find the
<literal>Code Anything</literal>
section. Insert
<literal>https://raw.github.com/keycloak/openshift-keycloak-cartridge/master/metadata/manifest.yml</literal>
into the
<literal>URL to a cartridge definition</literal>
field and click on<literal>Next</literal>. Fill in the
following form and click on<literal>Create Application</literal>.
field and click on <literal>Next</literal>. Fill in the
following form and click on <literal>Create Application</literal>.
</para>
<para>
Click on <literal>Continue to the application overview page</literal>. Under the list of applications you should
@ -56,15 +56,14 @@
<section>
<title>Next steps</title>
<para>
The Keycloak servers homepage should show the Keycloak logo and <literal>Welcome to Keycloak</literal>.
There should also be a link to the <literal>Administration Console</literal>. Open that and log in using username
<literal>admin</literal> and password <literal>admin</literal>. On the first login you should be asked
to reset the password.
The Keycloak servers homepage shows the Keycloak logo and <literal>Welcome to Keycloak</literal>.
There is also a link to the <literal>Administration Console</literal>. Open that and log in using username
<literal>admin</literal> and password <literal>admin</literal>. On the first login you are required to change the password.
</para>
<tip>
<para>
On OpenShift Keycloak has been configured to only accept requests over https. If you try to use http
you should be redirected to https.
you will be redirected to https.
</para>
</tip>
</section>

View file

@ -175,7 +175,7 @@ keycloak-war-dist-all-1.0-alpha-1/
</para>
<para>
Besides moving the database config into the central <literal>standalone.xml</literal> configuration file
you might want to use a better relational database for Keycloak like Oracle or something. You might also
you might want to use a better relational database for Keycloak like PostgreSQL or MySQL. You might also
want to tweak the configuration settings of the datasource. Please see the <ulink url="https://docs.jboss.org/author/display/WFLY8/DataSource+configuration">Wildfly</ulink>,
<ulink url="https://docs.jboss.org/author/display/AS71/DataSource+configuration">JBoss AS7</ulink>,
or <ulink url="https://docs.jboss.org/author/display/AS71/DataSource+configuration">JBoss EAP 6.x</ulink> documentation on how to do this.
@ -261,29 +261,29 @@ $ keytool -genkey -alias localhost -keyalg RSA -keystore keycloak.jks -validity
</para>
<para>
The first thing to do is generate a Certificate Request:
<programlisting>
$ keytool -certreq -alias yourdomain -keystore keycloak.jks > keycloak.careq
</programlisting>
<programlisting>
$ keytool -certreq -alias yourdomain -keystore keycloak.jks > keycloak.careq
</programlisting>
</para>
<para>
Where <literal>yourdomain</literal> is a DNS name for which this certificate is generated for.
Keytool generates the request:
<programlisting>
-----BEGIN NEW CERTIFICATE REQUEST-----
MIIC2jCCAcICAQAwZTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk1BMREwDwYDVQQHEwhXZXN0Zm9y
ZDEQMA4GA1UEChMHUmVkIEhhdDEQMA4GA1UECxMHUmVkIEhhdDESMBAGA1UEAxMJbG9jYWxob3N0
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAr7kck2TaavlEOGbcpi9c0rncY4HhdzmY
Ax2nZfq1eZEaIPqI5aTxwQZzzLDK9qbeAd8Ji79HzSqnRDxNYaZu7mAYhFKHgixsolE3o5Yfzbw1
29Rvy+eUVe+WZxv5oo9wolVVpdSINIMEL2LaFhtX/c1dqiqYVpfnvFshZQaIg2nL8juzZcBjj4as
H98gIS7khql/dkZKsw9NLvyxgJvp7PaXurX29fNf3ihG+oFrL22oFyV54BWWxXCKU/GPn61EGZGw
Ft2qSIGLdctpMD1aJR2bcnlhEjZKDksjQZoQ5YMXaAGkcYkG6QkgrocDE2YXDbi7GIdf9MegVJ35
2DQMpwIDAQABoDAwLgYJKoZIhvcNAQkOMSEwHzAdBgNVHQ4EFgQUQwlZJBA+fjiDdiVzaO9vrE/i
n2swDQYJKoZIhvcNAQELBQADggEBAC5FRvMkhal3q86tHPBYWBuTtmcSjs4qUm6V6f63frhveWHf
PzRrI1xH272XUIeBk0gtzWo0nNZnf0mMCtUBbHhhDcG82xolikfqibZijoQZCiGiedVjHJFtniDQ
9bMDUOXEMQ7gHZg5q6mJfNG9MbMpQaUV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JWJ6vd0X
MzzFK6j4Dj55bJVuM7GFmfdNC52pNOD5vYe47Aqh8oajHX9XTycVtPXl45rrWAH33ftbrS8SrZ2S
vqIFQeuLL3BaHwpl3t7j2lMWcK1p80laAxEASib/fAwrRHpLHBXRcq6uALUOZl4Alt8=
-----END NEW CERTIFICATE REQUEST-----
</programlisting>
</para>
<para>
@ -312,24 +312,18 @@ $ keytool -import -alias yourdomain -keystore keycloak.jks -file your-certificat
</para>
<para>
To the <literal>security-realms</literal> element add:
<programlisting><![CDATA[]
<security-realm name="UndertowRealm">
<programlisting><![CDATA[<security-realm name="UndertowRealm">
<server-identities>
<ssl>
<keystore path="keycloak.jks" relative-to="jboss.server.config.dir" keystore-password="secret" />
</ssl>
</server-identities>
</security-realm>
]]>
</programlisting>
</security-realm>]]></programlisting>
</para>
<para>
Find the element <literal>&lt;server name="default-server"&gt;</literal> (it's a child element of <literal>&lt;subsystem xmlns="urn:jboss:domain:undertow:1.0"&gt;</literal>) and add:
<programlisting><![CDATA[]<![CDATA[]
<
<https-listener name="https" socket-binding="https" security-realm="UndertowRealm"/>
]]>
</programlisting>
<programlisting><![CDATA[<https-listener name="https" socket-binding="https" security-realm="UndertowRealm"/>
]]></programlisting>
</para>
<para>
Check the <ulink url="https://docs.jboss.org/author/display/WFLY8/Undertow+(web)+subsystem+configuration">Wildfly Undertow</ulink> documentation for more information on fine tuning the socket connections.
@ -344,8 +338,7 @@ $ keytool -import -alias yourdomain -keystore keycloak.jks -file your-certificat
Then you need to edit <literal>standalone/configuration/standalone.xml</literal> to enable SSL/HTTPS.
</para>
<para>
<programlisting><![CDATA[]
<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
<programlisting><![CDATA[<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http" redirect-port="443" />
<connector name="https" scheme="https" protocol="HTTP/1.1" socket-binding="https"
enable-lookups="false" secure="true">
@ -353,9 +346,7 @@ $ keytool -import -alias yourdomain -keystore keycloak.jks -file your-certificat
key-alias="localhost" certificate-key-file="${jboss.server.config.dir}/keycloak.jks" />
</connector>
...
</subsystem>
]]>
</programlisting>
</subsystem>]]></programlisting>
</para>
<para>
Check the <ulink url="https://docs.jboss.org/author/display/AS71/SSL+setup+guide">JBoss</ulink> documentation for more information on fine tuning the socket connections.
@ -369,8 +360,7 @@ $ keytool -import -alias yourdomain -keystore keycloak.jks -file your-certificat
uncomment out the security constraint.
</para>
<para>
<programlisting><![CDATA[]
<web-app>
<programlisting><![CDATA[<web-app>
...
<security-constraint>
<web-resource-collection>
@ -380,9 +370,7 @@ $ keytool -import -alias yourdomain -keystore keycloak.jks -file your-certificat
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
</web-app>
]]>
</programlisting>
</web-app>]]></programlisting>
</para>
</section>
<section>