Commits

Joel Rivera committed 3a410ea

Add globus_use_oauth to enable and disable the GlobusAuthentication middleware

Comments (0)

Files changed (2)

lib/galaxy/webapps/galaxy/buildapp.py

                                display_servers = util.listify( conf.get( 'display_servers', '' ) ),
                                admin_users = conf.get( 'admin_users', '' ).split( ',' ) )
         log.debug( "Enabling 'remote user' middleware" )
+        if asbool(conf.get('globus_use_oauth', False)):
+            gparams = (conf.get('globus_nexus_client', None),
+                       conf.get('globus_nexus_secret', None),
+                       conf.get('globus_nexus_server', None),
+                       conf.get('globus_group_id', None),
+                       conf.get('globus_gaccount', None))
+            app = globus.middleware.UserAuthentication(app, *gparams)
     # The recursive middleware allows for including requests in other 
     # requests or forwarding of requests, all on the server side.
     if asbool(conf.get('use_recursive', True)):
         from paste import recursive
         app = recursive.RecursiveMiddleware( app, conf )
         log.debug( "Enabling 'recursive' middleware" )
+
     # Various debug middleware that can only be turned on if the debug
     # flag is set, either because they are insecure or greatly hurt
     # performance
-    gparams = (conf.get('globus_nexus_client', None),
-               conf.get('globus_nexus_secret', None),
-               conf.get('globus_nexus_server', None),
-               conf.get('globus_group_id', None),
-               conf.get('globus_gaccount', None))
-    app = globus.middleware.UserAuthentication(app, *gparams)
     if debug:
         # Middleware to check for WSGI compliance
         if asbool( conf.get( 'use_lint', False ) ):

universe_wsgi.ini

 								            "rna-seq-brain_1.fastq.fastqsanger",
 								            "rna-seq-brain_2.fastq.fastqsanger"],
      					            "Exome-seq-sample-data": ["Exome-Sample_Forward_1.fastq.gz", "Exome-Sample_Reverse_2.fastq.gz"]}]}
+# To use the GlobusAuthentication middleware is required
+# to set the following options and `use_remote_user=True`:
+globus_use_oauth = True 
 globus_nexus_client = galaxytest
 #globus_nexus_secret = 
-#globus_group_id =
-#globus_gaccount =
+#globus_group_id =  # This is optional
+#globus_gaccount =  # script to create the myproxy and user account.
+
 
 # this value changes how the user_ftp_dir is determined:
 #  - normally it is set by doing os.path.join(ftp_upload_dir, user.email)