Skip to content

feat: report invalid fields in the permissions API #760

Closed

Description

@uniqueg

FOCA 0.22 reports invalid fields of requests as InvalidFieldsProblem (code: invalid-request, with errors listing each field by JSON Pointer or parameter), so apps can tell clients exactly what to fix. The endpoints of FOCA's own permissions API (/permissions, used by apps with access control) don't do this yet: invalid requests there still get a plain 400 Bad Request with only a detail.

Apps then report invalid fields on all their own write endpoints, but not on the permission endpoints that FOCA serves for them; cloud-registry is one example (elixir-cloud-aai/cloud-registry#317, PR elixir-cloud-aai/cloud-registry#378).

Proposal: raise InvalidFieldsProblem from the permissions API's own checks (subjects, roles, rule fields), with stable codes, and never quote rejected values in errors, as for the app endpoints. Document the codes next to the existing ones; apps then get it by upgrading FOCA.

Activity

  1. added
    priority: low
    status: triage
    type: feature
    workload: hours
    status: in progress
    and removed
    status: triage
    on Nov 9, 2026
  2. self-assigned this
    on Nov 12, 2026
  3. added this to the v0.23.0 milestone on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority: lowstatus: in progresstype: featureworkload: hours

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions