shy-dress-87222
01/19/2025, 10:37 PMbrief-egg-61061
01/19/2025, 10:37 PMbrief-egg-61061
01/19/2025, 10:37 PM/decisions
endpoint on the Oathkeeper API port. 2. The API works with all HTTP methods (GET, POST, PUT, etc.) and matches every path prefixed with /decisions
. 3. You need to include specific headers in your request to provide the necessary information: - `X-Forwarded-Method`: The HTTP method of the original request - `X-Forwarded-Proto`: The protocol (http or https) of the original request - `X-Forwarded-Host`: The host of the original request - `X-Forwarded-Uri`: The URI of the original request 4. If your access rule requires authentication, you should include the appropriate authentication header (e.g., Authorization
for bearer tokens). Here's an example of how a curl request to the Decision API might look: curl -H "X-Forwarded-Method: GET" \ -H "X-Forwarded-Proto: http" \ -H "X-Forwarded-Host: myhost" \ -H "X-Forwarded-Uri: /xyz" \ -H "Authorization: Bearer sometoken" \ -X GET <http://oathkeeper-api:4456/decisions> -v
The Decision API will then return one of the following status codes: - 200 (request should be allowed) - 401 (unauthorized) - 403 (forbidden) This allows you to integrate Oathkeeper with other API Proxies like Ambassador, Kong, Envoy, and others. [Oathkeeper API Reference](https://www.ory.sh/docs/oathkeeper/reference/api) [Oathkeeper Introduction](https://www.ory.sh/docs/oathkeeper#operating-modes) Remember that the specific headers and authentication methods required may vary depending on your Oathkeeper configuration and access rules.