Skip to content

Commit 703faf7

Browse files
committed
Policy definition fixes
1 parent 1323593 commit 703faf7

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

gateway/gateway-controller/default-policies/api-key-auth-v1.0.yaml renamed to gateway/gateway-controller/default-policies/APIKeyAuthentication-v1.0.0.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ parameters:
1111
properties:
1212
key:
1313
type: string
14-
required: true
1514
description: |
1615
The name of the header or query parameter that contains the API key.
1716
For headers: case-insensitive matching is used (e.g., "X-API-Key", "Authorization")
@@ -22,7 +21,6 @@ parameters:
2221

2322
in:
2423
type: string
25-
required: true
2624
description: |
2725
Specifies where to look for the API key.
2826
Must be either "header" or "query".
@@ -32,7 +30,6 @@ parameters:
3230

3331
value-prefix:
3432
type: string
35-
required: false
3633
description: |
3734
Optional prefix that should be stripped from the API key value before validation.
3835
Case-insensitive matching and removal. Common use case is "Bearer " for Authorization headers.
@@ -45,6 +42,6 @@ parameters:
4542
- key
4643
- in
4744

48-
initParameters:
45+
systemParameters:
4946
type: object
5047
properties: {}

gateway/policies/api-key-auth/v1.0.0/policy-definition.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ parameters:
1111
properties:
1212
key:
1313
type: string
14-
required: true
1514
description: |
1615
The name of the header or query parameter that contains the API key.
1716
For headers: case-insensitive matching is used (e.g., "X-API-Key", "Authorization")
@@ -22,7 +21,6 @@ parameters:
2221

2322
in:
2423
type: string
25-
required: true
2624
description: |
2725
Specifies where to look for the API key.
2826
Must be either "header" or "query".
@@ -32,7 +30,6 @@ parameters:
3230

3331
value-prefix:
3432
type: string
35-
required: false
3633
description: |
3734
Optional prefix that should be stripped from the API key value before validation.
3835
Case-insensitive matching and removal. Common use case is "Bearer " for Authorization headers.
@@ -45,6 +42,6 @@ parameters:
4542
- key
4643
- in
4744

48-
initParameters:
45+
systemParameters:
4946
type: object
5047
properties: {}

gateway/policies/policy-manifest.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,8 @@ policies:
5454
- name: JSONSchemaGuardrail
5555
version: v0.1.0
5656
filePath: ./json-schema-guardrail/v0.1.0
57+
58+
# API Key Authentication Policy
59+
- name: APIKeyAuthentication
60+
version: v1.0.0
61+
filePath: ./api-key-auth/v1.0.0

0 commit comments

Comments
 (0)