# OAuth authentication configuration with database (Postgres)

**URL:** <https://discuss.konghq.com/t/oauth-authentication-configuration-with-database-postgres/10607>\
**Category:** Questions\
**Tags:** kubernetes\
**Created:** [September 1, 2022, 1:49pm UTC](https://discuss.konghq.com/t/oauth-authentication-configuration-with-database-postgres/10607 "2022-09-01T13:49:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Heman\_Malve](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/heman_malve/32/3549_2.png) [@Heman\_Malve](https://discuss.konghq.com/u/Heman_Malve)\
**Post date:** [September 1, 2022, 1:49pm UTC](https://discuss.konghq.com/t/oauth-authentication-configuration-with-database-postgres/10607/1 "2022-09-01T13:49:14Z")

</div>

Hi All,

referring to below links,

> **[OAuth 2.0 Authentication - Plugin | Kong Docs](https://docs.konghq.com/hub/kong-inc/oauth2/)**
>
> Documentation for Kong, the Cloud Connectivity Company for APIs and Microservices.

> **[Custom Resource Definitions API Reference - Kong Ingress Controller | Kong Docs](https://docs.konghq.com/kubernetes-ingress-controller/latest/reference/custom-resources/)**
>
> Documentation for Kong, the Cloud Connectivity Company for APIs and Microservices.

Yaml file -  
apiVersion: [configuration.konghq.com/v1](http://configuration.konghq.com/v1)  
kind: KongClusterPlugin  
metadata:  
name: oauth2-global  
annotations:  
[kubernetes.io/ingress.class:](http://kubernetes.io/ingress.class:) kong  
labels:  
global: “true”  
config:  
scopes:

- email
- phone
- address  
mandatory\_scope: true  
enable\_authorization\_code: true  
plugin: oauth2

is the yaml file content is correct ? if it is not making entry in postgres (internal DB) or not showing under plugins - http://:8001/plugins/  
All suggestions are welcome !!

---

<div class="post-metadata">

**Author:** ![traines](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/traines/32/158_2.png) [@traines](https://discuss.konghq.com/u/traines)\
**Post date:** [September 6, 2022, 9:36pm UTC](https://discuss.konghq.com/t/oauth-authentication-configuration-with-database-postgres/10607/2 "2022-09-06T21:36:53Z")

</div>

You’ll want to use ``` around your YAML block to use code formatting. It’s possible there’s an indentation error in it but the forum software will use its own formatting without the code block and make it impossible to tell.

That said, as a general rule, if configuration isn’t getting to Kong, you’ll want to check the controller container logs, as they’ll indicate if there’s some reason that Kong is rejecting that configuration.

---

<div class="post-metadata">

**Author:** ![Heman\_Malve](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/heman_malve/32/3549_2.png) [@Heman\_Malve](https://discuss.konghq.com/u/Heman_Malve)\
**Post date:** [September 7, 2022, 2:18pm UTC](https://discuss.konghq.com/t/oauth-authentication-configuration-with-database-postgres/10607/3 "2022-09-07T14:18:28Z")

</div>

This is resolved . I could see Ingress controller POD is restarting due http2 protocol and time being disabled
