@@ -297,7 +297,7 @@ $ kubectl apply -f examples/webhook/keystone-service.yaml
297297 $ kubectl run curl --rm -it --restart=Never --image curlimages/curl -- \
298298 -k -XPOST https://k8s-keystone-auth-service.kube-system:8443/webhook -d '
299299 {
300- "apiVersion": "authentication.k8s.io/v1beta1 ",
300+ "apiVersion": "authentication.k8s.io/v1 ",
301301 "kind": "TokenReview",
302302 "metadata": {
303303 "creationTimestamp": null
@@ -316,7 +316,7 @@ $ kubectl apply -f examples/webhook/keystone-service.yaml
316316
317317 ``` shell
318318 {
319- " apiVersion" : " authentication.k8s.io/v1beta1 " ,
319+ " apiVersion" : " authentication.k8s.io/v1 " ,
320320 " kind" : " TokenReview" ,
321321 " metadata" : {
322322 " creationTimestamp" : null
@@ -370,18 +370,18 @@ $ kubectl apply -f examples/webhook/keystone-service.yaml
370370 $ kubectl run curl --rm -it --restart=Never --image curlimages/curl -- \
371371 -k -XPOST https://k8s-keystone-auth-service.kube-system:8443/webhook -d '
372372 {
373- "apiVersion": "authorization.k8s.io/v1beta1 ",
373+ "apiVersion": "authorization.k8s.io/v1 ",
374374 "kind": "SubjectAccessReview",
375375 "spec": {
376376 "resourceAttributes": {
377377 "namespace": "default",
378378 "verb": "get",
379- "group ": "",
379+ "groups ": "",
380380 "resource": "pods",
381381 "name": "pod1"
382382 },
383383 "user": "demo",
384- "group ": ["423d41d3a02f4b77b4a9bbfbc3a1b3c6"],
384+ "groups ": ["423d41d3a02f4b77b4a9bbfbc3a1b3c6"],
385385 "extra": {
386386 "alpha.kubernetes.io/identity/project/id": ["423d41d3a02f4b77b4a9bbfbc3a1b3c6"],
387387 "alpha.kubernetes.io/identity/project/name": ["demo"],
@@ -395,7 +395,7 @@ $ kubectl apply -f examples/webhook/keystone-service.yaml
395395
396396 ``` shell
397397 {
398- " apiVersion" : " authorization.k8s.io/v1beta1 " ,
398+ " apiVersion" : " authorization.k8s.io/v1 " ,
399399 " kind" : " SubjectAccessReview" ,
400400 " status" : {
401401 " allowed" : true
@@ -409,18 +409,18 @@ $ kubectl apply -f examples/webhook/keystone-service.yaml
409409 $ kubectl run curl --rm -it --restart=Never --image curlimages/curl -- \
410410 -k -XPOST https://k8s-keystone-auth-service.kube-system:8443/webhook -d '
411411 {
412- "apiVersion": "authorization.k8s.io/v1beta1 ",
412+ "apiVersion": "authorization.k8s.io/v1 ",
413413 "kind": "SubjectAccessReview",
414414 "spec": {
415415 "resourceAttributes": {
416416 "namespace": "default",
417417 "verb": "create",
418- "group ": "",
418+ "groups ": "",
419419 "resource": "pods",
420420 "name": "pod1"
421421 },
422422 "user": "demo",
423- "group ": ["423d41d3a02f4b77b4a9bbfbc3a1b3c6"],
423+ "groups ": ["423d41d3a02f4b77b4a9bbfbc3a1b3c6"],
424424 "extra": {
425425 "alpha.kubernetes.io/identity/project/id": ["423d41d3a02f4b77b4a9bbfbc3a1b3c6"],
426426 "alpha.kubernetes.io/identity/project/name": ["demo"],
@@ -434,7 +434,7 @@ $ kubectl apply -f examples/webhook/keystone-service.yaml
434434
435435 ``` shell
436436 {
437- " apiVersion" : " authorization.k8s.io/v1beta1 " ,
437+ " apiVersion" : " authorization.k8s.io/v1 " ,
438438 " kind" : " SubjectAccessReview" ,
439439 " status" : {
440440 " allowed" : false
0 commit comments