Skip to content

Commit

Permalink
chore: cover credentials in KongClient golden tests (#6575)
Browse files Browse the repository at this point in the history
  • Loading branch information
czeslavo authored Oct 30, 2024
1 parent 0d4d571 commit ea4944b
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 0 deletions.
47 changes: 47 additions & 0 deletions internal/dataplane/testdata/golden/credentials/default_golden.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
_format_version: "3.0"
consumers:
- acls:
- group: group
tags:
- k8s-name:consumer-acl
- k8s-namespace:default
- k8s-kind:Secret
- k8s-version:v1
basicauth_credentials:
- password: consumer-1-password
tags:
- k8s-name:consumer-basic-auth
- k8s-namespace:default
- k8s-kind:Secret
- k8s-version:v1
username: consumer-1
hmacauth_credentials:
- tags:
- k8s-name:consumer-hmac-auth
- k8s-namespace:default
- k8s-kind:Secret
- k8s-version:v1
username: consumer-1
id: 7deb6e70-60be-5dd2-b374-06551479ea5e
jwt_secrets:
- algorithm: HS256
key: key
tags:
- k8s-name:consumer-jwt
- k8s-namespace:default
- k8s-kind:Secret
- k8s-version:v1
keyauth_credentials:
- key: key
tags:
- k8s-name:consumer-key-auth
- k8s-namespace:default
- k8s-kind:Secret
- k8s-version:v1
tags:
- k8s-name:consumer
- k8s-namespace:default
- k8s-kind:KongConsumer
- k8s-group:configuration.konghq.com
- k8s-version:v1
username: consumer
65 changes: 65 additions & 0 deletions internal/dataplane/testdata/golden/credentials/in.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
apiVersion: configuration.konghq.com/v1
kind: KongConsumer
metadata:
name: consumer
namespace: default
annotations:
kubernetes.io/ingress.class: kong
username: consumer
credentials:
- consumer-basic-auth
- consumer-key-auth
- consumer-hmac-auth
- consumer-jwt
- consumer-acl
---
apiVersion: v1
kind: Secret
metadata:
name: consumer-key-auth
namespace: default
labels:
konghq.com/credential: key-auth
data:
key: "a2V5"
---
apiVersion: v1
kind: Secret
metadata:
name: consumer-basic-auth
namespace: default
labels:
konghq.com/credential: basic-auth
data:
username: "Y29uc3VtZXItMQ=="
password: "Y29uc3VtZXItMS1wYXNzd29yZA=="
---
apiVersion: v1
kind: Secret
metadata:
name: consumer-hmac-auth
namespace: default
labels:
konghq.com/credential: hmac-auth
data:
username: "Y29uc3VtZXItMQ=="
---
apiVersion: v1
kind: Secret
metadata:
name: consumer-jwt
namespace: default
labels:
konghq.com/credential: jwt
data:
key: "a2V5"
---
apiVersion: v1
kind: Secret
metadata:
name: consumer-acl
namespace: default
labels:
konghq.com/credential: acl
data:
group: "Z3JvdXA="

0 comments on commit ea4944b

Please sign in to comment.