Skip to content

refactor: Migrate AgentCard Identity Binding & Signature Verification to exclusive targetRef usage #177

Description

@kevincogan

Feature Description

The AgentCard Identity Binding and Signature Verification features (introduced in #176) currently include selector based fallback paths for backward compatibility with the legacy Agent CRD. This creates dual code paths in the controllers, webhooks, and tests that add complexity and maintenance burden.

The selector approach is deprecated in favor of targetRef, which directly references Deployments/StatefulSets. Keeping both paths makes the code harder to reason about and delays the broader targetRef migration tracked in #161.

Proposed Solution

Remove all selector based fallback logic from the identity binding and signature verification features so they exclusively use targetRef for workload resolution. Specifically:

  • agentcard_controller.go: Remove selector fallback from getWorkload(), delete findMatchingWorkloadBySelector and related helpers

  • agentcard_networkpolicy_controller.go: Remove selector fallback from resolveWorkload()

  • agentcardsync_controller.go: Remove selector to targetRef migration logic and selector based duplicate detection

  • agentcard_webhook.go: Enforce targetRef as required, remove selector validation

  • cmd/main.go: Default --enable-legacy-agent-crd to false

  • Tests: Migrate all identity binding and signature verification tests from Agent CRD + selector to Deployment + targetRef

  • Docs: Update identity-binding-quickstart.md and a2a-signature-verification.md to use targetRef exclusively

Scope note: This refactor only touches the code paths added by #176 (identity binding + signature verification). It does not remove the core legacy Agent CRD support from the broader codebase that is tracked separately in #161 / #168.

Want to contribute?

  • I would like to work on this issue.

Additional Context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions