Skip to content

Commit fe25b60

Browse files
authored
Improve invite integration (#61)
* Imporove invite integration * Update dependencies to invite * Red is for errors * Add config to invite * Update invite profile
1 parent bf00518 commit fe25b60

File tree

4 files changed

+151
-2
lines changed

4 files changed

+151
-2
lines changed

core/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ Since the OpenConext suite is composed of multiple docker containers, you can us
6565
- No profile: Starts the core services: Engineblock, manage, mujina and profile (plus loadbalancer and databases).
6666
- oidc: Starts oidc as well.
6767
- teams: Starts services needed for teams (oidcng, voot and teams)
68+
- invite: Starts services needed for Openconext-Invite (oidcng, voot and teams)
6869
- extras: Starts extras (currently pdp)
6970

7071
If you want to start all services, you can use extras. A profile can be started by using the --profile argument to the `docker compose up` command. For example:

core/docker-compose.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
#name: openconext-core
23
services:
34
haproxy:
45
image: ghcr.io/openconext/openconext-basecontainers/haproxy28:latest
@@ -28,6 +29,7 @@ services:
2829
- spdashboard.dev.openconext.local
2930
- mujina-idp.dev.openconext.local
3031
- invite.dev.openconext.local
32+
- welcome.dev.openconext.local
3133
- sbs.dev.openconext.local
3234
- spdashboard.dev.openconext.local
3335
hostname: haproxy.docker
@@ -226,6 +228,7 @@ services:
226228
- "oidc"
227229
- "teams"
228230
- "extras"
231+
- "invite"
229232

230233
oidcplaygroundgui:
231234
image: ghcr.io/openconext/openconext-oidc-playground/oidc-playground-gui:3.0.1
@@ -304,16 +307,21 @@ services:
304307
volumes:
305308
- ./haproxy/haproxy.crt:/certificates/haproxy.crt
306309
- ./cacert/__cacert_entrypoint.sh:/__cacert_entrypoint.sh
310+
- ./invite:/config
307311
networks:
308312
coreconextdev:
309313
entrypoint: /__cacert_entrypoint.sh
314+
depends_on:
315+
oidcng:
316+
condition: service_started
310317
command: "java -jar app.jar --spring.profiles.active=devconf"
311318
hostname: inviteserver.docker
312319
working_dir: /
313320
profiles:
314321
- "php"
315322
- "teams"
316323
- "extras"
324+
- "invite"
317325

318326
inviteclient:
319327
image: ghcr.io/openconext/openconext-invite/inviteclient:0.0.23
@@ -330,9 +338,12 @@ services:
330338
condition: service_healthy
331339
mariadb:
332340
condition: service_healthy
341+
inviteserver:
342+
condition: service_started
333343
profiles:
334344
- "extras"
335345
- "teams"
346+
- "invite"
336347

337348
invitewelcome:
338349
image: ghcr.io/openconext/openconext-invite/invitewelcome:0.0.23
@@ -349,9 +360,12 @@ services:
349360
condition: service_healthy
350361
mariadb:
351362
condition: service_healthy
363+
inviteserver:
364+
condition: service_started
352365
profiles:
353366
- "extras"
354367
- "teams"
368+
- "invite"
355369

356370
voot:
357371
image: ghcr.io/openconext/openconext-voot/voot:6.2.0

core/invite/application.yml

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
---
2+
server:
3+
port: 8080
4+
error:
5+
path: "/error"
6+
include-message: always
7+
forward-headers-strategy: native
8+
servlet:
9+
session:
10+
cookie:
11+
secure: false
12+
13+
spring:
14+
main:
15+
banner-mode: "off"
16+
session:
17+
jdbc:
18+
cleanup-cron: "-"
19+
initialize-schema: always
20+
store-type: jdbc
21+
timeout: 8h
22+
mvc:
23+
log-request-details: false
24+
security:
25+
oauth2:
26+
client:
27+
registration:
28+
oidcng:
29+
client-id: invite.dev.openconext.local
30+
client-secret: secretsecret
31+
redirect-uri: "https://{baseHost}{basePort}{basePath}/login/oauth2/code/{registrationId}"
32+
authorization-grant-type: "authorization_code"
33+
scope: openid
34+
provider:
35+
oidcng:
36+
authorization-uri: "https://connect.dev.openconext.local/oidc/authorize"
37+
token-uri: "https://connect.dev.openconext.local/oidc/token"
38+
user-info-uri: "https://connect.dev.openconext.local/oidc/userinfo"
39+
jwk-set-uri: "https://connect.dev.openconext.local/oidc/certs"
40+
user-name-attribute: sub
41+
user-info-authentication-method: client_secret_basic
42+
jpa:
43+
properties:
44+
hibernate:
45+
naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
46+
dialect: org.hibernate.dialect.MySQLDialect
47+
open-in-view: false
48+
show-sql: false
49+
datasource:
50+
driver-class-name: org.mariadb.jdbc.Driver
51+
url: jdbc:mariadb://mariadb/invite?autoReconnect=true
52+
username: inviterw
53+
password: secret
54+
flyway:
55+
locations: classpath:db/mysql/migration
56+
fail-on-missing-locations: true
57+
mail:
58+
host: localhost
59+
port: 1025
60+
61+
oidcng:
62+
discovery-url: "https://connect.dev.openconext.local/oidc/.well-known/openid-configuration"
63+
introspect-url: "https://connect.dev.openconext.local/oidc/introspect"
64+
resource-server-id: inviters.dev.openconext.local
65+
resource-server-secret: secretsecret
66+
base-url: https://invite.dev.openconext.local
67+
68+
super-admin:
69+
users:
70+
- "urn:collab:person:example.com:admin"
71+
72+
institution-admin:
73+
entitlement: "urn:mace:surfnet.nl:surfnet.nl:sab:role:SURFconextverantwoordelijke"
74+
organization-guid-prefix: "urn:mace:surfnet.nl:surfnet.nl:sab:organizationGUID:"
75+
76+
gui:
77+
disclaimer:
78+
background-color: red
79+
content: DEV
80+
81+
config:
82+
client-url: "https://invite.dev.openconext.local"
83+
welcome-url: "https://welcome.dev.openconext.local"
84+
server-url: "https://invite.dev.openconext.local"
85+
server-welcome-url: "https://welcome.dev.openconext.local"
86+
eduid-entity-id: "https://login.dev.openconext.local"
87+
role-search-required: false
88+
past-date-allowed: true
89+
eduid-idp-schac-home-organization: "dev.eduid.nl"
90+
91+
feature:
92+
enable-performance-seed: False
93+
94+
# We don't encode in-memory passwords, so we need to prefix them with {noop}
95+
external-api-configuration:
96+
remote-users:
97+
- username: voot
98+
password: "secret"
99+
scopes:
100+
- voot
101+
- username: teams
102+
password: "secret"
103+
scopes:
104+
- teams
105+
- username: aa
106+
password: "secret"
107+
scopes:
108+
- attribute_aggregation
109+
- username: lifecycle
110+
password: "secret"
111+
scopes:
112+
- lifecycle
113+
- username: profile
114+
password: "secret"
115+
scopes:
116+
- profile
117+
- username: sp_dashboard
118+
password: "secret"
119+
scopes:
120+
- sp_dashboard
121+
122+
voot:
123+
group_urn_domain: urn:mace:surf.nl:test.surfaccess.nl
124+
125+
manage:
126+
# enabled: True
127+
enabled: False
128+
url: "https://manage.dev.openconext.local"
129+
user: invite
130+
password: secret
131+
# If you want to run the mock Manage against a git ignored file with sensitive data, e.g. manage/provisioning.local.json file
132+
# local: True
133+
staticManageDirectory: classpath:/manage

core/scripts/init.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
RED='\033[0;31m'
33
GREEN='\033[0;32m'
44
ORANGE='\033[0;33m'
5+
BLUE='\033[0;34m'
56
NOCOLOR='\033[0m'
67
CWD=$(dirname $0)
78
manageurl=https://manage.dev.openconext.local/manage/api/internal/
@@ -61,10 +62,10 @@ echo -e "${ORANGE}Send a PUSH in Manage, which pushes the entities to EngineBloc
6162
docker compose exec managegui curl -q -s -k -u sysadmin:secret $manageurl/push >/dev/null
6263

6364
printf "\n"
64-
echo -e "${RED}Please add the following line to your /etc/hosts:${NOCOLOR}${GREEN} \xE2\x9C\x94${NOCOLOR}"
65+
echo -e "${BLUE}Please add the following line to your /etc/hosts:${NOCOLOR}${GREEN} \xE2\x9C\x94${NOCOLOR}"
6566
printf "\n"
6667

67-
echo "127.0.0.1 engine.dev.openconext.local manage.dev.openconext.local profile.dev.openconext.local engine-api.dev.openconext.local mujina-idp.dev.openconext.local profile.dev.openconext.local connect.dev.openconext.local teams.dev.openconext.local voot.dev.openconext.local"
68+
echo "127.0.0.1 engine.dev.openconext.local manage.dev.openconext.local profile.dev.openconext.local engine-api.dev.openconext.local mujina-idp.dev.openconext.local profile.dev.openconext.local connect.dev.openconext.local teams.dev.openconext.local voot.dev.openconext.local invite.dev.openconext.local welcome.dev.openconext.local"
6869

6970
printf "\n"
7071
echo "You can now login. If you want to bring the environment down, use the command below"

0 commit comments

Comments
 (0)