Request authentication with token from headers triggers error when enabling caching of authentication header

Hi,

I’m trying to use the HTTP authentications / Request authentication with openstack identity v3, this is done using a request and extracting the token from the X-Subject-Token header. This is working fine.

Except when I enable “Enable caching of the authentication header”, then it triggers the following error:

Exception while handling request: /api/v1/di/configurations/http-client/test. Magement\Environment\Cryptography\TrackingEncrypter::__invoke(): Argument #1 ($input) must be of type string, array given, called in /resources/fileshare/deployer/releases/2024-10-30-03-46-55-0e073fb/vendor/alumio/http-client-module/src/Authentication/AuthenticationStorage.php on line 96

This was the response from the authentication request (token replaced with <token>):

HTTP/1.1 201 CREATED
Content-Type: application/json
x-openstack-request-id: req-39cb9ae7-a03e-4f30-a20b-835be020642e
Front-End-Https: on
vary: X-Auth-Token
Server: nginx
Connection: keep-alive
X-Subject-Token: <token>
Date: Tue, 12 Nov 2024 12:38:41 GMT
Content-Length: 1822

Hi @a.aleman

Welcome to the Alumio forum.

Thank you for letting us know about this issue. We can confirm that we can reproduce it. We will pass this question on to the corresponding team for further investigation.

Please kindly wait for any updates.

Hi @a.aleman

Could you please let us know whether this is blocking your integration? For example, Openstack might not allow you to retrieve tokens as much as you want?

Hi @Gugi,

I doesn’t seem to be a blocking problem with a quick test with a 100 requests. I will just try without the cache for now. If it would be causing problems, then I can fall back to v2 auth untill januari 24th 2025 (access token is in the response body here), after that we need to use the v3 endpoint.

Hi @a.aleman

Thank you for the information. We will add it as a note for the team.

We have created a story in our backlog to discuss the possibilities for fixing this issue.

We will let you know once we have an update.