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

Use custom auth headers (JWT, X.509, Basic etc.) #91

Open
ZuSe opened this issue Sep 23, 2020 · 2 comments
Open

Use custom auth headers (JWT, X.509, Basic etc.) #91

ZuSe opened this issue Sep 23, 2020 · 2 comments

Comments

@ZuSe
Copy link

ZuSe commented Sep 23, 2020

Hi guys,

i would love to use the library in one of of our backend components. It's a microservice that has to listen to changes in several fhir ressources and act accordingly. So basically there is no user authentication in the whole process.
For security reasons we are either using JWT or X.509 Certs as authentication between our services.

So my question is it possible to use the lib with one of those methods e.g. giving a static custom Authorization header to the client?

Best
Patrick

@vincentmajor
Copy link

I'm trying to do the same thing and after reading through the code I've determined it is not possible to use a JWT cert to authenticate. I'm trying to auth first and then update the client state, not sure if it will work.

The long story is that for a JWT cert (for Epic at least), to get an access token, you need to pass the JWT cert encoded with RS384 with 'grant_type': 'client_credentials'. This code (v4 at least) hardcodes 'grant_type': 'authorization_code' in _code_exchange_params called within handle_callback().

@ZuSe
Copy link
Author

ZuSe commented Oct 18, 2021

Hi @vincentmajor

don't think so complex about that. What would help for now would be the option to provide any kind of Custom Authorization Header. It's then up to the client developer from where he gets the proper value.
Not even Basic Auth possible at the moment.

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

No branches or pull requests

2 participants