Skip to content

Commit 49bb00a

Browse files
committed
WIP
1 parent 794e531 commit 49bb00a

File tree

4 files changed

+9
-41
lines changed

4 files changed

+9
-41
lines changed

roles/sbs/defaults/main.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ sbs_defaults:
7272

7373
wiki_link: "https://www.example.org/wiki"
7474

75-
backend_port: 8080
76-
num_workers: 2
77-
7875
cron_hour_of_day: 4
7976
seed_allowed: True
8077
api_keys_enabled: True
@@ -168,9 +165,3 @@ sbs_defaults:
168165
- 'sha256-WTC9gHKjIpzl5ub1eg/YrRy/k+jlzeyRojah9dxAApc=' # on /new-service-request
169166

170167
engine_block_api_token: secret
171-
172-
# wildcard_backend_cert:
173-
# pub: |
174-
# -----BEGIN CERTIFICATE-----
175-
# 12345
176-
# -----END CERTIFICATE-----

roles/sbs/tasks/main.yml

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -57,31 +57,8 @@
5757
- "sbs.log"
5858
- "sbs.debug.log"
5959

60-
# - name: "Copy wildcard backend cert"
61-
# copy:
62-
# content: "{{wildcard_backend_cert.pub}}"
63-
# dest: "{{sbs.cert_dir}}/backend.crt"
64-
# owner: "root"
65-
# group: "root"
66-
# mode: "0644"
67-
# notify: "Restart sbs containers"
68-
69-
# - name: "Copy https cert"
70-
# copy:
71-
# content: "{{https_cert.cert}}"
72-
# dest: "{{sbs.cert_dir}}/frontend.crt"
73-
# owner: "root"
74-
# group: "root"
75-
# mode: "0644"
76-
# notify: "Restart sbs containers"
77-
78-
# - name: "Install database certificate"
79-
# copy:
80-
# dest: "{{sbs.db_cert_path}}"
81-
# content: "{{ sbs.db_tls_cert }}"
82-
# owner: "root"
83-
# group: "root"
84-
# mode: "0644"
60+
# Create dummy file in certs dir to pacify container pre-init script
61+
# https://github.com/SURFscz/SBS/pull/2312
8562
- name: "Touch file in {{ sbs.cert_dir }}"
8663
ansible.builtin.file:
8764
path: "{{sbs.cert_dir}}/dummy"

roles/sbs/templates/config.yml.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ api_users:
3030
{% endfor %}
3131

3232
oidc:
33-
client_id: "{{ sbs.client_id }}"
34-
client_secret: "{{ sbs.client_secret }}"
33+
client_id: "{{ sbs.oidc_client_id }}"
34+
client_secret: "{{ sbs.oidc_client_secret }}"
3535
audience: "{{ sbs.oidc_jwt_audience }}"
3636
verify_peer: {{ sbs.oidc_verify_peer }}
3737
authorization_endpoint: "{{ sbs.oidc_authz_endpoint}}"
@@ -45,7 +45,7 @@ oidc:
4545
second_factor_authentication_required: {{ sbs.second_factor_authentication_required }}
4646
totp_token_name: "{{ sbs.totp_token_name }}"
4747
# The service_id in the proxy_authz endpoint when logging into SBS. Most likely to equal the oidc.client_id
48-
sram_service_entity_id: "{{ sbs.client_id }}"
48+
sram_service_entity_id: "{{ sbs.oidc_client_id }}"
4949
scopes: {{ sbs.oidc_scopes }}
5050

5151
base_scope: "{{ base_domain }}"

roles/sbs/templates/sbs-apache.conf.j2

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
1212
RewriteRule ^/(.*)$ /index.html [L]
1313

1414
ProxyRequests off
15-
ProxyPassMatch ^/(api|pam-weblogin|flasgger_static|swagger|health|config|info) http://sbs-server:{{sbs.backend_port}}/
16-
ProxyPassReverse / http://sbs-server:{{sbs.backend_port}}/
17-
ProxyPass /socket.io/ ws://sbs-server:{{sbs.backend_port}}/socket.io/
18-
ProxyPassReverse /socket.io/ ws://sbs-server:{{sbs.backend_port}}/socket.io/
15+
ProxyPassMatch ^/(api|pam-weblogin|flasgger_static|swagger|health|config|info) http://sbs-server:8080/
16+
ProxyPassReverse / http://sbs-server:8080/
17+
ProxyPass /socket.io/ ws://sbs-server:8080/socket.io/
18+
ProxyPassReverse /socket.io/ ws://sbs-server:8080/socket.io/
1919

2020
<If "%{REQUEST_URI} =~ m#^/api/images/#">
2121
Header set Cache-Control: "public, max-age=31536000, immutable"

0 commit comments

Comments
 (0)