feat(mosaic-portainer): PORTAINER_INSECURE flag for self-signed TLS #484
Reference in New Issue
Block a user
Delete Branch "feat/mosaic-portainer-tls-flag"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Self-signed Portainer instances (e.g. internal LAN at 10.1.1.43:9443) cause all 7 portainer wrapper scripts to fail silently with HTTP 000. curl rejects the self-signed certificate by default and the scripts interpret the empty response as a non-200 status.
Solution
Add a
PORTAINER_INSECUREenvironment variable. When set to1, aCURL_OPTS=(-k)array is populated at the top of each script (after env var validation) and passed to every curl invocation targeting the Portainer API.Changes
.shscripts inpackages/mosaic/framework/tools/portainer/updatedTesting
bash -nsyntax check: all 7 scripts passPORTAINER_INSECURE=1againsthttps://10.1.1.43:9443returned HTTP 401 (reached the API, TLS bypass confirmed). Without the flag, curl exits 60 (SSL certificate error).