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

Rust sdk: Basic/oauth/bearer/api_key auth unused #156

Open
5 of 6 tasks
Dig-Doug opened this issue Mar 8, 2022 · 3 comments
Open
5 of 6 tasks

Rust sdk: Basic/oauth/bearer/api_key auth unused #156

Dig-Doug opened this issue Mar 8, 2022 · 3 comments
Labels
bug Something is not working.

Comments

@Dig-Doug
Copy link

Dig-Doug commented Mar 8, 2022

Preflight checklist

Describe the bug

It seems like the auth related fields are completely unused. Is that expected?

Reproducing the bug

pub basic_auth: Option<BasicAuth>,

Relevant log output

No response

Relevant configuration

No response

Version

HEAD

On which operating system are you observing this issue?

No response

In which environment are you deploying?

No response

Additional Context

A workaround is to specify the auth tokens as default headers while initialing the reqwest client.

@Dig-Doug Dig-Doug added the bug Something is not working. label Mar 8, 2022
@aeneasr
Copy link
Member

aeneasr commented Apr 11, 2022

It appears that those are indeed not used. Keto does not have HTTP Authorization built in - if you deploy it yourself and introduce some type of HTTP Authorization it might be required to generate the client yourself and adjust it to your security mechanisms. Unfortunately the SDK can't cover all of the different ways authorization can be done :/

Or did I misread your issue?

@Dig-Doug
Copy link
Author

The main thing I want to flag is that these options are confusing because they don't work.

Looking at the generated code, it seems like the client could use the authorization config values when building the request here via the reqwest option. Alternatively, removing those fields would eliminate the confusion too.

@aeneasr
Copy link
Member

aeneasr commented Apr 17, 2022

That makes sense - the problem here is the openapi-generator which is apparently introducing these structs even if they're not used. The repository is: https://github.com/OpenAPITools/openapi-generator

So unfortunately we can't manually remove these definitions as they will be overwritten immediately once the automation runs. If you want, you can open an issue upstream at https://github.com/OpenAPITools/openapi-generator or see if there's any options in there that would help improve the generated code here :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

No branches or pull requests

2 participants