View Issue Details

IDProjectCategoryView StatusLast Update
0010198Talermerchant backendpublic2025-08-22 15:56
ReporterBohdan Assigned ToBohdan  
PrioritynormalSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.0 
Summary0010198: Merchant backend fails to work with token different than 32 bytes
DescriptionThis function requires that the btoken struct of data 32 bytes, and the token has the same length, which is not always the case...


GNUNET_STRINGS_string_to_data (token,
                                     strlen (token),
                                     &btoken,
                                     sizeof (btoken)))

git version: tag/v1.0.5
src/backend/taler-merchant-httpd_helper.c:555


Additional Information...
WARNING Trying deprecated secret-token:password API authN
WARNING Login failed
WARNING External protocol violation detected at taler-merchant-httpd.c:357.
WARNING External protocol violation detected at taler-merchant-httpd.c:2410.
INFO Request for `/private/accounts' completed with HTTP status 401 (0)
INFO Handling request (POST) for URL '/private/token'
INFO Given authorization token `MY_MEGA_PASSWORD' is malformed
WARNING External protocol violation detected at taler-merchant-httpd_helper.c:564.
WARNING Trying deprecated secret-token:password API authN
WARNING Login failed
WARNING External protocol violation detected at taler-merchant-httpd.c:357.
WARNING External protocol violation detected at taler-merchant-httpd.c:2410.
...
TagsNo tags attached.

Activities

Christian Grothoff

2025-07-17 17:49

manager   ~0025516

Eh, since the merchant backend generates the tokens and we ALWAYS generate them with 32 bytes, I think this is actually intended and fine.

Bohdan

2025-07-17 18:16

developer   ~0025518

Okay, then this is the problem of SPAA as it doesn't know about this new v19 trick... But I guess the bug for that one is already present, right?

And SAP integration doesn't work for the same reason, new bug for me :)

Christian Grothoff

2025-07-20 12:03

manager   ~0025538

Eh, Sebastian writes: "i don't understand how this relates to the backoffice spa. the backoffice spa should always used a server generated token. An explanation of how to trigger this using the spa only will be good, if exist.
it used to use the password as a bearer token but the latest spa doesn't."

So again, what is the bug here?

Bohdan

2025-07-20 12:50

developer   ~0025539

Just rechecked everything on the merchant spaa, by throwing cookies and stuff

SPAA tries to get token by https://backoffice.talerintosap.us/private/token

which is then 401

INFO Handling request (POST) for URL '/private/token'
INFO Given authorization token `MY_LOVELY_PASSWORD' is malformed
WARNING External protocol violation detected at taler-merchant-httpd_helper.c:564.
Trying deprecated secret-token:password API authN
WARNING Login failed
WARNING External protocol violation detected at taler-merchant-httpd.c:357.
WARNING External protocol violation detected at taler-merchant-httpd.c:2410.
INFO Request for `/private/token' completed with HTTP status 401 (0)

As result of this 401 SPAA can't get a token

So it seems that the bug, is in the fact that for getting the token, SPAA uses the bearer-token auth, and not basic auth... as written in the newest spec...

Issue History

Date Modified Username Field Change
2025-07-17 16:24 Bohdan New Issue
2025-07-17 17:49 Christian Grothoff Note Added: 0025516
2025-07-17 17:49 Christian Grothoff Assigned To => Bohdan
2025-07-17 17:49 Christian Grothoff Status new => feedback
2025-07-17 17:50 Christian Grothoff Severity crash => tweak
2025-07-17 18:16 Bohdan Note Added: 0025518
2025-07-20 12:03 Christian Grothoff Note Added: 0025538
2025-07-20 12:50 Bohdan Note Added: 0025539
2025-08-22 15:56 Bohdan Status feedback => resolved
2025-08-22 15:56 Bohdan Resolution open => fixed