View Issue Details

IDProjectCategoryView StatusLast Update
0009556Talerspecificationpublic2025-08-31 17:09
ReporterFlorian Dold Assigned ToChristian Grothoff Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PriorityhighSeverityfeatureReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.0 
Target Version1.0 stretch goalsFixed in Version1.0 stretch goals 
Summary0009556: address merchant auth token weirdness
Description* The /token endpoint currently takes only a **Bearer** token as auth and returns another Bearer token. Instead, the /token endpoint should accept credentials via basic auth (and a Bearer token only when refreshing a token).
* For human-picked passwords (that are not auth tokens!), we should not require the secret-token: prefix. That prefix should only be necessary for *actual* tokens, not for login credentials.
* The response body isn't consistent with the bank (auth_token vs token).
Tagssecurity, ux

Required notifications

Address or linkRemarkAdded byNotifiedActions

Relationships

related to 0009572 closedsebasjm automatic logout (est 4h - due date 5/6) 
related to 0009620 closedschanzen Restrict public instance access and replace token-based authentication with username and password 
related to 0009646 closedschanzen Merchant authentication/token API not (fully documented) 
related to 0009651 implementingschanzen When changing the instance password we may want to revoke old access tokens 
child of 0009647 closedschanzen Scope in tokens / authorizations needs rework 

Activities

schanzen

2025-03-22 10:17

administrator   ~0024279

"Instead, the /token endpoint should accept credentials via basic auth (and a Bearer token only when refreshing a token)." plus "For human-picked passwords (that are not auth tokens!), we should not..."

Needs further clarification:
Is the (/private/token) endpoint ONLY supposed to accept "human-picked" passwords (or refresh tokens)? Are there any other type of credentials?
What kind of credential is the configured access token going to become?

My working assumption is also that this mainly related to the slightly messy taler-merchant-httpd.c:1883ff code, is that right?
(If yes, this will require some rework regarding a lot of security-critical logic.)

schanzen

2025-03-22 17:07

administrator   ~0024282

The answers (until now) are:

The instance has a password, which can be set, for example, with taler-merchant-passwd.
This password can and must be used for /private/token requests to get an access token.
The access token can be used on all the other (private) APIs.

Open question: What about the /auth endpoint (https://docs.taler.net/core/api-merchant.html#post-[-instances-$INSTANCE]-private-auth). It seems to have special case handling.
It would be treated like any other API, I think, but somebody thought something else here it seems...

schanzen

2025-03-22 20:30

administrator   ~0024283

I just now realized that this change will require new testing cmds to retrieve the access tokens and probably most tests needs to be modified in order to reflect the change.

schanzen

2025-03-22 20:39

administrator   ~0024284

Started working on this here https://git.gnunet.org/merchant.git/log/?h=dev/schanzen/issue_9556

schanzen

2025-03-22 21:12

administrator   ~0024285

We also may have to/want to invalidate all tokens issued before a new password is set!

schanzen

2025-03-23 22:34

administrator   ~0024292

Last edited: 2025-03-23 22:39

This change touches pretty much everything that uses merchant, including and inparticular the taler-typescript-core stuff. So while the implementation in the draft is pretty much good to go almost, my guess would be that this requires a lot more work across repos and integration tests.

Things todo:

- Rename JSON keys: token => password: token => access_token
- Fix SPA to use access tokens instead of passwords
- Fix Wallet to use access tokens instead of passwords (?)
- Discard tokens on pw change 0009651
- Scope rework 0009647
- Update documentation, in particular https://docs.taler.net/core/api-merchant.html#authentication to reflect changes

When all is good I will rebase and squash the branch into a single commit.

schanzen

2025-06-16 20:18

administrator   ~0025261

Update on things todo:



schanzen

2025-03-23 23:34

administrator 0009556:0024292

Last edited: 2025-03-23 23:39

View 6 revisions
This change touches pretty much everything that uses merchant, including and inparticular the taler-typescript-core stuff. So while the implementation in the draft is pretty much good to go almost, my guess would be that this requires a lot more work across repos and integration tests.

Things todo:

- (DONE, for now we return both) Rename JSON keys: token => password: token => access_token
- (DONE, see branch in taler-typescript-core)Fix SPA to use access tokens instead of passwords
- (UNKNOWN) Fix Wallet to use access tokens instead of passwords (?)
- (No protocol breakage) Discard tokens on pw change 0009651
- Scope rework 0009647
- (TODO, integrate new and old API) Update documentation, in particular https://docs.taler.net/core/api-merchant.html#authentication to reflect changes

schanzen

2025-06-19 12:05

administrator   ~0025282

All above tasks should be done, including 0009647 in the same branch as liste above.
0009651 should be moved post 1.1.

Assigning for review/feedback before merge.

Christian Grothoff

2025-06-21 19:13

manager   ~0025292

ff08d11d..8211f83c completes the merge, fixing the last FIXMEs that are critically relevant to this bug.

Issue History

Date ModifiedUsernameFieldChange
2025-02-17 17:14Florian DoldNew Issue
2025-02-17 17:14Florian DoldStatusnew => assigned
2025-02-17 17:14Florian DoldAssigned To => Christian Grothoff
2025-02-17 19:13Christian GrothoffAssigned ToChristian Grothoff =>
2025-02-17 19:13Christian GrothoffStatusassigned => confirmed
2025-02-17 19:13Christian GrothoffCategorymechant backend => specification
2025-03-21 14:00schanzenRelationship addedrelated to 0009646
2025-03-21 14:00schanzenAssigned To => schanzen
2025-03-21 14:00schanzenStatusconfirmed => assigned
2025-03-22 10:17schanzenNote Added: 0024279
2025-03-22 17:07schanzenNote Added: 0024282
2025-03-22 20:30schanzenNote Added: 0024283
2025-03-22 20:39schanzenNote Added: 0024284
2025-03-22 21:12schanzenNote Added: 0024285
2025-03-23 18:42schanzenRelationship addedrelated to 0009647
2025-03-23 18:43schanzenRelationship addedrelated to 0009651
2025-03-23 22:34schanzenNote Added: 0024292
2025-03-23 22:36schanzenNote Edited: 0024292
2025-03-23 22:36schanzenNote Edited: 0024292
2025-03-23 22:37schanzenNote Edited: 0024292
2025-03-23 22:38schanzenNote Edited: 0024292
2025-03-23 22:39schanzenNote Edited: 0024292
2025-04-17 20:36Christian GrothoffTag Attached: security
2025-04-17 20:36Christian GrothoffTag Attached: ux
2025-04-23 22:37Christian GrothoffRelationship addedrelated to 0009572
2025-04-23 22:37Christian GrothoffRelationship addedrelated to 0009620
2025-05-08 13:35Christian GrothoffRelationship replacedchild of 0009647
2025-06-16 20:18schanzenNote Added: 0025261
2025-06-19 12:04schanzenAssigned Toschanzen => Christian Grothoff
2025-06-19 12:05schanzenNote Added: 0025282
2025-06-20 20:53Christian GrothoffProduct Version => 1.0
2025-06-20 20:54Christian GrothoffPrioritylow => high
2025-06-21 19:13Christian GrothoffNote Added: 0025292
2025-06-21 19:13Christian GrothoffStatusassigned => resolved
2025-06-21 19:13Christian GrothoffResolutionopen => fixed
2025-06-21 19:13Christian GrothoffFixed in Version => 1.0 stretch goals
2025-06-21 19:13Christian GrothoffTarget Version1.1 => 1.0 stretch goals
2025-08-31 17:09Christian GrothoffStatusresolved => closed