Merge pull request #426 from patriot1burke/master
docs and master realm rename
This commit is contained in:
commit
3c605a7740
9 changed files with 116 additions and 19 deletions
|
@ -12,7 +12,7 @@ public class Config {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getAdminRealm() {
|
public static String getAdminRealm() {
|
||||||
return configProvider.scope("admin").get("realm", "keycloak-admin");
|
return configProvider.scope("admin").get("realm", "master");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getProvider(String spi) {
|
public static String getProvider(String spi) {
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
<!ENTITY Installation SYSTEM "modules/server-installation.xml">
|
<!ENTITY Installation SYSTEM "modules/server-installation.xml">
|
||||||
<!ENTITY OpenShift SYSTEM "modules/openshift.xml">
|
<!ENTITY OpenShift SYSTEM "modules/openshift.xml">
|
||||||
<!ENTITY AdminPermissions SYSTEM "modules/admin-permissions.xml">
|
<!ENTITY AdminPermissions SYSTEM "modules/admin-permissions.xml">
|
||||||
|
<!ENTITY PerRealmAdminPermissions SYSTEM "modules/per-realm-admin-permissions.xml">
|
||||||
<!ENTITY AdapterConfig SYSTEM "modules/adapter-config.xml">
|
<!ENTITY AdapterConfig SYSTEM "modules/adapter-config.xml">
|
||||||
<!ENTITY JBossAdapter SYSTEM "modules/jboss-adapter.xml">
|
<!ENTITY JBossAdapter SYSTEM "modules/jboss-adapter.xml">
|
||||||
<!ENTITY JavascriptAdapter SYSTEM "modules/javascript-adapter.xml">
|
<!ENTITY JavascriptAdapter SYSTEM "modules/javascript-adapter.xml">
|
||||||
|
@ -64,6 +65,7 @@ This one is short
|
||||||
&Installation;
|
&Installation;
|
||||||
&OpenShift;
|
&OpenShift;
|
||||||
&AdminPermissions;
|
&AdminPermissions;
|
||||||
|
&PerRealmAdminPermissions;
|
||||||
<chapter>
|
<chapter>
|
||||||
<title>Adapters</title>
|
<title>Adapters</title>
|
||||||
<para>
|
<para>
|
||||||
|
|
|
@ -23,6 +23,10 @@
|
||||||
Social Login. Enable Google, GitHub, Facebook, Twitter social login with no code required.
|
Social Login. Enable Google, GitHub, Facebook, Twitter social login with no code required.
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
LDAP and Active Directory support.
|
||||||
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
Optional User Registration
|
Optional User Registration
|
||||||
</listitem>
|
</listitem>
|
||||||
|
@ -32,7 +36,25 @@
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
Pluggable theme and style support for user facing screens.
|
Forgot password support. User can have an email sent to them
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
Reset password/totp. Admin can force a password reset, or set up a temporary password.
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
Not-before revocation policies per realm, application, or user.
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
User session management. Admin can view user sessions and what applications/clients have an access token. Sessions can be invalidated
|
||||||
|
per realm or per user.
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
Pluggable theme and style support for user facing screens. Login, grant pages, account mgmt, and admin console all
|
||||||
|
can be styled, branded, and tailored to your application and organizational needs.
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
|
@ -64,11 +86,14 @@
|
||||||
Admin Console for managing users, roles, role mappings, applications, user sessions, allowed CORS web origins, and OAuth clients.
|
Admin Console for managing users, roles, role mappings, applications, user sessions, allowed CORS web origins, and OAuth clients.
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
Account Management console that allows users to manage their own account
|
Account Management console that allows users to manage their own account, view their open sessions, reset passwords, etc.
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
Deployable as a WAR, appliance, or on Openshift.
|
Deployable as a WAR, appliance, or on Openshift.
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
Multitenancy support. You can host and manage multiple realms for multiple organizations.
|
||||||
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
Supports JBoss AS7, EAP 6.x, Wildfly and JavaScript applications. Plans to support Node.js, RAILS, GRAILS, and other non-Java deployments
|
Supports JBoss AS7, EAP 6.x, Wildfly and JavaScript applications. Plans to support Node.js, RAILS, GRAILS, and other non-Java deployments
|
||||||
</listitem>
|
</listitem>
|
||||||
|
@ -100,7 +125,7 @@
|
||||||
<section>
|
<section>
|
||||||
<title>How Does Security Work in Keycloak?</title>
|
<title>How Does Security Work in Keycloak?</title>
|
||||||
<para>
|
<para>
|
||||||
Keycloak uses <emphasis>access tokens</emphasis>. Access tokens contains security metadata specifying the
|
Keycloak uses <emphasis>access tokens</emphasis> to secure web invocations. 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
|
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
|
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.
|
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.
|
||||||
|
@ -114,7 +139,7 @@
|
||||||
no need for them to store any security metadata locally other than the public key of the realm.
|
no need for them to store any security metadata locally other than the public key of the realm.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Signed access tokens can also be proprogated by REST client requests within an <literal>Authorization</literal>
|
Signed access tokens can also be propagated by REST client requests within an <literal>Authorization</literal>
|
||||||
header. This is great for distributed integration as applications can request a login from a client to obtain
|
header. This is great for distributed integration as applications can request a login from a client to obtain
|
||||||
an access token, then invoke any aggregated REST invocations to other services using that access token. So,
|
an access token, then invoke any aggregated REST invocations to other services using that access token. So,
|
||||||
you have a distributed security model that is centrally managed, yet does not require a Keycloak Server hit
|
you have a distributed security model that is centrally managed, yet does not require a Keycloak Server hit
|
||||||
|
|
|
@ -1,13 +1,20 @@
|
||||||
<chapter id="admin-permissions">
|
<chapter id="admin-permissions">
|
||||||
<title>Admin Access Control</title>
|
<title>Master Admin Access Control</title>
|
||||||
<para>
|
<para>
|
||||||
Access to The Admin Console and REST endpoints can be controlled by mapping roles to users in the <literal>keycloak-admin</literal> realm.
|
You can create and manage multiple realms by logging into the <literal>master</literal> Keycloak admin console
|
||||||
|
at <literal>/{keycloak-root/admin/index.html</literal>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Users in the Keycloak <literal>master</literal> realm can be granted permission to manage zero or more realms that are
|
||||||
|
deployed on the Keycloak server. When a realm is created, Keycloak automatically creates various roles that grant fine-grain
|
||||||
|
permissions to access that new realm.
|
||||||
|
Access to The Admin Console and REST endpoints can be controlled by mapping these roles to users in the <literal>master</literal> realm.
|
||||||
It's possible to create multiple super users as well as users that have only access to certain operations in specific realms.
|
It's possible to create multiple super users as well as users that have only access to certain operations in specific realms.
|
||||||
</para>
|
</para>
|
||||||
<section>
|
<section>
|
||||||
<title>Global Roles</title>
|
<title>Global Roles</title>
|
||||||
<para>
|
<para>
|
||||||
There are two realm roles in the <literal>keycloak-admin</literal> realm. These are:
|
There are two realm roles in the <literal>master</literal> realm. These are:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
<literal>admin</literal> - This is the super-user role and grants permissions to all operations on all realms
|
<literal>admin</literal> - This is the super-user role and grants permissions to all operations on all realms
|
||||||
|
@ -18,7 +25,7 @@
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
To add these roles to a user select the <literal>keycloak-admin</literal> realm, then click on <literal>Users</literal>.
|
To add these roles to a user select the <literal>master</literal> realm, then click on <literal>Users</literal>.
|
||||||
Find the user you want to grant permissions to, open the user and click on <literal>Role Mappings</literal>. Under
|
Find the user you want to grant permissions to, open the user and click on <literal>Role Mappings</literal>. Under
|
||||||
<literal>Realm Roles</literal> assign any of the above roles to the user by selecting it and clicking on the right-arrow.
|
<literal>Realm Roles</literal> assign any of the above roles to the user by selecting it and clicking on the right-arrow.
|
||||||
</para>
|
</para>
|
||||||
|
@ -27,7 +34,7 @@
|
||||||
<section>
|
<section>
|
||||||
<title>Realm Specific Roles</title>
|
<title>Realm Specific Roles</title>
|
||||||
<para>
|
<para>
|
||||||
Each realm in Keycloak is represented by an application in the <literal>keycloak-admin</literal> realm. The name of the application
|
Each realm in Keycloak is represented by an application in the <literal>master</literal> realm. The name of the application
|
||||||
is <literal><realm name>-realm</literal>. This allows assigning access to users for individual realms. The
|
is <literal><realm name>-realm</literal>. This allows assigning access to users for individual realms. The
|
||||||
roles available are:
|
roles available are:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
|
@ -60,10 +67,10 @@
|
||||||
Manage roles includes permissions to view (for example a user with manage-realm role can also view the realm configuration).
|
Manage roles includes permissions to view (for example a user with manage-realm role can also view the realm configuration).
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
To add these roles to a user select the <literal>keycloak-admin</literal> realm, then click on <literal>Users</literal>.
|
To add these roles to a user select the <literal>master</literal> realm, then click on <literal>Users</literal>.
|
||||||
Find the user you want to grant permissions to, open the user and click on <literal>Role Mappings</literal>. Under
|
Find the user you want to grant permissions to, open the user and click on <literal>Role Mappings</literal>. Under
|
||||||
<literal>Application Roles</literal> select the application that represents the realm you're adding permissions to
|
<literal>Application Roles</literal> select the application that represents the realm you're adding permissions to
|
||||||
(<literal><realm name>-realm</literal>), then assign any of the above roles to the user by selecting it and clicking on the right-arrow.
|
(<literal><realm name>-realm</literal>), then assign any of the above roles to the user by selecting it and clicking on the right-arrow.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
59
docbook/reference/en/en-US/modules/per-realm-admin-permissions.xml
Executable file
59
docbook/reference/en/en-US/modules/per-realm-admin-permissions.xml
Executable file
|
@ -0,0 +1,59 @@
|
||||||
|
<chapter id="per-realm-admin-permissions">
|
||||||
|
<title>Per Realm Admin Access Control</title>
|
||||||
|
<para>
|
||||||
|
Administering your realm through the <literal>master</literal> realm as discussed in <xref linkend="admin-permissions" /> may not always be
|
||||||
|
ideal or feasible. For example, maybe you have more than one admin application that manages various admin aspects of your organization
|
||||||
|
and you want to unify all these different "admin consoles" under one realm so you can do SSO between them. Keycloak allows you to
|
||||||
|
grant realm admin privleges to users within that realm. These realm admins can participate in SSO for that realm and
|
||||||
|
visit a keycloak admin console instance that is dedicated solely for that realm by going to the url:
|
||||||
|
<literal>/{keycloak-root}/admin/{realm}/console</literal>
|
||||||
|
</para>
|
||||||
|
<section>
|
||||||
|
<title>Realm Roles</title>
|
||||||
|
<para>
|
||||||
|
Each realm has a built-in application called <literal>realm-management</literal>. This application defines
|
||||||
|
roles that define permissions that can be granted to manage the realm.
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<literal>realm-admin</literal> - This is a composite role that grants all admin privileges for managing
|
||||||
|
security for that realm.
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
These are more fine-grain roles you can assign to the user.
|
||||||
|
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<literal>view-realm</literal> - View the realm configuration
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<literal>view-users</literal> - View users (including details for specific user) in the realm
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<literal>view-applications</literal> - View applications in the realm
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<literal>view-clients</literal> - View clients in the realm
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<literal>manage-realm</literal> - Modify the realm configuration (and delete the realm)
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<literal>manage-users</literal> - Create, modify and delete users in the realm
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<literal>manage-applications</literal> - Create, modify and delete applications in the realm
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<literal>manage-clients</literal> - Create, modify and delete clients in the realm
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
Manage roles includes permissions to view (for example a user with manage-realm role can also view the realm configuration).
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
To add these roles to a user select the realm you want. Then click on <literal>Users</literal>.
|
||||||
|
Find the user you want to grant permissions to, open the user and click on <literal>Role Mappings</literal>. Under
|
||||||
|
<literal>Application Roles</literal> select <literal>realm-management</literal>, then assign any of the above roles to the user by selecting it and clicking on the right-arrow.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
</chapter>
|
|
@ -56,8 +56,8 @@ keycloak-appliance-dist-all-1.0-beta-1-SNAPSHOT/
|
||||||
<literal>standalone.bat</literal>
|
<literal>standalone.bat</literal>
|
||||||
script is used to start the server.
|
script is used to start the server.
|
||||||
After executing that, log into the admin console at<ulink
|
After executing that, log into the admin console at<ulink
|
||||||
url="http://localhost:8080/auth/rest/admin/login">
|
url="http://localhost:8080/auth/admin/index.html">
|
||||||
http://localhost:8080/auth/rest/admin/login</ulink>.
|
http://localhost:8080/auth/admin/index.html</ulink>.
|
||||||
Username: <emphasis>admin</emphasis>
|
Username: <emphasis>admin</emphasis>
|
||||||
Password: <emphasis>admin</emphasis>. Keycloak will then prompt you to
|
Password: <emphasis>admin</emphasis>. Keycloak will then prompt you to
|
||||||
enter in a new password.
|
enter in a new password.
|
||||||
|
@ -107,8 +107,11 @@ keycloak-war-dist-all-1.0-beta-1-SNAPSHOT/
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
After booting up the JBoss or Wildfly distro, you can then make sure it is installed properly
|
After booting up the JBoss or Wildfly distro, you can then make sure it is installed properly
|
||||||
by logging into the admin console at<ulink url="http://localhost:8080/auth/admin">http://localhost:8080/auth/admin</ulink>.
|
by logging into the admin console at<ulink
|
||||||
Username: <emphasis>admin</emphasis>, Password: <emphasis>admin</emphasis>. Keycloak will then prompt you to
|
url="http://localhost:8080/auth/admin/index.html">
|
||||||
|
http://localhost:8080/auth/admin/index.html</ulink>.
|
||||||
|
Username: <emphasis>admin</emphasis>
|
||||||
|
Password: <emphasis>admin</emphasis>. Keycloak will then prompt you to
|
||||||
enter in a new password.
|
enter in a new password.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
@ -315,6 +318,7 @@ keycloak-war-dist-all-1.0-beta-1-SNAPSHOT/
|
||||||
<programlisting>
|
<programlisting>
|
||||||
WARN [org.jboss.resteasy.core.ResourceLocator] (http-/127.0.0.1:8080-3)
|
WARN [org.jboss.resteasy.core.ResourceLocator] (http-/127.0.0.1:8080-3)
|
||||||
Field providers of subresource xxx will not be injected according to spec
|
Field providers of subresource xxx will not be injected according to spec
|
||||||
|
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
|
2
project-integrations/aerogear-ups/auth-server/src/main/webapp/WEB-INF/keycloak-server.json
Normal file → Executable file
2
project-integrations/aerogear-ups/auth-server/src/main/webapp/WEB-INF/keycloak-server.json
Normal file → Executable file
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"admin": {
|
"admin": {
|
||||||
"realm": "keycloak-admin"
|
"realm": "master"
|
||||||
},
|
},
|
||||||
|
|
||||||
"model": {
|
"model": {
|
||||||
|
|
2
server/src/main/resources/META-INF/keycloak-server.json
Normal file → Executable file
2
server/src/main/resources/META-INF/keycloak-server.json
Normal file → Executable file
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"admin": {
|
"admin": {
|
||||||
"realm": "keycloak-admin"
|
"realm": "master"
|
||||||
},
|
},
|
||||||
|
|
||||||
"audit": {
|
"audit": {
|
||||||
|
|
2
testsuite/integration/src/main/resources/META-INF/keycloak-server.json
Normal file → Executable file
2
testsuite/integration/src/main/resources/META-INF/keycloak-server.json
Normal file → Executable file
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"admin": {
|
"admin": {
|
||||||
"realm": "keycloak-admin"
|
"realm": "master"
|
||||||
},
|
},
|
||||||
|
|
||||||
"audit": {
|
"audit": {
|
||||||
|
|
Loading…
Reference in a new issue