keycloak / keycloak-nodejs-connect

Apache License 2.0
676 stars 421 forks source link

KeyCloakConfig does not allow to configure trust for key fetching #514

Open pardeike opened 7 months ago

pardeike commented 7 months ago

Describe the bug

We need to define CA trust for our adapter when it fetches new public keys. Currently this is possible in an arcane way using environment variables but requires detailed knowledge on how to do that.

A natural way to configure that would be with some sort of “ca:” property in KeyCloakConfig.

Version

15.0.2-redhat-00001

Expected behavior

It should be easy to supply trust for key fetch requests.

Actual behavior

We are using NODE_EXTRA_CA_CERTS instead. It is suboptimal and creates a few problems when running CI/CD and when the node process should have different trust roots for different endpoints.

How to Reproduce?

No response

Anything else?

No response

jackjia-ibm commented 5 months ago

Our team encountered similar issue. I'm happy to help on creating a pull request if needed.