Skip to content

feat: allow reads by policy for login setups #168

Closed

Description

@uniqueg

Problem

Reads (GET /service-info, /services, /services/types, /services/{serviceId}, the public verification endpoints) are public: the API spec sets security: [], and FOCA only enforces access control policies on operations that require authentication. The default policies therefore have no rules for GET.

When an operator requires login for reads (with FOCA's spec patches, elixir-cloud-aai/foca#396), FOCA enforces the policies on these operations, finds no rule that allows GET for ordinary users, and returns 403 to everyone except admins: "admins only" instead of "login required".

Expected

  • Default policies that allow GET on the read endpoints for any authenticated user (*). They are never evaluated while reads are public, so nothing changes by default; once an operator requires login for reads, any logged-in user may read with a single spec patch.
  • Use FOCA's named policies (foca#396) for the defaults, so operators can tighten single rules.
  • Docs: the recipe "require login for all reads except /service-info" (a ready-to-use patch file and overlay), with FOCA's warning about patches, and a test that applies the recipe and checks: anonymous reads 401, authenticated reads 200, /service-info public.

Blocked by elixir-cloud-aai/foca#396 and a FOCA release containing it.

Activity

  1. added
    priority: medium
    status: blocked
    type: auth
    type: feature
    workload: hours
    on Oct 22, 2026
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

    priority: mediumstatus: blockedtype: authtype: featureworkload: hours

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions