Configuring a dex oidc auth provider

Hi, i’m trying to configure vault so that it can authenticate with my local dex deployment. i have dex configured at

and the openid-configuration file at

i have gangway configured and working, so i’m pretty sure everything is good on the dex side. i configure dex with a client for vault:

- id: vault-client
  - ''
  name: vault-client
  secret: <string>

i am able to curl

i then attempt to configure vault with

vault auth enable oidc
vault write auth/oidc/config -<<"EOH"
  "oidc_client_id": "vault-client",
  "oidc_client_secret": "<string>",
  "default_role": "default",
  "oidc_discovery_url": ""

however, it spits out the following:

Error writing data to auth/oidc/config: Error making API request.

Code: 400. Errors:

* error checking oidc discovery URL: error creating provider with given values: NewProvider: unable to create provider: 404 Not Found: 404 page not found

can anyone point me to what i’m doing wrong?

Up please, having the same question

if you figure it out, could you let me know ?

The issue is with trailing slash in url

No, actually the issue is not with trailing slashes, but rather that the oidc_discovery_url setting, rather confusingly, needs to be supplied without the trailing /.well-known/openid-configuration, as this will be appended to whatever is passed.

1 Like