You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 15, 2025. It is now read-only.
`dexter` is a OIDC (OpenId Connect) helper to create a hassle-free Kubernetes login experience powered by Google or Azure as Identity Provider.
6
4
All you need is a properly configured Google or Azure client ID & secret.
7
5
@@ -50,39 +48,101 @@ writing.
50
48
51
49
## Installation
52
50
53
-
You can download a prebuilt version from the [Github release section](https://github.com/gini/dexter/releases) or build it yourself:
51
+
You can download a prebuilt version from the [Github release section](https://github.com/gini/dexter/releases) or build it yourself.
52
+
The easiest way to get everything set up correctly (e.g. ldflags) is to use [goreleaser](https://goreleaser.com).
Check `./dist` for the build that matches your platform.
61
92
62
-
# MacOS
63
-
OS=darwin make
64
-
```
93
+
### Embed credentials and template
65
94
66
-
It is possible to embed your Google credentials into the resulting binary.
95
+
You can also customize the build and embed client credentails and a default kubectl config into the binary. Again, using `goreleaser` for the build is the easiest approach.
96
+
Client credentials are embedded automatically when you set two environment variables.
67
97
68
98
```
69
-
CLIENT_ID=abc123.apps.googleusercontent.com CLIENT_SECRET=mySecret OS=linux make
99
+
CLIENT_ID=abc123.apps.googleusercontent.com
100
+
CLIENT_SECRET=mySecret
70
101
```
71
102
72
-
You can streamline your user experience even more by also specifying a
73
-
default provider. `dexter auth` will then run the specified provider.
103
+
You can streamline your user experience even more by also specifying a default provider. `dexter auth` will then run the specified provider.
74
104
Valid choices are `google` and `azure`.
75
105
76
106
```
77
-
DEFAULT_PROVIDER=google make
107
+
DEFAULT_PROVIDER=google
108
+
```
109
+
110
+
If you want to to change the default config template that is deployed when there is no config on the system you have to replace the contents of `./tmpl/kube-config.yaml` with your valid kubectl configuration.
111
+
This can come in handy if you want to pre-populate clusters and certificates.
Please make sure that you have `{{ .User }}` in all contexts that need you want to enrich with the OIDC account you are about to configure.
139
+
80
140
## Run dexter
81
141
82
142
Run `dexter` without a command to access the help screen/intro.
83
143
84
144
```
85
-
❯ ./build/dexter_darwin_amd64
145
+
❯ ./dexter
86
146
.___ __
87
147
__| _/____ ___ ____/ |_ ___________
88
148
/ __ |/ __ \\ \/ /\ __\/ __ \_ __ \
@@ -111,9 +171,9 @@ Use "dexter [command] --help" for more information about a command.
111
171
Running `dexter auth [Idp]` will start the authentication process.
112
172
113
173
```
114
-
❯ ./build/dexter_darwin_amd64 auth --help
174
+
❯ ./dexter auth --help
115
175
Use a provider sub-command to authenticate against your identity provider of choice.
116
-
For details go to: https://blog.gini.net/
176
+
For details go to: https://gini.net/en/blog/frictionless-kubernetes-openid-connect-integration/
117
177
118
178
Usage:
119
179
dexter auth [flags]
@@ -124,15 +184,15 @@ Available Commands:
124
184
google Authenticate with the Google Identity Provider
125
185
126
186
Flags:
127
-
-c, --callback string Callback URL. The listen address is dreived from that. (default "http://127.0.0.1:64464/callback")
128
-
-i, --client-id string Google clientID (default "REDACTED")
129
-
-s, --client-secret string Google clientSecret (default "REDACTED")
130
-
-d, --dry-run Toggle config overwrite
131
-
-h, --help help for auth
132
-
-k, --kube-config string Overwrite the default location of kube config (default "/Users/dkerwin/.kube/config")
133
-
-t, --kube-config-template stringTemplate to bootstrap a empty kube config from. Must be an open HTTP endpoint serving the raw file
134
-
-u, --kube-username string Username identifier in the kube config
135
-
-f, --write-email string Write user email to the specified file for use with other tooling
187
+
-c, --callback string Callback URL. The listen address is dreived from that. (default "http://127.0.0.1:64464/callback")
188
+
-i, --client-id string Google clientID (default "REDACTED")
189
+
-s, --client-secret string Google clientSecret (default "REDACTED")
190
+
-d, --dry-run Toggle config overwrite
191
+
-h, --help help for auth
192
+
-k, --kube-config string Overwrite the default location of kube config (default "/Users/dkerwin/.kube/config")
193
+
-t, --kube-template Use the embedded template when there is no kubectl configuration (default true)
194
+
-u, --kube-username string Username identifier in the kube config
195
+
-f, --write-email string Write user email to the specified file for use with other tooling
0 commit comments