19

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?

ocodo
  • 29,401
  • 18
  • 105
  • 117
Joshua Hoblitt
  • 342
  • 2
  • 11
  • 1
    @ChrisF I'm going to reword this to make it on topic. +vote to re-open. – ocodo Apr 05 '15 at 08:12
  • Until it's reopened, I suggest anyone driving by should consider wrapping Gollum inside a Rails app as per http://stackoverflow.com/a/13372435/311660 - wrapping different levels of authorization (e.g. with CanCan etc.) may require forking Gollum to do so, it depends on the granularity of authorization/roles/rights desired. – ocodo Apr 05 '15 at 08:22

5 Answers5

17

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

Zhenkai
  • 318
  • 3
  • 15
vigntom
  • 171
  • 1
  • 3
6

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

joscarsson
  • 4,789
  • 4
  • 35
  • 43
2

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

troelskn
  • 115,121
  • 27
  • 131
  • 155
1

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

0

In this thread

https://github.com/gollum/gollum/issues/107

one of the Gollum developers gives some hints. No known fork / project yet it seems.

Thomas Vander Stichele
  • 36,043
  • 14
  • 56
  • 60
Tobias Verbeke
  • 422
  • 4
  • 7
  • 3
    Whilst this may theoretically answer the question, [it would be preferable](http://meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – CharlesB Mar 19 '12 at 14:12