Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/onboarding module #1

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
874ed84
chore: update dependencies
kojofl Mar 1, 2023
a265f12
chore: add keycloak to dev docker file to enable testing
kojofl Mar 1, 2023
a64d4bd
chore: configure module settings
kojofl Mar 1, 2023
bb9b020
chore: define idp interface
kojofl Mar 1, 2023
cb13ca6
chore: define onboarding specific config
kojofl Mar 1, 2023
65a2d00
chore: define KeycloakUser
kojofl Mar 1, 2023
04c4517
feat: implement onboarding module with keycloak as idp
kojofl Mar 1, 2023
9981d01
chore: adjust config
kojofl Mar 2, 2023
df413e5
feat: implement registration and onboarding with keycloak
kojofl Mar 2, 2023
17a4d30
feat: implement custom password
kojofl Mar 2, 2023
2d50d1f
feat: make Event failable
kojofl Mar 3, 2023
3d7fdcc
feat: add password generation
kojofl Mar 3, 2023
20cebbc
feat: make automatic setup opt in
kojofl Mar 3, 2023
05f1ef2
feat: add Login event
kojofl Mar 6, 2023
883bc13
feat: add optional login feature
kojofl Mar 6, 2023
f8533c6
feat: add impersonation for keycloak
kojofl Mar 6, 2023
7c1eca9
feat: add loginQR logic
kojofl Mar 6, 2023
19f8096
feat: add login event handler
kojofl Mar 6, 2023
ec9e9eb
chore: remove resolved TODO
kojofl Mar 6, 2023
0153fec
chore: update config structure
kojofl Mar 7, 2023
4fe1642
feat: error handling and module endpoints
kojofl Mar 7, 2023
c69538f
chore: update config
kojofl Mar 8, 2023
368f39a
feat: implement userid strategy
kojofl Mar 8, 2023
d7fff92
feat: use session store and add expire manager
kojofl Mar 8, 2023
8e2395d
chore: update naming
kojofl Mar 8, 2023
f7fd034
feat: update config names and implement store and expire manager
kojofl Mar 10, 2023
0c1ccba
feat: allow allready connected users to onboard to existing account
kojofl Mar 10, 2023
4f4a1ba
feat: actually create keycloak attribute, better error messages, send…
kojofl Mar 10, 2023
4dd2e2c
chore: udpate error code
kojofl Mar 10, 2023
0b22659
feat: shortest possible enmeshed address
kojofl Mar 13, 2023
1a4df59
fix: reject relationship if an error occured
kojofl Mar 13, 2023
f166375
Merge branch 'main' into feature/onboardingModule
kojofl Mar 13, 2023
1615a75
chore: remove dependencies
kojofl Mar 13, 2023
4e53671
chore: adjust to PR feedback
kojofl Mar 27, 2023
44ec674
chore: adjust to PR feedback
kojofl Mar 27, 2023
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
26 changes: 26 additions & 0 deletions .dev/docker-compose.debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,33 @@ services:
depends_on:
- mongo
- mongo-express
- keycloaky
stdin_open: true
tty: true

keycloaky:
kojofl marked this conversation as resolved.
Show resolved Hide resolved
container_name: keycloaky
image: quay.io/keycloak/keycloak:latest
environment:
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: Pa55w0rd
ports:
- 8081:8080
volumes:
- ./keycloak.conf:/opt/keycloak/conf/keycloak.conf:ro
command: start-dev
depends_on:
- postgresy

postgresy:
kojofl marked this conversation as resolved.
Show resolved Hide resolved
container_name: postgresy
image: postgres
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password

bc-2:
build:
Expand Down Expand Up @@ -70,3 +95,4 @@ services:

volumes:
mongo_data:
postgres_data:
15 changes: 15 additions & 0 deletions .dev/keycloak.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Basic settings for running in production. Change accordingly before deploying the server.
kojofl marked this conversation as resolved.
Show resolved Hide resolved

# Database
db=postgres
db-username=keycloak
db-password=password
db-url=jdbc:postgresql://postgresy:5432/keycloak

# Misc
features=token-exchange,admin_fine_grained_authz
http-enabled=true
hostname-strict=false

# for prod
# proxy=passthrough
7 changes: 7 additions & 0 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@
"enabled": false,
"displayName": "AMQP Publisher",
"location": "amqpPublisher/AMQPPublisherModule"
},
"idpOnboarding": {
kojofl marked this conversation as resolved.
Show resolved Hide resolved
"enabled": false,
"displayName": "Onboarding",
"location": "onboarding/Onboarding",

"requiredInfrastructure": ["httpServer"]
}
}
}
53 changes: 51 additions & 2 deletions config/dev.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,57 @@
{
"transportLibrary": {
"baseUrl": "http://dev.enmeshed.eu"
"baseUrl": "https://bird.enmeshed.eu",
"platformClientId": "dev",
"platformClientSecret": "SY3nxukl6Xn8kGDk52EwBKXZMR9OR5"
},
"infrastructure": {
"httpServer": {
"cors": {
"origin": true
}
}
},
"modules": {
"amqpPublisher": { "url": "amqp://rabbitmq", "exchange": "nmshd" }
"amqpPublisher": { "url": "amqp://rabbitmq", "exchange": "nmshd" },
"sync": {
"enabled": true,
"interval": 10
},
"webhooksV2": {
"enabled": true,
"targets": {
"onboard": {
"url": "http://localhost:2901/api/v1/test",
"headers": { "X-API-KEY": "xxx" }
},
"register": {
"url": "http://localhost:2901/api/v1/test",
"headers": { "X-API-KEY": "xxx" }
}
},
"webhooks": [
{
"triggers": ["onboarding.onboardingCompleted"],
"target": "onboard"
},
{
"triggers": ["onboarding.registrationCompleted"],
"target": "register"
}
]
},
"idpOnboarding": {
"enabled": true,
"baseUrl": "http://keycloaky:8080",
"realm": "demo",
"client": "demo-client",
"admin": {
"username": "admin",
"password": "Pa55w0rd"
},
"passwordStrategy": "setByRequest",
"userIdStrategy": "enmeshedAddress",
"authenticateUsersByEnmeshedChallenge": true
}
}
}
Loading