Authorization header not changeable

Hi all,

in my own architecture, in front of Tyk, I have a sort of Reverse Proxy that authenticate the user (is based on WebSeal - Tivoli Access Manager) by a PKI.

All works quite well, but when I pass a JWT token to an API, I need to pass the token using not Authorization: bearer token , but somethink different (I use JWTAuthorization: bearer token) because webseal remove the Authentication header from original client call.

In Dashboard there is no way to set this parameter when I create a API with JWT Authentication. Fortunately this parameter is present in API description in Mongo (in auth/auth_header_name) but I need to modify by hand every time that a create/modify the API because dashboard overwrite the modified parameter.

There is a convenient way to set in a immutable way this parameter ?

Thank from Italy :wink:

Hello! There is a workaround to do it using UI.

JWT re-use field used by “Auth token” Authentication mode, so you can temporarily turn on “Auth token” update “Auth Key Header Name” value, and switch back to JWT :slightly_smiling_face:

I will add an internal ticket, to make this field available directly for JWT UI.

Cheers!

Hi Leon,

I already tried this strategy, but when I return (switch back) to JWT configuration, the modified value return to default “Authorization” :frowning:

Waiting for new UI release :wink:

Thanks !

I think it will work if you switch to JWT, save, and then move back to JWT, and save again :slight_smile:

Hi!
I have same issue. I need to use the header name as “X-Authorization”.
Any news on that?

I got an answer by myself.
The point is tyk gateway should use the config of itself.
By setting API on dashboard UI, you will never achieve what you are looking for.
change setting “use_db_app_configs” to false in tyk.conf and make api definition file (or call the tyk-gateway api).
And now you can set “auth.auth_header_name” to what you want to in api definition while “enable_jwt” set to true.
Hope it can help you. :slight_smile: