Skip to content

feat(security): allow mendys-prod ingress to fuzefront-security:3002 - #497

Merged
izzywdev merged 3 commits into
masterfrom
claude/fuzefront-issue-493-8aavl6
Aug 2, 2026
Merged

feat(security): allow mendys-prod ingress to fuzefront-security:3002#497
izzywdev merged 3 commits into
masterfrom
claude/fuzefront-issue-493-8aavl6

Conversation

@izzywdev

@izzywdev izzywdev commented Aug 2, 2026

Copy link
Copy Markdown
Owner

📋 Description

Adds an ingress NetworkPolicy for fuzefront-security (port 3002) that allows the mendys-prod namespace to reach it in-cluster. Mendys' datasets-service authenticates against FuzeFront's Security API via server-side calls to http://fuzefront-security.fuzefront.svc.cluster.local:3002/api/v1/security/session (and /authz/check + /authz/grants); today that path is only implicitly reachable, and would fail closed if the fuzefront namespace ever gained a default-deny NetworkPolicy.

Fixes #493

🔄 Type of Change

  • ✨ New feature (non-breaking change which adds functionality)

🔧 Implementation Details

Changes Made

  • Infra/Helm changes:
    • New deploy/helm/fuzefront/templates/security-networkpolicy.yaml — an ingress NetworkPolicy selecting the fuzefront-security pods (app.kubernetes.io/part-of: fuzefront, app.kubernetes.io/component: security-service), mirroring the existing authentik-networkpolicy.yaml pattern.
    • deploy/helm/fuzefront/values.yaml — new securityService.networkPolicy block (enabled: true by default, port: 3002, ingressControllerNamespace: kube-system, mendysProdNamespace: mendys-prod).

Why the policy allows more than just mendys-prod: FuzeFront ships no default-deny ingress NetworkPolicy today, so fuzefront-security currently accepts all ingress. Under k3s's NetworkPolicy controller, the moment any policy's podSelector matches a pod, that pod flips to deny-all-except-explicitly-allowed. A standalone mendys-prod→3002 rule would therefore silently break the existing Traefik reverse-proxy path (ingress.yaml: /api/v1/security, /api/auth, /api/organizations, /api/internal) and intra-namespace calls (e.g. provisioning-servicehttp://fuzefront-security:3002). So this policy enumerates Traefik (kube-system) + intra-fuzefront pods + mendys-prod, all at once — additive to who can already reach the service, not a lockdown.

Gated by securityService.networkPolicy.enabled (default true, per the issue's acceptance criteria), and only renders when securityService.enabled is also true.

🧪 Testing

  • Manual testing — helm lint, helm template (rendered against values.yaml + values-prod.yaml), and kubeconform -ignore-missing-schemas all pass on the rendered manifests.
  • Deploy-window verify after Argo syncs to prod: from a mendys-prod pod, curl -s http://fuzefront-security.fuzefront.svc.cluster.local:3002/api/v1/security/session should no longer be blocked.

Code Quality

  • Code follows the project's coding standards
  • Self-review of code completed

🔗 Related Issues and PRs

📝 Additional Notes

Deployment Notes

  • Requires configuration changes (none needed beyond this PR — Argo syncs main/master automatically per this repo's GitOps model)

No FuzeInfra-side change needed, per the issue's acceptance criteria.


Generated by Claude Code

…nt-security:3002

mendys-prod's datasets-service authenticates against FuzeFront's Security
API in-cluster (session verify + authz check/grants). Adds an ingress
NetworkPolicy for fuzefront-security that allows Traefik, intra-fuzefront
pods, and mendys-prod on TCP 3002 — enumerated together because matching
the pod's podSelector flips it from implicit-allow-all to explicit-allow-list
under k3s's NetworkPolicy controller, so the existing traffic paths must be
listed alongside the new one. Gated by securityService.networkPolicy.enabled
(default true).

Closes #493. Origin: FuzeInfra#339.
@izzywdev izzywdev added the auto-merge Enable squash auto-merge once CI passes label Aug 2, 2026 — with Claude
@github-actions
github-actions Bot enabled auto-merge (squash) August 2, 2026 15:02
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Automated code review (gate-code-review)

Credit balance is too low

Report-only — this check never blocks merge.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Automated code review (gate-code-review)

Credit balance is too low

Report-only — this check never blocks merge.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Automated code review (gate-code-review)

Credit balance is too low

Report-only — this check never blocks merge.

@izzywdev
izzywdev merged commit 178b8b9 into master Aug 2, 2026
53 checks passed
@izzywdev
izzywdev deleted the claude/fuzefront-issue-493-8aavl6 branch August 2, 2026 16:47
izzywdev added a commit that referenced this pull request Aug 4, 2026
… (#534)

`authentik.networkPolicy` and `securityService.networkPolicy` each lost their
`port` / `ingressControllerNamespace` / `fuzeagentNamespace` / `mendysProdNamespace`
keys in the wholesale values.yaml rewrite in 8dedb86 (#523, +141/-397 in a commit
about consumer-registration tokens). values-prod.yaml sets
`authentik.networkPolicy.enabled: true`, so the template then rendered

    port: 0

which the API server rejects. That failed the Argo sync of the ENTIRE fuzefront
Application, and Argo's automated-sync guard ("failed previous sync attempt to
[rev] and will not retry") made the failure sticky per revision — so every release
since reported green and shipped nothing. See FuzeInfra#501.

- Restore the deleted values (verified identical to the live in-cluster policy:
  kube-system / intra-namespace / fuzeagent on TCP 9000).
- Give every $np lookup in both NetworkPolicy templates an inline `default`, so a
  future values edit can never again turn a dropped key into a manifest that
  blocks the whole application from deploying.

`securityService.networkPolicy.enabled` was ALSO silently flipped true -> false by
8dedb86. Left false here on purpose: that policy (#497) has never actually been
applied in prod, because syncs were already failing when it landed, so enabling it
is a deliberate deploy-window change and not part of an outage fix.

Verified: `helm template -f values-prod.yaml` renders port 9000 on all three
ingress rules, and `kubectl apply --dry-run=server` against prod is accepted
("configured") — a no-op diff versus the live policy.


Claude-Session-Id: 94bc36eb-1f92-4270-8c73-085913a64127

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge Enable squash auto-merge once CI passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NetworkPolicy: allow ingress from mendys-prod to fuzefront-security:3002 (datasets-service token verify)

2 participants