bitflicker64 commented on code in PR #3449:
URL: https://github.com/apache/hugegraph/pull/3449#discussion_r4468498046


##########
helm/hugegraph/templates/hubble-deployment.yaml:
##########
@@ -150,6 +150,18 @@ spec:
                 exit 1
               fi
               {{- end }}
+              # fsGroup can widen a persisted key's permissions on volume 
mount.
+              # An environment key takes precedence; otherwise restore 
owner-only
+              # access without creating a key or following a symbolic link.
+              if [[ "${HUBBLE_TEXT2GQL_MASTER_KEY:-}" =~ ^[[:space:]]*$ &&
+                    ! -L "${HG_HUBBLE_TEXT2GQL_MASTER_KEY_FILE}" &&
+                    -f "${HG_HUBBLE_TEXT2GQL_MASTER_KEY_FILE}" ]]; then
+                if ! chmod 600 "${HG_HUBBLE_TEXT2GQL_MASTER_KEY_FILE}"; then
+                  echo "cannot secure the Text2GQL master key; ensure the file 
is owned" \
+                       "by the Hubble runAsUser and the data volume is 
writable" >&2
+                  exit 1

Review Comment:
   Addressed in `3bccd642`, and unchanged through the master merge at 
`85c0f78e`. If `chmod 600` fails, the wrapper now logs a warning and continues. 
A key the current UID cannot fix only makes Text2GQL return 503 
(`secureAttributes()` still rejects it), and the rest of Hubble starts. 
`docs/operations.md` documents moving the key's ownership before changing 
`runAsUser`, and `helm/test_helm_hubble.py` covers the warning path. Verified 
at `85c0f78e`. This thread can be resolved.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to