Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d5a950a
Start Keycloak as a Quarkus Dev Service
overheadhunter Oct 15, 2021
ca50fed
To simplify setup during quarkus:dev, pre-fill keycloak URL in setup …
overheadhunter Oct 15, 2021
51d938c
Create Realm via Web Frontend
overheadhunter Oct 15, 2021
471fc2a
clean up old realm config files
overheadhunter Oct 15, 2021
b73b30d
create realm json in frontend
overheadhunter Oct 19, 2021
25abc53
pass realm.json to web service
overheadhunter Oct 19, 2021
cd8f320
validate setup form and feedback on realmCreation
BeyerMart Oct 21, 2021
c083142
protect setup from running twice
overheadhunter Oct 26, 2021
2957c62
* enforce setup on first run
overheadhunter Oct 27, 2021
bed6846
consider "/auth" to be part of keycloak base URL
overheadhunter Oct 27, 2021
6189076
cleanup
overheadhunter Oct 27, 2021
967b6f0
create or update user entry after login
overheadhunter Oct 27, 2021
d6db572
Merge branch 'develop' into feature/setup-keycloak-realm
overheadhunter Oct 27, 2021
4710571
red text in errors
BeyerMart Oct 27, 2021
366ebb4
Include XCircleIcon
BeyerMart Oct 27, 2021
c8348af
Add alternative notification plugin
BeyerMart Oct 27, 2021
df60164
Merge branch 'develop' into feature/setup-keycloak-realm
overheadhunter Oct 29, 2021
02d8e75
use HubConfig during setup
overheadhunter Oct 29, 2021
fcc1d0d
fixed resource leak
overheadhunter Oct 29, 2021
e1af353
update axios (fixes vulnerability)
overheadhunter Oct 29, 2021
f018fd4
only sync user data right after successful login
overheadhunter Oct 29, 2021
5a3bb84
headers are optional
overheadhunter Oct 29, 2021
0675f49
fixed accessing access token in services
overheadhunter Nov 2, 2021
4470241
fixed keycloak "invalid redirect_uri" during auth
overheadhunter Nov 2, 2021
5f73171
use configured keycloak backend during vault creation
overheadhunter Nov 2, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 12 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,6 @@

Hub consists of these components:

## Keycloak (Port 8080)

Keycloak handles user authentication.

During development, run this from `keycloak` dir:

```shell
docker run --rm -p 8080:8080 \
-e KEYCLOAK_USER=admin \
-e KEYCLOAK_PASSWORD=admin \
-e KEYCLOAK_IMPORT=/cfg/cryptomator-dev-realm.json \
-v $(pwd):/cfg:ro \
quay.io/keycloak/keycloak:15.0.2 # arm64: mihaibob/keycloak:15.0.1
```
When working with powershell, run this instead of the above from the `keycloak` dir:
```powershell
docker run --rm -p 8080:8080 `
-e KEYCLOAK_USER=admin `
-e KEYCLOAK_PASSWORD=admin `
-e KEYCLOAK_IMPORT=/cfg/cryptomator-dev-realm.json `
-v ${PWD}:/cfg:ro `
quay.io/keycloak/keycloak:15.0.2
```

## Web Frontend (Port 3000)

During development, run this from `web` dir:
Expand All @@ -36,12 +12,22 @@ npm run dev

## Web Backend (Port 9090)

During development, run this from `spi` dir:
During development, start Docker, then run this from `spi` dir:

```shell
mvn compile quarkus:dev
```

Or on ARM64:

```shell
mvn compile quarkus:dev -Dquarkus.keycloak.devservices.image-name=mihaibob/keycloak:15.0.1
```

### Accessing Keycloak

Keycloak is started by Quarkus as a "Dev Service" on a system-assigned port. To access dev services, visit [http://localhost:9090/q/dev](http://localhost:9090/q/dev).

### Testing rest services via CLI:

First, access the keycloak admin web console and activate direct access grants for the `cryptomator-hub` realm.
Expand All @@ -50,7 +36,7 @@ Then, retrieve an `access_token` from keycloak:

```
export access_token=$(\
curl -X POST http://localhost:8080/auth/realms/cryptomator/protocol/openid-connect/token \
curl -X POST http://localhost:port/auth/realms/cryptomator/protocol/openid-connect/token \
--user cryptomator-hub:CHANGEME \
-H 'content-type: application/x-www-form-urlencoded' \
-d 'username=owner&password=owner&grant_type=password' | jq --raw-output '.access_token' \
Expand Down
11 changes: 1 addition & 10 deletions hub.code-workspace
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
{
"folders": [
{
"path": "keycloak"
},
{
"path": "spi"
},
{
"path": "web"
},
{
"name": "[Workspace Root]",
"name": "Cryptomator Hub",
"path": "."
}
],
Expand Down
69 changes: 0 additions & 69 deletions keycloak/cryptomator-confidential-realm.json

This file was deleted.

72 changes: 0 additions & 72 deletions keycloak/cryptomator-dev-realm.json

This file was deleted.

Loading