Skip to content

fix(proxy): prevent "Value not set" errors on startup and add authentication support to misp-guard - #465

Merged
ostefano merged 5 commits into
MISP:masterfrom
Diogo-Rego:fix/proxy-blank-protection-and-guard-auth
Oct 15, 2026
Merged

ostefano merged 5 commits into
MISP:masterfrom
Diogo-Rego:fix/proxy-blank-protection-and-guard-auth

Conversation

@Diogo-Rego

@Diogo-Rego Diogo-Rego commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #464

Summary of Changes

  1. Fix misp-core startup errors with unauthenticated proxy (Value not set / Setting change rejected):

    • Added "blank_protection": true to all entries in core/files/etc/misp-docker/proxy.envars.json.
    • When proxy authentication variables (PROXY_METHOD, PROXY_USER, PROXY_PASSWORD) are empty or unset, enforce_env_settings safely skips them instead of attempting to enforce empty strings ('') that CakePHP setting validation rejects.
  2. Added proxy credential support for misp-guard:

    • Updated guard/files/entrypoint.sh to check for GUARD_USER and GUARD_PASSWORD, dynamically appending --proxyauth=${GUARD_USER}:${GUARD_PASSWORD} to the mitmdump execution call when configured.
    • Exposed GUARD_USER and GUARD_PASSWORD in docker-compose.yml under the misp-guard service, keeping clean separation between proxy client settings (PROXY_*) and proxy daemon settings (GUARD_*).
  3. Masked proxy password in logs:

    • Added Proxy.password to sensitive_settings in core/files/utilities.sh so passwords are masked as <hidden> during startup when DISABLE_PRINTING_PLAINTEXT_CREDENTIALS=true.
  4. Documentation & Template Updates:

    • Updated template.env and README.md to document GUARD_USER and GUARD_PASSWORD.
    • Clarified that PROXY_USER and PROXY_PASSWORD must match GUARD_USER and GUARD_PASSWORD.
    • Added explicit notes stating that PROXY_METHOD (e.g. Basic) must be set for MISP to send credentials to the proxy.

Diogo-Rego and others added 2 commits October 14, 2026 21:01
misp-guard authentication

- Enable blank_protection for proxy settings in proxy.envars.json to
  avoid CakePHP "Value not set" rejection on empty credentials
- Add Proxy.password to sensitive_settings in utilities.sh to prevent
  leaking plain text credentials in logs
- Add GUARD_USER and GUARD_PASSWORD to misp-guard environment and
  entrypoint with mitmdump --proxyauth support
- Update template.env, docker-compose.yml, and README.md with proxy
  authentication guidance
@monjiapawne

monjiapawne commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Reproduced #464 and the blank_protection resolves it.

For the feature, this was possible before with GUARD_ARGS but I agree this is a cleaner approach.
I opened Diogo-Rego#3 on your branch with a few fixes.

@ostefano I built and tested locally. Once my changes are merged in, this should be good to go IMO.

@Diogo-Rego

Copy link
Copy Markdown
Contributor Author

Hi @monjiapawne and @ostefano,

I've merged the changes from @monjiapawne's PR and added one final documentation improvement to template.env and README.md clarifying that PROXY_METHOD=Basic is required for MISP to send credentials.

Could you please review and validate this PR when you have a moment? Thanks!

@ostefano

Copy link
Copy Markdown
Collaborator

LGTM

@ostefano
ostefano merged commit 207dbf1 into MISP:master Oct 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

misp-core entrypoint throws "Value not set" errors for default empty Proxy settings (MISP Guard)

3 participants