Skip to content

Commit 1166c74

Browse files
authored
Remove 'allowed domains' config from Hocuspocus (#273)
* Remove 'allowed domains' config from Hocuspocus * Update changeset.md
1 parent db84d92 commit 1166c74

File tree

5 files changed

+5
-67
lines changed

5 files changed

+5
-67
lines changed

.changeset/ninety-jobs-compete.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@openproject/helm-charts": patch
3+
---
4+
5+
Remove 'allowed domains' configuration from Hocuspocus - The value is not used anymore

charts/openproject/README.md

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -102,25 +102,6 @@ openproject.admin_user.name="Firstname Lastname"
102102
openproject.admin_user.mail="[email protected]"
103103
```
104104

105-
#### Real-time collaboration (Hocuspocus)
106-
107-
OpenProject supports real-time collaboration features through a WebSocket backend called Hocuspocus. To enable Hocuspocus, it is necessary to set the allowed domains for hocuspocus to communicate with:
108-
109-
```yaml
110-
hocuspocus:
111-
...
112-
113-
allowedOpenProjectDomains:
114-
- my-openproject-domain.com
115-
```
116-
117-
**Important**: The `allowedOpenProjectDomains` can be the top level domain (e.g. my-openproject-domain.com) or subdomain (e.g. openproject.example.com). No wildcards are allowed.
118-
119-
The configuration accepts multiple domains in case of a single websocket server for multiple OpenProject instances.
120-
121-
The domains are passed to the Hocuspocus container as the `ALLOWED_DOMAINS` environment variable (comma-separated). This setting is a security feature that restricts which the Hocuspocus server will be able to connect to.
122-
123-
124105
### TMP volume mounts
125106

126107
OpenProject needs some tmp volumes to be mounted in `/app/tmp` and `/tmp`, if `global.containerSecurityContext.readOnlyRootFilesystem` is set to true.

charts/openproject/templates/hocuspocus-deployment.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ spec:
6262
secretKeyRef:
6363
name: {{ .Values.hocuspocus.auth.existingSecret }}
6464
key: {{ .Values.hocuspocus.auth.secretKey }}
65-
- name: ALLOWED_DOMAINS
66-
value: {{ join "," .Values.hocuspocus.allowedOpenProjectDomains | quote }}
6765
volumeMounts:
6866
{{- include "hocuspocus.tmpVolumeMounts" . | indent 12 }}
6967
{{- if .Values.egress.tls.rootCA.fileName }}

charts/openproject/values.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -523,9 +523,6 @@ hocuspocus:
523523

524524
podAnnotations:
525525

526-
allowedOpenProjectDomains:
527-
- openproject.example.com
528-
529526
service:
530527
port: 1234
531528

spec/charts/openproject/hocuspocus_spec.rb

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -79,47 +79,4 @@
7979
expect(secret_env['valueFrom']['secretKeyRef']['key']).to eq 'secret'
8080
end
8181
end
82-
83-
context 'when allowedOpenProjectDomains is configured' do
84-
let(:default_values) do
85-
HelmTemplate.with_defaults(
86-
<<~YAML
87-
hocuspocus:
88-
enabled: true
89-
allowedOpenProjectDomains:
90-
- example.org
91-
- sometest.com
92-
YAML
93-
)
94-
end
95-
96-
it 'sets the ALLOWED_DOMAINS environment variable with comma-separated domains' do
97-
deployment = template.dig('Deployment/optest-openproject-hocuspocus')
98-
env = deployment.dig('spec', 'template', 'spec', 'containers').first['env']
99-
allowed_domains_env = env.find { |e| e['name'] == 'ALLOWED_DOMAINS' }
100-
101-
expect(allowed_domains_env).not_to be_nil
102-
expect(allowed_domains_env['value']).to eq 'example.org,sometest.com'
103-
end
104-
end
105-
106-
context 'when allowedOpenProjectDomains uses default values' do
107-
let(:default_values) do
108-
HelmTemplate.with_defaults(
109-
<<~YAML
110-
hocuspocus:
111-
enabled: true
112-
YAML
113-
)
114-
end
115-
116-
it 'sets the ALLOWED_DOMAINS environment variable with default domain' do
117-
deployment = template.dig('Deployment/optest-openproject-hocuspocus')
118-
env = deployment.dig('spec', 'template', 'spec', 'containers').first['env']
119-
allowed_domains_env = env.find { |e| e['name'] == 'ALLOWED_DOMAINS' }
120-
121-
expect(allowed_domains_env).not_to be_nil
122-
expect(allowed_domains_env['value']).to eq 'openproject.example.com'
123-
end
124-
end
12582
end

0 commit comments

Comments
 (0)