crossbario / crossbar

Crossbar.io - WAMP application router
https://crossbar.io/
Other
2.05k stars 274 forks source link

HTTP Bridge {reason} Formatting Issue #1108

Closed vetsin closed 7 years ago

vetsin commented 7 years ago

Making a signed call into HTTP Bridge with an invalid timestamp e.g. tempkey|2017-06-16T16:22:39Z|0|0|{"procedure": "myprocedure"}

results in the following HTTP 400 response:

{"kwargs":{},"args":[],"error":"REST bridge signature was invalid ({reason})."}

Expected behavior would contain a reason.

Valid error messages are returned when the timestamp is a valid format (e.g. Request expired, too old timestamp.) and if timestamp is not expired and other values are incorrect, (e.g. REST bridge signature secret not valid.)

bash-4.3# crossbar version
     __  __  __  __  __  __      __     __
    /  `|__)/  \/__`/__`|__) /\ |__)  |/  \
    \__,|  \\__/.__/.__/|__)/~~\|  \. |\__/

 Crossbar.io        : 17.5.1 (Crossbar.io COMMUNITY)
   Autobahn         : 17.5.1 (with JSON, MessagePack, CBOR, UBJSON)
   Twisted          : 17.5.0-EPollReactor
   LMDB             : 0.92/lmdb-0.9.18
   Python           : 2.7.13/CPython
 OS                 : Linux-4.4.59-boot2docker-x86_64-with
 Machine            : x86_64
 Release key        : RWRrH63dDsFR7o8Z7+7gv1uLF4qPKyZXq45Ble52SJ33KFz1UicMyq0b
2017-06-16T23:20:16+0000 [Controller      5]     /  `|__)/  \/__`/__`|__) /\ |__)  |/  \
2017-06-16T23:20:16+0000 [Controller      5]     \__,|  \\__/.__/.__/|__)/~~\|  \. |\__/
2017-06-16T23:20:16+0000 [Controller      5]
2017-06-16T23:20:16+0000 [Controller      5] Version:     Crossbar.io COMMUNITY 17.5.1
2017-06-16T23:20:16+0000 [Controller      5] Public Key:  d4f3e317c6f5d0cbf1e88221107412af10206ae70cda76e70aeef631f63ed320
2017-06-16T23:20:16+0000 [Controller      5]
2017-06-16T23:20:16+0000 [Controller      5] Node starting with personality "community" [crossbar.controller.node.Node]
2017-06-16T23:20:16+0000 [Controller      5] Running from node directory "/code/.crossbar"
2017-06-16T23:20:16+0000 [Controller      5] Node configuration loaded from "/code/.crossbar/config.json"
2017-06-16T23:20:16+0000 [Controller      5] Controller process starting [CPython-EPollReactor] ..
2017-06-16T23:20:16+0000 [Controller      5] No extra node router roles
2017-06-16T23:20:16+0000 [Controller      5] Using default node shutdown triggers [u'shutdown_on_worker_exit']
2017-06-16T23:20:16+0000 [Controller      5] Configuring node from local configuration ...
2017-06-16T23:20:16+0000 [Controller      5] Starting 1 workers ...
2017-06-16T23:20:16+0000 [Controller      5] Router worker "worker-001" starting ..
2017-06-16T23:20:17+0000 [Router          8] Router worker "worker-001" process 8 starting on CPython-EPollReactor ..
2017-06-16T23:20:17+0000 [Router          8] Router worker "worker-001" session 3953482092002077 initializing ..
2017-06-16T23:20:17+0000 [Router          8] Router worker "worker-001" session ready
2017-06-16T23:20:17+0000 [Controller      5] Router worker "worker-001" process 8 started
2017-06-16T23:20:17+0000 [Router          8] Realm 'realm1' started
2017-06-16T23:20:17+0000 [Controller      5] Router 'worker-001': realm 'realm-001' (named 'realm1') started
2017-06-16T23:20:17+0000 [Router          8] role role-001 on realm realm-001 started
2017-06-16T23:20:17+0000 [Controller      5] Router 'worker-001': role 'role-001' (named 'authenticator') started on realm 'realm-001'
2017-06-16T23:20:17+0000 [Router          8] role role-002 on realm realm-001 started
2017-06-16T23:20:17+0000 [Controller      5] Router 'worker-001': role 'role-002' (named 'api') started on realm 'realm-001'
2017-06-16T23:20:17+0000 [Router          8] role role-003 on realm realm-001 started
2017-06-16T23:20:17+0000 [Controller      5] Router 'worker-001': role 'role-003' (named 'frontend') started on realm 'realm-001'
2017-06-16T23:20:17+0000 [Router          8] role role-004 on realm realm-001 started
2017-06-16T23:20:17+0000 [Controller      5] Router 'worker-001': role 'role-004' (named 'backend') started on realm 'realm-001'
2017-06-16T23:20:18+0000 [Router          8] started component: authenticator.AuthenticatorSession id=2515892335876535
2017-06-16T23:20:18+0000 [Controller      5] Router 'worker-001': component 'component-001' started
2017-06-16T23:20:18+0000 [Router          8] started component: session.AppSession id=1884728421970383
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/46303339-http-bridge-reason-formatting-issue?utm_campaign=plugin&utm_content=tracker%2F462544&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F462544&utm_medium=issues&utm_source=github).
meejah commented 7 years ago

This should be fixed by 7d4886d9cb4cc5452e7c707ee13fe635a2c287f9 which is on master and will be in the next release.