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

Inconsistency in OIDC token path construction between SDKs (and incompaibility with custom token paths) #141

Open
6 tasks done
danielloader opened this issue Aug 15, 2024 · 1 comment · May be fixed by #139
Open
6 tasks done
Labels
bug Something isn't working

Comments

@danielloader
Copy link

danielloader commented Aug 15, 2024

Checklist

  • I have looked into the README and have not found a suitable solution or answer.
  • I have looked into the documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have upgraded to the latest version of OpenFGA and the issue still persists.
  • I have searched the Slack community and have not found a suitable solution or answer.
  • I agree to the terms within the OpenFGA Code of Conduct.

Description

There's a feature gap in the JS SDK that's causing us to be unable to use OIDC auth in the SDK (and it's inconsistent elsewhere too).

Golang (I'm taking to be the reference SDK by default here):

JS:

  • url: `https://${clientCredentials.apiTokenIssuer}/oauth/token`,
  • Regardless of the path string you give, you get the https:// prefix added, and you can't stop the suffix being added.

Python:

Dotnet:

Java:

This has been a blocker for us because Zitadel uses /oauth/v2/token as its token endpoint, so the JS SDK is trying to call https://auth.example.com/oauth/v2/token/oauth/token instead of https://auth.example.com/oauth/v2/token.

Expectation

All the SDKs to have the same configuration interface so I can use OIDC.

Reproduction

  1. Try to use OIDC auth on OpenFGA with the JS SDK.
  2. Use an Oauth2 provider with a non default path to the token off the base domain.
  3. Fail to get token.

OpenFGA SDK version

0.6.2

OpenFGA version

1.5.8

@danielloader danielloader added the bug Something isn't working label Aug 15, 2024
@stefan505
Copy link

stefan505 commented Nov 7, 2024

The exact same problem exists with using Entra ID (formally Azure AD) client credentials flow natively.

@ewanharris ewanharris linked a pull request Nov 7, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

2 participants