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

ISSUE-345: Support customized Authentication when creating a client with auth enabled #96

Closed
sijie opened this issue Aug 10, 2020 · 0 comments

Comments

@sijie
Copy link
Member

sijie commented Aug 10, 2020

Original Issue: apache#345


Currently, when creating a client connecting to a service URL with auth enabled, you have to create an Authentication object and pass it.

You may call new authentication() which internally creates a Provider but the Provider must fall in one of the limited options "tls", "token", "athenz", "oauth2" and the parameters are fixed in all these options. e.g. NewAuthticationTLS()expects the path to the key and cert, but in my case I already have the tls.certificate in memory and don't want to dump it to some temp files. (This is actually the main drive for this issue).

Unfortunately, if you directly create an Authentication object and customize the auth process, it still doesn't work since there is an internal check trying to cast the authentication object to type Provider which is a private interface and not exposed to the public. It errors out if the casting fails.

So I am asking if it can support a more customized way to create the authentication object or make the Provider interface public so that I can directly create an Authentication object and implements the Provider interface. Or since the main drive is to pass the tls.certificate instead of the paths to NewAuthticationTLS(), can you just provide this option for that method?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant