Skip to content

Support for filter on webhook json response body #3444

@gberche-orange

Description

@gberche-orange

Is your feature request related to a problem? Please describe.

Need to leverage a 3rd party authorization endpoint which returns the authZ decison in json body (and not as http status/headers)

Describe the solution you would like

a new filter which would combine

  • webhook filter, to specify which authZ endpoint to query
  • an opa policy on the webhook response, sharing some similarities with opaAuthorizeRequest

Describe alternatives you've considered (optional)

Using existing filters

  • webhook
  • opa filters

Additional context (optional)

Some 3rd party systems provide authorization decisions as Json documents instead of HTTP headers.

The cloudfoundry platform as a service, relies on such mechanism, where it exposes an api endpoint /v3/service_instances/:guid/permission to verify whether the current browser session is authenticated and authorized to perform two static actions: read and manage. This endpoint returns a json payload such as

{
  "manage": true,
  "read": true
}

See more details in https://docs.cloudfoundry.org/services/dashboard-sso.html#checking-user-permissions

The service uses a GET to the /v3/service_instances/:guid/permissions endpoint on the Cloud Controller. The request must include a token for an authenticated user and the service instance GUID.

Would you like to work on it?
Yes, but no golang skills and little time

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