Hypertopic / AAAforREST

An HTTP reverse proxy to bring authentication, authorization and accounting to RESTful applications
GNU Affero General Public License v3.0
6 stars 5 forks source link

Authentication against a given username and password #2

Closed benel closed 9 years ago

benel commented 9 years ago

@franck-eyraud This feature also known as "dummy password" seems to have been broken by one of the latest commits.

franck-eyraud commented 9 years ago

:( ups, can you describe the behaviour, or give an config example.

benel commented 9 years ago

Here is a sample configuration that worked before:

{
  "port": 1337,
  "sites": [{
    "hostProxy": "traduxio.local",
    "port": 5984,
    "path": "/traduxio/_design/traduxio/_rewrite",
    "hideLocationParts": 1,
    "authentication": [
      {"login": "roadrunner", "password": "bipbip"}
    ],
    "rules": [{
      "control": "/works/.test(path)",
      "action": "authenticate(context, function(){proxyWork(context);});"
    }]
  }]
}
benel commented 9 years ago

And here is the corresponding Frisby test:

var test = require('frisby');
test.create('Dummy authentication')
  .get('http://traduxio.local:1337/')
  .auth('roadrunner', 'bipbip')
  .expectStatus(200)
.toss()

I will put it on Travis.CI whenever I can.

benel commented 9 years ago

Crap. I'm the one to blame (f93084c8b518652990c4e718a240383ed09ff52c).

franck-eyraud commented 9 years ago

OK, now I get why I couldn't reproduce, I didn't merge this last modification.