# Gatekeeper client-secret not verifying

**URL:** <https://forum.keycloak.org/t/gatekeeper-client-secret-not-verifying/1294>\
**Category:** Configuring the server\
**Tags:** gatekeeper\
**Created:** [February 18, 2020, 6:14am UTC](https://forum.keycloak.org/t/gatekeeper-client-secret-not-verifying/1294 "2020-02-18T06:14:54Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raghees-butt](https://avatars.discourse-cdn.com/v4/letter/r/a88e4f/32.png) [@Raghees-butt](https://forum.keycloak.org/u/Raghees-butt)\
**Post date:** [February 18, 2020, 6:14am UTC](https://forum.keycloak.org/t/gatekeeper-client-secret-not-verifying/1294/1 "2020-02-18T06:14:54Z")

</div>

I configure gatekeeper in front of my service. I create new client with access-type `confidential` and configure that client-id and client-secret to my gatekeeper file but when I intentionally alter `client-secret` it seems like gatekeeper didn’t check for the secret. It is running without any error.  
here is my minimal configurations

```
listen: :3020
client-id: gatekeeper
client-secret: e514d9e3-b76c-4cdb-961b-bd70149c6f40
```

---

<div class="post-metadata">

**Author:** ![jangaraj](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/jangaraj/32/5175_2.png) [@jangaraj](https://forum.keycloak.org/u/jangaraj)\
**Post date:** [February 18, 2020, 9:25am UTC](https://forum.keycloak.org/t/gatekeeper-client-secret-not-verifying/1294/2 "2020-02-18T09:25:24Z")

</div>

Client secret is not used, when Gatekeeper is starting. It is used when Gatekeeper exchanges code for token. You will have a problem with user login now, but not with Gatekeeper start.

---

<div class="post-metadata">

**Author:** ![Raghees-butt](https://avatars.discourse-cdn.com/v4/letter/r/a88e4f/32.png) [@Raghees-butt](https://forum.keycloak.org/u/Raghees-butt)\
**Post date:** [February 18, 2020, 10:33am UTC](https://forum.keycloak.org/t/gatekeeper-client-secret-not-verifying/1294/3 "2020-02-18T10:33:43Z")

</div>

But I am not facing any kind of error or warning while login or requesting to that service on which I  
wrongly configure secret.

---

<div class="post-metadata">

**Author:** ![jangaraj](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/jangaraj/32/5175_2.png) [@jangaraj](https://forum.keycloak.org/u/jangaraj)\
**Post date:** [February 18, 2020, 10:35am UTC](https://forum.keycloak.org/t/gatekeeper-client-secret-not-verifying/1294/4 "2020-02-18T10:35:18Z")

</div>

Please provide [https://stackoverflow.com/help/minimal-reproducible-example](https://stackoverflow.com/help/minimal-reproducible-example).

---

<div class="post-metadata">

**Author:** ![jangaraj](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/jangaraj/32/5175_2.png) [@jangaraj](https://forum.keycloak.org/u/jangaraj)\
**Post date:** [February 18, 2020, 10:56am UTC](https://forum.keycloak.org/t/gatekeeper-client-secret-not-verifying/1294/6 "2020-02-18T10:56:27Z")

</div>

You don’t have any special config. Clear cookies in the browser and start gatekeeper from the scratch with incorrect client secret. Auth should be fine, but gatekeeper shouldn’t be able to exchange code for token (Keycloak error like “incorrect client secret”). If yes, then client configuration configuration can be wrong.

---

<div class="post-metadata">

**Author:** ![Raghees-butt](https://avatars.discourse-cdn.com/v4/letter/r/a88e4f/32.png) [@Raghees-butt](https://forum.keycloak.org/u/Raghees-butt)\
**Post date:** [February 18, 2020, 11:55am UTC](https://forum.keycloak.org/t/gatekeeper-client-secret-not-verifying/1294/7 "2020-02-18T11:55:18Z")

</div>

I tried with wrong configurations in clean browser and incognito but nothing is happening.

---

<div class="post-metadata">

**Author:** ![jangaraj](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/jangaraj/32/5175_2.png) [@jangaraj](https://forum.keycloak.org/u/jangaraj)\
**Post date:** [February 18, 2020, 3:59pm UTC](https://forum.keycloak.org/t/gatekeeper-client-secret-not-verifying/1294/8 "2020-02-18T15:59:31Z")

</div>

What is your login procedure, when you have:

```auto
no-redirects: true

```

---

<div class="post-metadata">

**Author:** ![Raghees-butt](https://avatars.discourse-cdn.com/v4/letter/r/a88e4f/32.png) [@Raghees-butt](https://forum.keycloak.org/u/Raghees-butt)\
**Post date:** [February 19, 2020, 5:23am UTC](https://forum.keycloak.org/t/gatekeeper-client-secret-not-verifying/1294/9 "2020-02-19T05:23:18Z")

</div>

I am using browser flow/standard flow for login. when I request to data server here is the flow of my request,  
first it reaches to nginx, nginx passes it to gatekeeper ( gatekeeper configuration as mentioned above ), then it reaches to data server.

for the browser flow I have public client and for the gatekeeper I have confidential client.

I remove `no-redirects: true` from my configuration and restart my gatekeeper docker but nothing is happening.

---

<div class="post-metadata">

**Author:** ![jangaraj](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/jangaraj/32/5175_2.png) [@jangaraj](https://forum.keycloak.org/u/jangaraj)\
**Post date:** [February 20, 2020, 12:01am UTC](https://forum.keycloak.org/t/gatekeeper-client-secret-not-verifying/1294/10 "2020-02-20T00:01:20Z")

</div>

> [@Raghees-butt](#):
>
> for the browser flow I have public client and for the gatekeeper I have confidential client.

=\> Gatekeeper doesn’t exchange your code for token, so client secret in the Gatekeeper is never used and you can write any string there. I guess you have frontend which handles token generation/refresh and backend protected by Gatekeeper, which just verifies token.

---

<div class="post-metadata">

**Author:** ![Raghees-butt](https://avatars.discourse-cdn.com/v4/letter/r/a88e4f/32.png) [@Raghees-butt](https://forum.keycloak.org/u/Raghees-butt)\
**Post date:** [February 20, 2020, 4:53am UTC](https://forum.keycloak.org/t/gatekeeper-client-secret-not-verifying/1294/11 "2020-02-20T04:53:54Z")

</div>

Yes, I am handling token generation/refresh from the frontend. So my Gatekeeper just verifies token and roles. Thanks for the help
