avalanche123 / cassandra-web

A web interface for Apache Cassandra
http://avalanche123.com/cassandra-web/
MIT License
135 stars 52 forks source link

is there a permission config to restrict access ? #7

Open yongdi opened 7 years ago

yongdi commented 7 years ago

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

jeremyjpj0916 commented 6 years ago

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 commented 6 years ago

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

niccoxx commented 4 years ago

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?