Skip to content

Commit 54b468b

Browse files
committed
configure ark/oidc in chart and tests
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
1 parent fce42cc commit 54b468b

5 files changed

Lines changed: 51 additions & 0 deletions

File tree

deploy/charts/disco-agent/templates/configmap.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ data:
1919
{{- . | toYaml | nindent 6 }}
2020
{{- end }}
2121
data-gatherers:
22+
- kind: oidc
23+
name: ark/oidc
2224
- kind: k8s-discovery
2325
name: ark/discovery
2426
- kind: k8s-dynamic

deploy/charts/disco-agent/tests/__snapshot__/configmap_test.yaml.snap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ custom-cluster-description:
77
cluster_description: "A cloud hosted Kubernetes cluster hosting production workloads.\n\nteam: team-1\nemail: team-1@example.com\npurpose: Production workloads\n"
88
period: "12h0m0s"
99
data-gatherers:
10+
- kind: oidc
11+
name: ark/oidc
1012
- kind: k8s-discovery
1113
name: ark/discovery
1214
- kind: k8s-dynamic
@@ -114,6 +116,8 @@ custom-cluster-name:
114116
cluster_description: ""
115117
period: "12h0m0s"
116118
data-gatherers:
119+
- kind: oidc
120+
name: ark/oidc
117121
- kind: k8s-discovery
118122
name: ark/discovery
119123
- kind: k8s-dynamic
@@ -221,6 +225,8 @@ custom-period:
221225
cluster_description: ""
222226
period: "1m"
223227
data-gatherers:
228+
- kind: oidc
229+
name: ark/oidc
224230
- kind: k8s-discovery
225231
name: ark/discovery
226232
- kind: k8s-dynamic
@@ -328,6 +334,8 @@ defaults:
328334
cluster_description: ""
329335
period: "12h0m0s"
330336
data-gatherers:
337+
- kind: oidc
338+
name: ark/oidc
331339
- kind: k8s-discovery
332340
name: ark/discovery
333341
- kind: k8s-dynamic

examples/machinehub.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
# go run . agent --one-shot --machine-hub -v 6 --agent-config-file ./examples/machinehub.yaml
1313

1414
data-gatherers:
15+
# Gather Kubernetes OIDC information
16+
- name: ark/oidc
17+
kind: oidc
18+
1519
# Gather Kubernetes API server version information
1620
- name: ark/discovery
1721
kind: k8s-discovery

examples/machinehub/input.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,34 @@
11
[
2+
{
3+
"data-gatherer": "ark/oidc",
4+
"data": {
5+
"openid_configuration": {
6+
"id_token_signing_alg_values_supported": [
7+
"RS256"
8+
],
9+
"issuer": "https://kubernetes.default.svc.cluster.local",
10+
"jwks_uri": "https://10.10.1.2:6443/openid/v1/jwks",
11+
"response_types_supported": [
12+
"id_token"
13+
],
14+
"subject_types_supported": [
15+
"public"
16+
]
17+
},
18+
"jwks": {
19+
"keys": [
20+
{
21+
"alg": "RS256",
22+
"e": "AQAB",
23+
"kid": "C-2916LkMJqepqULK2nqhq6uzVB6So_yyGnqyuor71Q",
24+
"kty": "RSA",
25+
"n": "sYh6rDpl5DyzBk8qlnYXo6Sf9WbplnXJv3tPxWTvhCFsVu9G5oWjknkafVDq5UOJrlybJJNjBmUyiEi1wbdnuhceJS7rZ3sRnNp3aNoS0omCR6iHJCOuoboSlcaPuRmYw4oWXlVUXlKyw8PYPVbNCcTLuq9nqf8y33mIqe7XJsf5-Z5P05WbK9Rzj-SJvlZLQ4dSFtIiwqLkm_2fpRLj0d8Af1F6vuztnhhUE2_PDsfIWdl_kJKkrK3B5x7k5tgTyFrNQPzlRBgK9jmK0HskwAFIDaLKb7FUWuUiQjn94rjKCED4iy201YPAoZBKIHFDlFVkQ_S3quwPcRyOS18r7w",
26+
"use": "sig"
27+
}
28+
]
29+
}
30+
}
31+
},
232
{
333
"data-gatherer": "ark/discovery",
434
"data": {

pkg/client/client_cyberark_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,13 @@ func fakeReadings() []*api.DataReading {
104104
}
105105

106106
return append([]*api.DataReading{
107+
{
108+
DataGatherer: "ark/oidc",
109+
Data: &api.OIDCDiscoveryData{
110+
OIDCConfigError: "Failed to fetch /.well-known/openid-configuration: 404 Not Found",
111+
JWKSError: "Failed to fetch /openid/v1/jwks: 404 Not Found",
112+
},
113+
},
107114
{
108115
DataGatherer: "ark/discovery",
109116
Data: &api.DiscoveryData{

0 commit comments

Comments
 (0)