cassandra-web icon indicating copy to clipboard operation
cassandra-web copied to clipboard

is there a permission config to restrict access ?

Open yongdi opened this issue 8 years ago • 3 comments

I don't see any config that user can modify. If I disclose it to the internet, how to ensure the safety?

yongdi avatar Apr 26 '17 06:04 yongdi

We are looking to add a very simple basic auth wrapper to this app for popup so will submit a PR if we get it working easy off a config file or something

jeremyjpj0916 avatar May 09 '18 22:05 jeremyjpj0916

Well actually I don't have time to do it nicely, but if you build the project locally off gemspec add this to the code to do it in app.rb:

class App < Sinatra::Base
  configure do
    set :root, File.expand_path('../', __FILE__) + '/app'

    enable  :static
    disable :views
    disable :method_override
    disable :protection
  end
  
  use Rack::Auth::Basic, "Protected Area" do |username, password|
    username == 'username' && password == 'password'
end

Set username and password to the secret basic auth login you would like

jeremyjpj0916 avatar May 10 '18 21:05 jeremyjpj0916

Hi, I'll try to add this basic auth to cassandra-web. After login(basic auth works fine) I've no access to cassandra keyspaces. Don't view any data. Any idea?

niccoxx avatar Mar 03 '20 14:03 niccoxx