View Issue Details

IDProjectCategoryView StatusLast Update
0006838Talermerchant backendpublic2021-08-24 14:23
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
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Target Version0.8Fixed in Version0.8 
Summary0006838: merchant backend regressions in merchant-instances-urls and merchant-instances integration tests
Description$ taler-wallet-cli testing run-integrationtests 'merchant-instances-urls'
[...]
checking http://localhost:8083/instances/foo/config, expected 404, got 200

=> Clearly, the backend is giving a 200 in response for a GET request for a non-existing instance. I'm suspecting a recent change related to handling OPTIONS introduced this regression.

$ taler-wallet-cli testing run-integrationtests 'merchant-instances'
[...]
requesting instances with auth { method: 'external' }
FATAL: test failed with exception Error: expected axios error
  at [...]integrationtests/test-merchant-instances.ts:131:5

=> Axios is the HTTP client library. The request that *should* fail is a GET request for "/private/instances" (implicit default instance).
=> The request should fail, because a few lines before [2], the auth was changed from "external" to "token".
=> Instead, the request succeeds, even though the MerchantApiClient has not been updated with the new credentials. It still uses

[1] https://git.taler.net/wallet-core.git/tree/packages/taler-wallet-cli/src/integrationtests/test-merchant-instances.ts#n131
[2] https://git.taler.net/wallet-core.git/tree/packages/taler-wallet-cli/src/integrationtests/test-merchant-instances.ts#n118
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Christian Grothoff

2021-04-09 12:57

manager   ~0017718

4f8cb89..89a3d27 fixes the /config 404 issue.

Christian Grothoff

2021-04-09 14:31

manager   ~0017719

I cannot reproduce the other issue. I used Curl to change the default authentication checks, and the backend then correctly requires authentication.

$ curl -X POST -d '{ "method":"token","token":"secret-token:foo" }' http://localhost:8080/private/auth
$ curl -H 'Authorization: Bearer secret-token:foo' -X GET http://localhost:8080/private/instances
{
  "instances": [
    {
      "name": "default",
      "id": "default",
      "merchant_pub": "JZADNDX1RJDZVJNJCG55KFV9QPGYNCG4RRHG7J1N90SQHZVZKTBG",
      "payment_targets": [
        "x-taler-bank"
      ],
      "deleted": false
    }
  ]
}
$ curl -H 'Authorization: Bearer secret-token:fbar' -X GET http://localhost:8080/private/instances
{
  "code": 2015,
  "hint": "The merchant refused the request due to lack of authorization.",
  "detail": "Check 'Authorization' header"
}
$ curl http://localhost:8080/private/instances
{
  "code": 2015,
  "hint": "The merchant refused the request due to lack of authorization.",
  "detail": "Check 'Authorization' header"
}

Christian Grothoff

2021-04-09 14:32

manager   ~0017720

test-merchant-walletharness.sh fails, but it says because of _lack_ of authentication, not because a request is allowed.

Florian Dold

2021-04-09 14:46

manager   ~0017723

This was indeed a bogus test assertion, fixed in f30f923e

The merchant integration tests are now passing again for me.

Issue History

Date ModifiedUsernameFieldChange
2021-04-08 14:36Florian DoldNew Issue
2021-04-08 14:36Florian DoldStatusnew => assigned
2021-04-08 14:36Florian DoldAssigned To => Christian Grothoff
2021-04-09 12:57Christian GrothoffNote Added: 0017718
2021-04-09 14:31Christian GrothoffNote Added: 0017719
2021-04-09 14:32Christian GrothoffNote Added: 0017720
2021-04-09 14:32Christian GrothoffAssigned ToChristian Grothoff => Florian Dold
2021-04-09 14:32Christian GrothoffStatusassigned => feedback
2021-04-09 14:46Florian DoldAssigned ToFlorian Dold => Christian Grothoff
2021-04-09 14:46Florian DoldStatusfeedback => informing
2021-04-09 14:46Florian DoldResolutionopen => fixed
2021-04-09 14:46Florian DoldNote Added: 0017723
2021-07-30 11:56Christian GrothoffFixed in Version => 0.8
2021-07-30 11:59Christian GrothoffTarget Version => 0.8.1
2021-07-30 12:01Christian GrothoffTarget Version0.8.1 => 0.8
2021-08-24 14:23Christian GrothoffStatusinforming => closed
2025-03-22 13:09Christian GrothoffCategorymechant backend => merchant backend