I think we want to refactor this.  The goal is that the 'real' UI (portal, etc) does not need to know anything about each different service.  Specifically the rabbitmq --> >rabbit translation.  Or the details of what credentials are needed to access each service.  The UI should just pass in the entire 'credentials' object, and the 'raw' label (ie, rabbitmq).  Then alll the other logic lives here in the proxy, rather than the UI.

something like this:

    post /:label
      auth = ...
      response.set_cookie....
      id, session[:svc] = extract_svc(label, params[:credentials])
      redirect "/proxy/#{id}"
    end

    def extract_svc(label, credentials)
      send("extract_svc_#{label}", credentials)
    end

    def extract_svc_rabbitmq(credentials)
      id = params[:id]
      svc = {:id => id, :host => params[:host], :port = params[:port], ... }
      [id, svc]
    end

and eventually

    def extract_svc_mysql
    def extract_svc_redis
    ...