Uploaded image for project: 'Pegasus'
  1. Pegasus
  2. PM-935

pegasus-dashboard URL for users when running through apache webserver

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • master, 4.5.0
    • master, 4.6.0, 4.5.1
    • Pegasus Dashboard
    • None

    Description

      ’m stuck getting dashboard set up under apache in 4.5.0. Following the instructions with NoAuthentication doesn’t work, as auth.py resolves all users to apache, rather than their username. I added the following patch below to auth.py to pull the username out of the URL. This works and returns the right workflow.db path, but then the next step in the app gives me a 404 not found:

      <http://sugar-dev1.phy.syr.edu/pegasus/~dbrown>

      Am I missing something obvious?

      Cheers,
      Duncan.

      --- auth.py.bak 2015-05-18 13:58:33.000000000 -0400
      +++ auth.py 2015-05-28 08:35:05.000000000 -0400
      @@ -51,6 +51,24 @@
              return user.get_user_by_username(self.username)


      +class URIAuthentication(BaseAuthentication):
      + def __init__(self, *args):
      + # For no auth. username and password is not required
      + pass
      +
      + def authenticate(self):
      + # Always authenticate the user
      + return True
      +
      + def get_user(self):
      + # Parse the username out of the URL
      + if '~' in request.path:
      + username = request.path.split('~')[1].rstrip('/')
      + return user.get_user_by_username(username)
      + else:
      + return user.get_user_by_uid(os.getuid())
      +
      +
      def basic_auth_response():
          return Response('Basic Auth Required', 401,
                          {'WWW-Authenticate': 'Basic realm="Pegasus Service"'})

      Attachments

        Activity

          People

            mayani Rajiv Mayani
            dbrown Duncan Brown
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: