# Node-RED integration with Keycloak gives Error self signed certificate

**URL:** https://discourse.nodered.org/t/node-red-integration-with-keycloak-gives-error-self-signed-certificate/71500
**Category:** General
**Tags:** security
**Created:** [30 November 2022 11:50 UTC](https://discourse.nodered.org/t/node-red-integration-with-keycloak-gives-error-self-signed-certificate/71500 "2022-11-30T11:50:47Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Yogeshwari](https://avatars.discourse-cdn.com/v4/letter/y/49beb7/32.png) [@Yogeshwari](https://discourse.nodered.org/u/Yogeshwari)
#### Post date: [30 November 2022 11:50 UTC](https://discourse.nodered.org/t/node-red-integration-with-keycloak-gives-error-self-signed-certificate/71500/1 "2022-11-30T11:50:47Z")

</div>

Hi,

I have integrated node-red with keycloak i get redirected to keycloak and then after authentication node-red page appears but i get below issue. Can anyone help here please. Thank you in advance.

Error : Self signed certificate in certificate chain

In settlings file i have added below lines

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/d/0dbc337a56008a0650247334d3e6b5d47f174be1.png)

 ![Untitled](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/f/af0b53f414b410f6f514bc631bfacff15b85d744.png)

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [30 November 2022 15:06 UTC](https://discourse.nodered.org/t/node-red-integration-with-keycloak-gives-error-self-signed-certificate/71500/2 "2022-11-30T15:06:58Z")

</div>

The error is telling you that the self-signed certificate cannot be verified. You either need to use a publicly signed and verifiable certificate (e.g. from Let's Encrypt) or you need to turn off certificate chain verification (sorry not got round to trying KeyCloak so I don't know how to/if you can do that. Or you need to provide a verifiable certificate chain to KeyCloak.

---

<div class="post-metadata">

### Author: ![Yogeshwari](https://avatars.discourse-cdn.com/v4/letter/y/49beb7/32.png) [@Yogeshwari](https://discourse.nodered.org/u/Yogeshwari)
#### Post date: [1 December 2022 08:14 UTC](https://discourse.nodered.org/t/node-red-integration-with-keycloak-gives-error-self-signed-certificate/71500/3 "2022-12-01T08:14:27Z")

</div>

Thank you for your reply. I disabled certificate validation at node-red side using below line . It worked.  
In settings.js above mode.exports line.  
process.env.NODE\_TLS\_REJECT\_UNAUTHORIZED = "0";

I understand that this is not a correct way to do it. But for test environment we can use this. For production i need to add valid certificate in node-red. I am still figuring that out.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [30 January 2023 08:14 UTC](https://discourse.nodered.org/t/node-red-integration-with-keycloak-gives-error-self-signed-certificate/71500/4 "2023-01-30T08:14:40Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
