Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strong access control for Gollum?

What is the best way to add multiple role access to a Gollum wiki?

I understand how to add Basic HTTP auth via, Rack middleware. However, I would like to know what's required to have full multi user/role authentication and authorization.

Can Devise or OmniAuth be used in a similar way to a Rails app?

What is required?

like image 724
Joshua Hoblitt Avatar asked Mar 09 '12 13:03

Joshua Hoblitt


4 Answers

With this hint http://www.sinatrarb.com/faq.html#auth my configuration file like this

# authentication.rb
module Precious
  class App < Sinatra::Base
    use Rack::Auth::Basic, "Restricted Area" do |username, password|
      [username, password] == ['admin', 'admin']
    end
  end
end

and running as:

$ gollum --config authentication.rb

In the running gollum instance, it will ask for user name and password

like image 194
vigntom Avatar answered Oct 24 '22 18:10

vigntom


There's also the omnigollum project (https://github.com/arr2036/omnigollum) to support omniauth with gollum.

like image 42
joscarsson Avatar answered Oct 24 '22 18:10

joscarsson


I found a basic http-auth extension here: https://gist.github.com/2224709

like image 44
troelskn Avatar answered Oct 24 '22 19:10

troelskn


Leaving this here for anyone interested: Using vigntom's method, I made a repo with basic auth added in for Gollum, ready to go. I put credentials in a yaml file to keep them from being hard coded in the repo.

https://github.com/mrchameleon/precious

like image 43
Mr. Chameleon Avatar answered Oct 24 '22 19:10

Mr. Chameleon