Skip to content

Commit 9156c77

Browse files
committed
Add Invite SPDashboard config
This is needed to test the creation of services with SPDashboard
1 parent e656566 commit 9156c77

File tree

4 files changed

+223
-5
lines changed

4 files changed

+223
-5
lines changed

core/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ services:
290290
volumes:
291291
- ./haproxy/haproxy.crt:/certificates/haproxy.crt
292292
- ./cacert/__cacert_entrypoint.sh:/__cacert_entrypoint.sh
293+
- ./invite/serverapplication.yml:/opt/openconext/invite/serverapplication.yml
293294
networks:
294295
coreconextdev:
295296
entrypoint: /__cacert_entrypoint.sh

core/invite/serverapplication.yml

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
logging:
2+
level:
3+
org.springframework: WARN
4+
org.springframework.web: WARN
5+
org.springframework.security: WARN
6+
com.zaxxer.hikari: ERROR
7+
access: DEBUG
8+
9+
server:
10+
port: 8080
11+
error:
12+
path: "/error"
13+
include-message: always
14+
forward-headers-strategy: native
15+
servlet:
16+
session:
17+
cookie:
18+
secure: true
19+
20+
spring:
21+
main:
22+
banner-mode: "off"
23+
session:
24+
jdbc:
25+
initialize-schema: always
26+
cleanup-cron: "0 */5 * * * *"
27+
store-type: jdbc
28+
timeout: 8h
29+
mvc:
30+
log-request-details: false
31+
security:
32+
oauth2:
33+
client:
34+
registration:
35+
oidcng:
36+
client-id: "{{ invite.oidc_client_id }}"
37+
client-secret: "{{ invite.oidc_secret }}"
38+
redirect-uri: "https://{baseHost}{basePort}{basePath}/login/oauth2/code/{registrationId}"
39+
authorization-grant-type: "authorization_code"
40+
scope: openid
41+
provider:
42+
oidcng:
43+
authorization-uri: "https://connect.{{ base_domain }}/oidc/authorize"
44+
token-uri: "https://connect.{{ base_domain }}/oidc/token"
45+
user-info-uri: "https://connect.{{ base_domain }}/oidc/userinfo"
46+
jwk-set-uri: "https://connect.{{ base_domain }}/oidc/certs"
47+
user-name-attribute: sub
48+
user-info-authentication-method: client_secret_basic
49+
jpa:
50+
properties:
51+
hibernate:
52+
naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
53+
dialect: org.hibernate.dialect.MariaDBDialect
54+
open-in-view: false
55+
datasource:
56+
driver-class-name: org.mariadb.jdbc.Driver
57+
url: jdbc:mariadb://{{ invite.db_host }}/invite?autoReconnect=true
58+
username: {{ invite.db_user }}
59+
password: {{ invite.db_secret }}
60+
flyway:
61+
locations: classpath:db/mysql/migration
62+
fail-on-missing-locations: true
63+
mail:
64+
host: {{ smtp_server }}
65+
66+
crypto:
67+
development-mode: False
68+
private-key-location: file:///private_key_pkcs8.pem
69+
70+
cron:
71+
node-cron-job-responsible: {{ invite_cronjobmaster }}
72+
user-cleaner-expression: "0 0/30 * * * *"
73+
last-activity-duration-days: 1000
74+
role-expiration-notifier-expression: "0 0/30 * * * *"
75+
# Set to -1 to suppress role expiry notifications
76+
role-expiration-notifier-duration-days: 5
77+
metadata-resolver-initial-delay-milliseconds: 1
78+
metadata-resolver-fixed-rate-milliseconds: 86_400_000
79+
metadata-resolver-url: "https://metadata.{{ base_domain }}/idps-metadata.xml"
80+
81+
myconext:
82+
uri: "https://login.{{ myconext_base_domain }}/myconext/api/invite/provision-eduid"
83+
username: invite
84+
password: "{{ myconext_api_invite_password }}"
85+
86+
oidcng:
87+
discovery-url: "https://connect.{{ base_domain }}/oidc/.well-known/openid-configuration"
88+
introspect-url: "https://connect.{{ base_domain }}/oidc/introspect"
89+
resource-server-id: {{ invite.resource_server_id }}
90+
resource-server-secret: "{{ invite.resource_server_secret }}"
91+
base-url: https://invite.{{ base_domain }}
92+
93+
super-admin:
94+
users: {{ invite.super_admins }}
95+
96+
institution-admin:
97+
entitlement: "urn:mace:surfnet.nl:surfnet.nl:sab:role:SURFconextverantwoordelijke"
98+
organization-guid-prefix: "urn:mace:surfnet.nl:surfnet.nl:sab:organizationGUID:"
99+
100+
gui:
101+
disclaimer:
102+
background-color: {{ environment_ribbon_colour }}
103+
content: {{ environment_shortname }}
104+
105+
config:
106+
client-url: "https://invite.{{ base_domain }}"
107+
welcome-url: "https://welcome.{{ base_domain }}"
108+
server-url: "https://invite.{{ base_domain }}"
109+
server-welcome-url: "https://welcome.{{ base_domain }}"
110+
eduid-entity-id: "https://login.{{ myconext_base_domain }}"
111+
role-search-required: false
112+
past-date-allowed: {{ invite.past_date_allowed }}
113+
performance-seed-allowed: {{ invite.performance_seed_allowed }}
114+
eduid-idp-schac-home-organization: {{ invite.eduid_idp_schac_home_organization }}
115+
116+
feature:
117+
limit-institution-admin-role-visibility: {{ invite.limit_institution_admin_role_visibility }}
118+
enable-performance-seed: False
119+
120+
# We don't encode in-memory passwords, but they are reused so do NOT prefix them with {noop}
121+
external-api-configuration:
122+
remote-users:
123+
-
124+
username: {{ invite.vootuser }}
125+
password: "{{ invite.vootsecret }}"
126+
scopes:
127+
- voot
128+
-
129+
username: {{ invite.teamsuser}}
130+
password: "{{ invite.teamssecret }}"
131+
scopes:
132+
- teams
133+
-
134+
username: {{ aa.invite_username }}
135+
password: "{{ invite_attribute_aggregation_secret }}"
136+
scopes:
137+
- attribute_aggregation
138+
-
139+
username: {{ invite.lifecycle_user }}
140+
password: "{{ invite.lifecycle_secret }}"
141+
scopes:
142+
- lifecycle
143+
-
144+
username: {{ invite.profile_user }}
145+
password: "{{ invite.profile_secret }}"
146+
scopes:
147+
- profile
148+
-
149+
username: {{ invite.sp_dashboard_user }}
150+
password: "{{ invite.sp_dashboard_secret }}"
151+
scopes:
152+
- sp_dashboard
153+
applications:
154+
- manageId: {{ invite.sp_dashboard_manage_id }}
155+
manageType: SAML20_SP
156+
-
157+
username: {{ invite.access_user }}
158+
password: "{{ invite.access_secret }}"
159+
scopes:
160+
- access
161+
applications:
162+
- manageId: {{ invite.access_manage_id }}
163+
manageType: OIDC10_RP
164+
165+
166+
voot:
167+
group_urn_domain: "{{ invite.group_urn_domain }}"
168+
169+
email:
170+
from: "{{ noreply_email }}"
171+
contactEmail: "{{ support_email }}"
172+
environment: "{{ environment_shortname }}"
173+
enabled: true
174+
175+
manage:
176+
enabled: true
177+
url: "https://manage.{{ base_domain }}"
178+
user: {{ invite.manageuser }}
179+
password: {{ invite.managesecret }}
180+
local: False
181+
# If manage is disabled (e.g. enabled: False) the staticManageDirectory is the directory where the {metadata_type}.json files
182+
# are located. This can also be an absolute file path, e.g. file:///opt/openconext/oidc-playground/manage
183+
staticManageDirectory: classpath:/manage
184+
# staticManageDirectory: file:///usr/local/etc/manage
185+
186+
springdoc:
187+
pathsToMatch: "/api/external/v1/**"
188+
api-docs:
189+
path: "/ui/api-docs"
190+
swagger-ui:
191+
path: "/ui/api-ui.html"
192+
operationsSorter: method
193+
oauth:
194+
client-id: ${spring.security.oauth2.client.registration.oidcng.client-id}
195+
client-secret: ${spring.security.oauth2.client.registration.oidcng.client-secret}
196+
use-basic-authentication-with-access-code-grant: true
197+
198+
199+
management:
200+
health:
201+
mail:
202+
enabled: false
203+
endpoints:
204+
web:
205+
exposure:
206+
include: "health,info,mappings"
207+
base-path: "/internal"
208+
endpoint:
209+
info:
210+
enabled: true
211+
health:
212+
enabled: true
213+
mappings:
214+
enabled: true
215+
info:
216+
git:
217+
mode: full

core/spdashboard/docker-compose.override.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services:
55
volumes:
66
- ${SPDASHBOARD_CODE_PATH}:/var/www/html
77
environment:
8-
- APP_ENV=${APP_ENV:-dev}
8+
- APP_ENV=dev
99
- APP_DEBUG=true
1010
extra_hosts:
1111
# Ensure that host.docker.internal is correctly defined on Linux

core/start-dev-env.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,16 @@ while true; do
5555
# Use docker compose to start the environment but with the modified override file(s)
5656
echo -e "\nStarting the ${MODE} environment with the following command:\n"
5757

58-
echo -e "docker compose --profile oidc --profile test -f docker-compose.yml "${docker_compose_args[@]}" "${extra_compose_args}" up -d "${@:$number_of_dev_envs}"\n"
59-
docker compose --profile oidc --profile test -f docker-compose.yml ${docker_compose_args[@]} ${extra_compose_args} up -d "${@:$number_of_dev_envs}"
58+
echo -e "docker compose --profile oidc --profile test --profile teams -f docker-compose.yml "${docker_compose_args[@]}" "${extra_compose_args}" up -d "${@:$number_of_dev_envs}"\n"
59+
docker compose --profile oidc --profile test --profile teams -f docker-compose.yml ${docker_compose_args[@]} ${extra_compose_args} up -d "${@:$number_of_dev_envs}"
6060
break
6161
;;
6262
*)
6363
# Use docker compose to start the environment but with the modified override file(s)
6464
echo -e "Starting the ${MODE} environment with the following command:\n"
6565

66-
echo -e "docker compose --profile oidc --profile test -f docker-compose.yml "${docker_compose_args[@]}" "${extra_compose_args}" up "${@:$number_of_dev_envs}"\n"
67-
docker compose --profile oidc --profile test -f docker-compose.yml ${docker_compose_args[@]} ${extra_compose_args} up "${@:$number_of_dev_envs}"
66+
echo -e "docker compose --profile oidc --profile test --profile teams -f docker-compose.yml "${docker_compose_args[@]}" "${extra_compose_args}" up "${@:$number_of_dev_envs}"\n"
67+
docker compose --profile oidc --profile test --profile teams -f docker-compose.yml ${docker_compose_args[@]} ${extra_compose_args} up "${@:$number_of_dev_envs}"
6868
break
6969
;;
7070
esac

0 commit comments

Comments
 (0)