DiUS / pact_broker-docker

'Dockerised' pact broker
http://pact.io
MIT License
76 stars 102 forks source link

Anonymous access if BasicAuth is enabled #54

Open omazilov opened 6 years ago

omazilov commented 6 years ago

There are no possibility to use pact-broker with anonymous access if Basic Auth is enabled

bethesque commented 6 years ago

You'll need to build your own docker image. I would fork the dius repo, and the modify the pact_broker/basic_auth.rb file.

Change this method:

  def use_basic_auth?(env)
    !(env[PATH_INFO] =~ BADGE_PATH)
  end

to this:

  def use_basic_auth?(env)
    env['REQUEST_METHOD'] != 'GET'
  end
bethesque commented 6 years ago

As mentioned on gitter, there is currently no support for user management. However, if you wish to give every user their own account, you should look up how to set up password authentication with nginx.