Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
giftkugel committed Mar 28, 2018
1 parent 520212f commit 53a584c
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions simple-security/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,34 @@

# Security sample

This examples shows how the security APIs of Dolphin Platform can be used. Since this sample concentrates on
the usage of that security API it do not contain any dynamic clients. The provided clients simply do a login
These examples show how the security APIs of Dolphin Platform can be used. Since These samples concentrates on
the usage of that security API they do not contain any dynamic clients. The provided clients simply do a login
against the server and call a secure REST endpoint on the server.

## How is the security implemented?

The Dolphin Platform uses [keycloak](https://www.keycloak.org) for identity and access management. By adding
The Dolphin Platform uses [Keycloak](https://www.keycloak.org) for identity and access management. By adding
the `dolphin-platform-security-server` module to the server application a proxy servlet will be added
to the server that provides login functionallity by calling the keycloak server internally.
to the server that provides login functionality by calling the Keycloak server internally.

![Keycloak workflow](readme/keycloak.png "Keycloak workflow")

The security is based on OpenID connect and JWT tokens. Once a client is login it will receive a JWT security
token. The http client of the Dolphin Platform automatically adds this token to any request against the server.
By doing so secured endpoints can be called without any additional security handling after a sucessfull login.
The security is based on OpenID connect and JWT tokens. Once a client is logged in, it will receive a JWT security
token. The HTTP client of the Dolphin Platform automatically adds this token to any request against the server.
By doing so, secured endpoints can be called without any additional security handling after a successful login.

![http client and security](readme/http-client.png "http client and security")

The server receives the security token and automatically validates it against the keycloak server.
The server receives the security token and automatically validates it against the Keycloak server.

## Start the sample

As said the sample uses keycloak for for identity and access management. Based on that a keycloak instance
is needed to run the sample. The `keycloak-container` folder contains a [docker](https://www.docker.com) container that can easily be used to run the sample.

### Keycloak docker container
The `keycloak-container` folder contains several skripts that can be used to the build, start & remove the
keycloak docker container. To run the scripts docker (and docker-compose) must be installed locally. The folder contains 3 scripts:
The `keycloak-container` folder contains several scripts that can be used to the build, start & remove the
Keycloak docker container. To run the scripts docker (and docker-compose) must be installed locally. The folder contains 2 scripts:
- `clearDocker`: This script removes the container from your local docker registry. The script can be used
to clear everything if you do not want to use the keycloak container anymore.
- `restart`: This script stops and removes the keycloak docker container if it is present. After that the container
Expand All @@ -52,10 +52,12 @@ To start the JavaFX client simply run `mvn jfx:run` from the `client-javafx` fol
started by the `com.canoo.platform.samples.security.Client` class.

### JavaScript client
TODO
To start the JavaScript client simply run `mvn jetty:run` from the `client-javascript` folder.
The client will be available in your Browser at `http://localhost:8082/`.

### Polymer client
TODO
To start the Polymer client simply run `mvn jetty:run` from the `client-polymer` folder.
The client will be available in your Browser at `http://localhost:8082/`.

## License
The project is released as open source under the [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
Expand Down

0 comments on commit 53a584c

Please sign in to comment.