Skip to content

get_effective_static_policies sends options the effective route never reads #259

Description

@saurabhjain1592

What happens

get_effective_static_policies sends EffectivePoliciesOptions (category, include_disabled, include_overridden; axonflow/policies.py:450) as query parameters (axonflow/client.py:3992-3999 at 537423270), but the platform's effective route declares no query parameter and reads none, so every option is silently ignored and the call always returns the whole tier-effective set.

Evidence

  • Spec. getaxonflow/axonflow-enterprise docs/api/agent-api.yaml declares only Authorization on GET /api/v1/static-policies/effective, at 6edf47aaf (main), 857455033, 36e0e96b7 and v10.4.0 (b10d07061).
  • Handler. HandleGetEffectivePolicies reads no query parameter: it calls h.policyRepo.GetEffective(ctx, tenantID, orgID, nil) at platform/agent/static_policy_api_handlers.go:523 (6edf47aaf) and :514 (b10d07061).
  • Live. On a Community stack at enterprise 6edf47aaf, GET /api/v1/static-policies/effective?category=security-dangerous returned all 70 policies across 10 categories, the same as the unfiltered read and as ?category=a-category-from-a-later-platform. GET /api/v1/static-policies?category=security-dangerous, whose route does read category, returned 4.

Fix shape

The Java SDK makes the same change in its static-policy category fix (getaxonflow/axonflow-sdk-java branch w3p/java-policy-category): document on EffectivePoliciesOptions and on the effective-read method that the route applies none of these options and returns the whole tier-effective set, and point callers at filtering the returned policies on their category, or at the list method, whose route applies category. Removing or deprecating the options is a separate, breaking choice for a major release.

Refs getaxonflow/axonflow-enterprise#3746

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

    v11.1.0Targets the SDK release after platform v11.1.0

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions