Bad Request Unregistered redirect_uri
" error message if the value of staticClients:redirectURIs
is not correctly set in the dex configmap
.dex configmap
YAML file and make sure that the value of redirectURIs
(seen in red text below) has the IP address of a workload cluster node and the port number of the NodePort
service (usually 30166
). This IP address should also be the same IP address that you would use to browse the Gangway service.03-cm.yaml
:
... staticClients: - id: ldap-demo2 redirectURIs: - 'https://10.x.x.x:30166/callback' ...
2. Once the redirectURIs
value is corrected in the YAML file. You should apply the changes by running the following command:
$ kubectl apply -f 03-cm.yaml configmap/dex configured $
3. Then restart the Dex pod by finding its name and deleting it.
$ kubectl get pods -n tanzu-system-auth NAME READY STATUS RESTARTS AGE dex-6849555c67-mgrs9 1/1 Running 0 5d22h $ kubectl -n tanzu-system-auth delete pod dex-6849555c67-mgrs9 pod "dex-6849555c67-mgrs9" deleted $
Afterwards, list the pods again to make sure a new one is running.
$ kubectl get pods -n tanzu-system-auth NAME READY STATUS RESTARTS AGE dex-6849555c67-qpdpd 1/1 Running 0 9s $
Then try to browse the Gangway service again. The above steps should solve the issue as described.