# OpenID connect using azure: Getting too\_many\_redirects

**URL:** https://forum.opensearch.org/t/openid-connect-using-azure-getting-too-many-redirects/8477
**Category:** Security
**Tags:** all-clients, releases, install
**Created:** [February 1, 2022, 9:22am UTC](https://forum.opensearch.org/t/openid-connect-using-azure-getting-too-many-redirects/8477 "2022-02-01T09:22:44Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![skopen](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@skopen](https://forum.opensearch.org/u/skopen)
#### Post date: [February 1, 2022, 9:22am UTC](https://forum.opensearch.org/t/openid-connect-using-azure-getting-too-many-redirects/8477/1 "2022-02-01T09:22:44Z")

</div>

Hi  
@sastorsl

Able to authenticate with user and pwd , but after that its throws too\_many\_directs…kindly help me on this issue please.

opensearch\_security:  
auth:  
type: “openid”  
openid:  
connect\_url: “xxxxxx.well-known/openid-configuration”  
client\_id: “xxx”  
client\_secret: “xxxxx”  
scope: “openid”  
#base\_redirect\_url: “[http://xxxxhost:5601](http://xxxxhost:5601)”  
multitenancy:  
enabled: true  
tenants:  
preferred:

Private  
Global  
readonly\_mode:  
roles:  
kibana\_read\_only  
cookie:  
secure: true  
opensearch:  
hosts:  
[https://xxxxxhost:9200](https://xxxxxhost:9200)  
ssl:  
verificationMode: none  
username: “kibanaserver”  
password: “kibanaserver”  
requestHeadersWhitelist:  
authorization  
securitytenant

* * *

config:

# There are multiple ways to define the configuration here:

# \* If you define anything under data, the chart will automatically create

# a secret and mount it.

# \* If you define securityConfigSecret, the chart will assume this secret is

# created externally and mount it.

# \* It is an error to define both data and securityConfigSecret.

#securityConfigSecret:  
data:  
config.yml: |-  
dynamic:  
authc:  
basic\_internal\_auth\_domain:  
description: “Authenticate via HTTP Basic against internal users database”  
http\_enabled: true  
transport\_enabled: true  
order:  
http\_authenticator:  
type: basic  
challenge: false  
authentication\_backend:  
type: internal  
openid\_auth\_domain:  
http\_enabled: true  
transport\_enabled: true  
order: 1  
http\_authenticator:  
type: openid  
challenge: false  
config:  
subject\_key: preferred\_username  
roles\_key: roles  
openid\_connect\_url: xxxx  
skip\_users:

- kibanaro
- kibanaserver
- logstash
- adminp
- admin
- filebeat\_internal
- kibanauser  
authentication\_backend:  
type: noop

---

<div class="post-metadata">

### Author: ![kris](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/kris/32/2208_2.png) [@kris](https://forum.opensearch.org/u/kris)
#### Post date: [February 1, 2022, 10:27pm UTC](https://forum.opensearch.org/t/openid-connect-using-azure-getting-too-many-redirects/8477/2 "2022-02-01T22:27:41Z")

</div>

moving to the Security category

---

<div class="post-metadata">

### Author: ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/9946_2.png) [@pablo](https://forum.opensearch.org/u/pablo)
#### Post date: [February 2, 2022, 2:46am UTC](https://forum.opensearch.org/t/openid-connect-using-azure-getting-too-many-redirects/8477/3 "2022-02-02T02:46:07Z")

</div>

@skopen Is it ODFE or OpenSearch? What version are you running?

---

<div class="post-metadata">

### Author: ![skopen](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@skopen](https://forum.opensearch.org/u/skopen)
#### Post date: [February 2, 2022, 6:21am UTC](https://forum.opensearch.org/t/openid-connect-using-azure-getting-too-many-redirects/8477/4 "2022-02-02T06:21:52Z")

</div>

@pablo  
Using opensearch , version 1.2.3 i’m using helm chart for delpoyment

---

<div class="post-metadata">

### Author: ![sastorsl](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@sastorsl](https://forum.opensearch.org/u/sastorsl)
#### Post date: [February 2, 2022, 7:06am UTC](https://forum.opensearch.org/t/openid-connect-using-azure-getting-too-many-redirects/8477/5 "2022-02-02T07:06:19Z")

</div>

Check the URL’s, application ID and client secret from your OIDC vendor, ensure they are exactly correct. Make sure to check both opensearch and opensearch-dashboards.

NB! Any changes to opensearch have to be _added_ by running the security script - which in turn updates the security index.

Ensure that opensearch-dashboards can “call back” to your OIDC vendor. Is there a firewall in place? Can you proxy the request? If you are running containers “enter” the container with bash and test outbound connectivity with `curl`.

You can also change the opensearch log4j2 configuration to get more logging.

---

<div class="post-metadata">

### Author: ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/9946_2.png) [@pablo](https://forum.opensearch.org/u/pablo)
#### Post date: [February 2, 2022, 10:39am UTC](https://forum.opensearch.org/t/openid-connect-using-azure-getting-too-many-redirects/8477/6 "2022-02-02T10:39:20Z")

</div>

@skopen What is your redirect URL in Azure?

---

<div class="post-metadata">

### Author: ![skopen](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@skopen](https://forum.opensearch.org/u/skopen)
#### Post date: [February 3, 2022, 7:22am UTC](https://forum.opensearch.org/t/openid-connect-using-azure-getting-too-many-redirects/8477/7 "2022-02-03T07:22:54Z")

</div>

Hi @pablo  
i’m using below url,  
[https://localhost:5601](https://localhost:5601)  
currently we are using localhost url and getting error with too\_many\_redirects

---

<div class="post-metadata">

### Author: ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/9946_2.png) [@pablo](https://forum.opensearch.org/u/pablo)
#### Post date: [February 3, 2022, 2:08pm UTC](https://forum.opensearch.org/t/openid-connect-using-azure-getting-too-many-redirects/8477/8 "2022-02-03T14:08:02Z")

</div>

@skopen do you access OpenSearch Dashboards with localhost or FQDN?  
This redirect means that you hosting OpenSearch Dashboards on your own machine.
