Migrations fail when legacy annotations and bespoke routing logic are copied forward without translation into the target gateway model. The result is inconsistent policy enforcement, missing plugin behavior, and operational drift between intended and actual traffic handling. Teams should inventory all annotation driven behavior first, then map each control to an equivalent gateway construct before cutover.
Why This Matters for Security Teams
Ingress migration is often treated as a routing exercise, but annotation-driven behaviour and custom plugins frequently encode security policy, auth decisions, rate limits, header handling, and upstream selection. When those details are not translated into the target gateway model, traffic may still flow while the real controls quietly disappear. That creates a gap between intended enforcement and actual enforcement, which is exactly where misconfigurations become breaches. NHI Mgmt Group notes that 97% of NHIs carry excessive privileges, widening the impact of weak control translation across service-to-service paths.
This matters because ingress is not just a network edge, it is a policy choke point. If legacy Kubernetes annotations, sidecar-specific filters, or bespoke plugin logic are left behind, teams can unintentionally expose credentials, bypass authentication gates, or break audit logging. Guidance from the NIST Cybersecurity Framework 2.0 aligns with this view: control intent must remain continuous through change, not merely documented before migration. Real-world incidents such as the JetBrains GitHub plugin token exposure and the Schneider Electric credentials breach show how overlooked access paths and exposed secrets can persist when implementation details drift.
In practice, many security teams discover the control gap only after traffic has already been migrated and enforcement failures start showing up in logs, alerts, or incident response.
How It Works in Practice
The safe way to migrate ingress traffic is to treat annotations and plugins as a policy inventory problem, not a copy-paste exercise. Start by classifying every legacy annotation and extension by function: authentication, authorization, header mutation, rewrite logic, mTLS, allowlists, observability, and rate limiting. Then map each function to the native construct in the target gateway, or decide whether it must be reimplemented as a custom filter, policy module, or external auth service. The key question is not whether the route works, but whether the original control intent still exists at runtime.
That translation step should include ownership and verification. For example, if an annotation once triggered a custom plugin for JWT validation, the target gateway must enforce equivalent validation order, error handling, and fail-closed behavior. If a plugin added request headers for downstream policy checks, confirm that those headers are still generated, protected from spoofing, and logged appropriately. NHI Mgmt Group’s Ultimate Guide to Non-Human Identities is useful here because ingress often depends on service identities and secrets that must also survive the migration without becoming long-lived exceptions.
- Inventory all annotations, CRDs, and plugin hooks before cutover.
- Document the control intent behind each one, not just the syntax.
- Map each control to a native gateway feature where possible.
- Test for parity in auth, logging, rate limiting, and header mutation.
- Fail closed when a feature has no equivalent implementation.
Teams that skip this mapping usually preserve connectivity but lose the policy behaviour they assumed was still active. These controls tend to break down when legacy ingress depended on undocumented plugin order, because the target gateway may evaluate middleware in a different sequence.
Common Variations and Edge Cases
Tighter gateway standardisation often increases migration effort, requiring organisations to balance platform simplicity against compatibility with older traffic rules. That tradeoff is real, especially in clusters where teams have accumulated years of annotation sprawl and bespoke plugins. Best practice is evolving, but there is no universal standard for translating every ingress extension into every gateway model.
Edge cases matter. Some annotations only affect observability, while others silently change security posture. A rewrite rule may look harmless until it alters host-based auth logic. A custom plugin may depend on shared state, external configuration, or secret material that the new gateway cannot consume in the same way. In those cases, migration should be staged with shadow traffic, policy diffing, and explicit rollback criteria rather than a direct cutover. If the original logic touched credentials or tokens, the risk rises further, as seen in the JetBrains Marketplace AI Plugin Campaign and the GitHub Personal Account Breach, where plugin and account trust were both part of the blast radius.
The practical rule is simple: if the old ingress behaviour cannot be expressed and tested in the new model, it should not be assumed to exist. Missing plugin equivalence is not a minor gap, it is an unverified security control.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 and CSA MAESTRO address the attack and risk surface, while NIST AI RMF, NIST CSF 2.0 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-04 | Ingress migrations often expose secrets and token handling gaps. |
| CSA MAESTRO | GOV-02 | Custom plugin logic needs governance and control ownership. |
| NIST AI RMF | GOVERN | Migration drift is a governance and accountability problem. |
| NIST CSF 2.0 | PR.AC-4 | Ingress controls affect access enforcement at the network edge. |
| NIST Zero Trust (SP 800-207) | SC-7 | Gateway migration must preserve boundary enforcement and segmentation. |
Assign control owners for each ingress behavior and verify policy parity before production cutover.
Related resources from NHI Mgmt Group
- How should teams migrate from Ingress NGINX to Gateway API without breaking existing traffic?
- How should security teams implement custom access logic without adding webhook infrastructure overhead?
- What breaks when teams generate OpenAPI specifications from natural language without review?
- How should teams migrate ingress-nginx without breaking access policies?
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on August 27, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org