Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Client certificates not used with openid auth endpoints #1647

Closed
Simple-Analysis opened this issue Nov 10, 2023 · 3 comments
Closed

[BUG] Client certificates not used with openid auth endpoints #1647

Simple-Analysis opened this issue Nov 10, 2023 · 3 comments
Labels
bug Something isn't working triaged

Comments

@Simple-Analysis
Copy link
Contributor

Simple-Analysis commented Nov 10, 2023

What is the bug?
Requests made to the openid endpoints fail with 401 errors when client certificate authentication is mandatory for the endpoints. The HTTPS agent used for Wreck is not configured with client certificate options.

HTTPS agent options:

export interface WreckHttpsOptions {

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Setup mandatory client certificate authentication for oidc endpoints
  2. Start opensearch dashboards
  3. Opensearch dashboards will make request to endpoints
  4. See error

What is the expected behavior?
Option to configure client certificates for HTTPS agent so that successful requests can be made to all openid endpoints.

What is your host/environment?

  • kubernetes
  • Version v1.27
@Simple-Analysis Simple-Analysis added bug Something isn't working untriaged labels Nov 10, 2023
@stephen-crawford
Copy link
Contributor

[Triage] Hi @Simple-Analysis, @cwperks will follow up but in the meantime if you could provide additional information on your configuration that would be appreciated. It sounds like you may be using a custom configuration of some sort and it is hard to determine the cause of these types of issues without detailed settings.

@Simple-Analysis
Copy link
Contributor Author

Hi @scrawfor99, my configuration is not too unique. Our IdP is only accessible behind an API Gateway that enforces mutual TLS, so any request to that endpoint will fail without client certificates. My workaround for the longest time was to reference a pod in the same namespace as OpenSearch that serves the OpenID connect configuration json with modified authorization and token endpoints that do not require mutual TLS (bypassing the API Gateway).

I would share this configuration but I operate in an airgapped network. Please let me know if I can answer any questions though!

I tried to take a stab at the code changes and submitted the PR. I'm not really familiar with TypeScript, so any feedback would be greatly appreciated. I have not had a chance to run tests yet but I wanted to make this progress known for everyone's awareness.

Thank you!

@cwperks cwperks added the triaged label Dec 4, 2023
@cwperks
Copy link
Member

cwperks commented Dec 4, 2023

Closing this issue as #1650 has been merged. Thank you for your contribution @Simple-Analysis!

@cwperks cwperks closed this as completed Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged
Projects
None yet
Development

No branches or pull requests

3 participants