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
Copy file name to clipboardExpand all lines: docs/admin/auth.md
+69-2Lines changed: 69 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -94,9 +94,9 @@ Your OIDC provider will ask you for the following parameter:
94
94
95
95
-**Redirect URI**: Set to `https://coder.domain.com/api/v2/users/oidc/callback`
96
96
97
-
### Step 2: Configure Coder with the OpenID Connect credentials
97
+
### Step 2 (Client Secret Auth): Configure Coder with the OpenID Connect credentials
98
98
99
-
Navigate to your Coder host and run the following command to start up the Coder
99
+
The most common way to authenticate with OIDC providers is with a `client_secret`. Navigate to your Coder host and run the following command to start up the Coder
### Step 2 (JWT/PKI/Certificate Auth): Configure Coder with the OpenID Connect credentials
142
+
143
+
<blockquoteclass="warning">
144
+
<p>
145
+
Only <b>Azure AD</b> has been tested with this method. Other OIDC providers may not work, as most providers add additional requirements ontop of the standard that must be implemented. If you are using another provider and run into issues, please leave an issue on our <ahref="https://github.com/coder/coder/issues">Github</a>.
146
+
</p>
147
+
</blockquote>
148
+
149
+
An alternative authentication method is to use signed JWT tokens rather than a shared `client_secret`. This requires 2 files.
150
+
- An RSA private key file
151
+
-```text
152
+
-----BEGIN RSA PRIVATE KEY-----
153
+
... Base64 encoded key ...
154
+
-----END RSA PRIVATE KEY-----
155
+
```
156
+
- The corresponding x509 certificate file
157
+
- ```text
158
+
-----BEGIN CERTIFICATE-----
159
+
... Base64 encoded x509 cert ...
160
+
-----END CERTIFICATE-----
161
+
```
162
+
163
+
You must upload the public key (the certificate) to your OIDC provider.
164
+
Reference the documentation provided by your provider on how to do this. Depending on the provider, the name for this feature varies.
- <!-- Auth0 --> Authenticate with Private Key JWT
169
+
170
+
171
+
Once the key and certificate are uploaded, you can run Coder with the files. Navigate to your Coder host and run the following command to start up the Coder server:
172
+
173
+
```console
174
+
coder server --oidc-issuer-url="https://issuer.corp.com" --oidc-email-domain="your-domain-1,your-domain-2" --oidc-client-key-file="/path/to/key.pem" --oidc-client-cert-file="/path/to/cert.pem"
175
+
```
176
+
177
+
If you are running Coder as a system service, you can achieve the same result as the command above by adding the following environment variables to the /etc/coder.d/coder.env file:
0 commit comments