Repository navigation
fix(rt): set a SecretKey and whitelist the pod-side referrer - #6166
Merged
Merged
Conversation
… RT warnings - $SecretKey: generated once in-cluster (ESO Password generator, CreatedOnce), mounted as RT_SiteConfig.d/20-secretkey.pm. Clears the empty-SecretKey startup warning. - @ReferrerWhitelist tickets.dmfrey.com:80: TLS ends at the gateway, so RT sees http on port 80 and showed 'features, including inline edit, do not work under the current domain'. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CEjNrDfbDNXGiM1YErw7zg
|
Note +3 added · 2 changed: 5 resources across 2 apps konflate 0.6.6 · rendered |
Contributor
HelmRelease diffmetadata.annotations.secret.reloader.stakater.com/reload (apps/v1/Deployment/observability/rt-app)
± value change
- rt-secret
+ rt-secret,rt-secretkey
spec.template.spec.containers.app.volumeMounts (apps/v1/Deployment/observability/rt-app)
+ two list entries added:
- name: secretkey
mountPath: /opt/rt/etc/RT_SiteConfig.d/20-secretkey.pm
readOnly: true
subPath: 20-secretkey.pm
- name: siteconfig
mountPath: /opt/rt/etc/RT_SiteConfig.d/10-referrer.pm
readOnly: true
subPath: 10-referrer.pm
spec.template.spec.volumes (apps/v1/Deployment/observability/rt-app)
+ two list entries added:
- name: secretkey
secret:
secretName: rt-secretkey
- name: siteconfig
configMap:
name: rt
(root level) (v1/ConfigMap/observability/rt)
+ one document added:
apiVersion: v1
kind: ConfigMap
metadata:
name: rt
namespace: observability
labels:
app.kubernetes.io/instance: rt
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: rt
helm.toolkit.fluxcd.io/name: rt
helm.toolkit.fluxcd.io/namespace: observability
data:
10-referrer.pm: |
# TLS ends at the gateway, so RT sees plain http on port 80 while
# WebDomain/WebPort say tickets.dmfrey.com:443. RT builds the
# "current" URL from the request (http, port 80) and warns "Some
# features, including inline edit, do not work under the current
# domain" when that host:port is not whitelisted. Whitelist what
# the pod actually sees.
Set(@ReferrerWhitelist, ('tickets.dmfrey.com:80'));
1;
Kustomization diffspec.values (helm.toolkit.fluxcd.io/v2/HelmRelease/observability/rt)
+ one map entry added:
configMaps:
siteconfig:
data:
10-referrer.pm: |
# TLS ends at the gateway, so RT sees plain http on port 80 while
# WebDomain/WebPort say tickets.dmfrey.com:443. RT builds the
# "current" URL from the request (http, port 80) and warns "Some
# features, including inline edit, do not work under the current
# domain" when that host:port is not whitelisted. Whitelist what
# the pod actually sees.
Set(@ReferrerWhitelist, ('tickets.dmfrey.com:80'));
1;
spec.values.controllers.app.annotations.secret.reloader.stakater.com/reload (helm.toolkit.fluxcd.io/v2/HelmRelease/observability/rt)
± value change
- rt-secret
+ rt-secret,rt-secretkey
spec.values.persistence (helm.toolkit.fluxcd.io/v2/HelmRelease/observability/rt)
+ two map entries added:
secretkey:
name: rt-secretkey
type: secret
advancedMounts:
app:
app:
- path: /opt/rt/etc/RT_SiteConfig.d/20-secretkey.pm
readOnly: true
subPath: 20-secretkey.pm
siteconfig:
type: configMap
identifier: siteconfig
advancedMounts:
app:
app:
- path: /opt/rt/etc/RT_SiteConfig.d/10-referrer.pm
readOnly: true
subPath: 10-referrer.pm
(root level) (generators.external-secrets.io/v1alpha1/Password/observability/rt-secretkey)
+ one document added:
apiVersion: generators.external-secrets.io/v1alpha1
kind: Password
metadata:
name: rt-secretkey
namespace: observability
labels:
kustomize.toolkit.fluxcd.io/name: rt
kustomize.toolkit.fluxcd.io/namespace: observability
spec:
allowRepeat: true
digits: 10
length: 64
noUpper: false
symbols: 0
(root level) (external-secrets.io/v1/ExternalSecret/observability/rt-secretkey)
+ one document added:
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: rt-secretkey
namespace: observability
labels:
kustomize.toolkit.fluxcd.io/name: rt
kustomize.toolkit.fluxcd.io/namespace: observability
spec:
dataFrom:
- sourceRef:
generatorRef:
apiVersion: generators.external-secrets.io/v1alpha1
kind: Password
name: rt-secretkey
refreshPolicy: CreatedOnce
target:
name: rt-secretkey
creationPolicy: Orphan
template:
data:
20-secretkey.pm: |
Set($SecretKey, "{{ .password }}");
1;
engineVersion: v2
Diff created by flate — Workflow run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two RT warnings:
$SecretKey(startup warning): generated once in-cluster with an ESOPasswordgenerator (refreshPolicy: CreatedOnce,creationPolicy: Orphan), mounted asRT_SiteConfig.d/20-secretkey.pm. Nothing depends on the old empty key (no TOTP enrolled).tickets.dmfrey.com:80in@ReferrerWhitelist(RT_SiteConfig.d/10-referrer.pm).RT restarts once to pick up the files (about 30 s, Recreate strategy).
🤖 Generated with Claude Code
https://claude.ai/code/session_01CEjNrDfbDNXGiM1YErw7zg