OpenCTI-Platform / opencti

Open Cyber Threat Intelligence Platform
https://opencti.io
Other
6.24k stars 923 forks source link

OPENID multiple redirect uris #1823

Open louisgls opened 2 years ago

louisgls commented 2 years ago

Prerequisites

Description

Can OPENID strategy supports multiple redirect_uris ? The doc seems to show that it is the case as the PROVIDERSOPENIDCONFIG__REDIRECT_URIS is an array :

- PROVIDERS__OPENID__STRATEGY=OpenIDConnectStrategy 
- "PROVIDERS__OPENID__CONFIG__LABEL=Login with OpenID"
- PROVIDERS__OPENID__CONFIG__ISSUER=https://xxxxxxx/auth/realms/xxxx
- PROVIDERS__OPENID__CONFIG__CLIENT_ID=XXXXXXXXXXXXXXXXXX
- PROVIDERS__OPENID__CONFIG__CLIENT_SECRET=XXXXXXXXXXXXXXXXXX
- "PROVIDERS__OPENID__CONFIG__REDIRECT_URIS=[\"https://demo.opencti.io/auth/oic/callback\"]"

We have tried to add multiple redirect uris (because we have 2 different fqdn to access the front) but the first OIDC authorization request doesn't have any "redirect_uri" in the query string parameters.

Environment

  1. OS (where OpenCTI server runs): Debian 10
  2. OpenCTI version: 5.1.2
  3. OpenCTI client: { e.g. frontend or python }

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Configure OIDC with multiple redirect_uris
  2. Click on the Login with button
  3. Check the first query's parameter in a browser's console
richard-julien commented 2 years ago

Hi @louisgls , dont really know about that, need to investigate. Can you explains a bit more your case and what you expect of setting multiple callback uri?

louisgls commented 2 years ago

Hi @richard-julien, thank your for your answer. I was just wondering why the redirect uri was a multi valued field. I have 2 fqdn that points to the same opencti instance and I would have liked to set up the OpenID flow for both. For example :