Skip to content

Commit 98603cd

Browse files
author
Krishna PMV
committed
Update README and client id
1 parent 776d655 commit 98603cd

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

Diff for: README.md

+7-10
Original file line numberDiff line numberDiff line change
@@ -89,26 +89,23 @@ kubectl create -f dex-deploy.yml
8989

9090
Now it should work: try https://login.k8s.example.org, login and retrieve k8s configuration.
9191

92-
```shell
93-
kubectl --user=janedoe get po
94-
Error from server (Forbidden): pods is forbidden: User "https://dex.k8s.example.org/dex#janedoe" cannot list pods in the namespace "auth"
95-
```
92+
You can decode the id_token to verify the returned claims using: https://jwt.io/
9693

97-
User prefix can be updated with the **--oidc-username-prefix** apiserver option.
98-
99-
* Create RBAC resource:
94+
* Create RBAC resource (assgin a group called "admins" cluster admin role):
10095

10196
```shell
102-
kubectl create -f rbac-admins.yml
97+
kubectl create -f rbac.yml
10398
```
10499

105-
Try again:
100+
Now copy paste the returned ~/.kube/config from loginapp and try:
106101

107102
```shell
108-
kubectl --user=janedoe get po
103+
kubectl get po
109104
NAME READY STATUS RESTARTS AGE
110105
dex-6f6568d499-m89z6 1/1 Running 0 7m
111106
loginapp-6474748f4b-gb5kb 1/1 Running 0 8m
112107
loginapp-6474748f4b-prq25 1/1 Running 0 8m
113108
loginapp-6474748f4b-vnvnb 1/1 Running 0 8m
114109
```
110+
111+
You can also use id_token for signing on the k8s dashboard

Diff for: dex-cm.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ data:
9393
skipApprovalScreen: true
9494
9595
staticClients:
96-
- id: login
96+
- id: loginapp
9797
redirectURIs:
9898
- 'https://login.k8s.example.org:32002/callback'
9999
name: 'Login Application'

Diff for: loginapp-cm.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ metadata:
77
data:
88
config.yaml: |
99
debug: false
10-
client_id: "login"
10+
client_id: "loginapp"
1111
client_secret: 4TORGiNV9M54BTk1v7dNuFSaI6hUjfjr
1212
issuer_url: "https://dex.k8s.example.org:32000/dex"
1313
issuer_root_ca: "/etc/ssl/ca.pem"

0 commit comments

Comments
 (0)