Skip to content

(bug) API Key Implementation Not According to Spec #4319

@michaelmyc

Description

@michaelmyc

Observed behaviour

The current implementation uses Authorization: Bearer <api-key> header for authorization. However, the OFREP spec specifies 2 ways of authorization:

  1. API key auth with header X-API-Key: <api-key>
  2. OAuth 2.0 bearer token auth with header Authorization: Bearer <jwt-token>

Expected Behavior

We should parse X-API-Key header rather than Authorization header for api key.

I believe the best way forward is:

  1. Mark the use of Authorization header as deprecated, and update the openfeature providers to use the X-API-Key header instead of the Authorization header (a breaking change for the openfeature providers).
  2. Once we decide to start supporting OAuth 2.0 authorization, we should then make a breaking change to the proxy so that the Authorization header is treated as an OAuth JWT token.

Steps to reproduce

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:P2Medium priority

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions