Open shrjain opened 10 years ago
Make sure that your django user and your sqlshare user are the same. For example, mine is tbohn@washington.edumailto:tbohn@washington.edu. There are a couple more things that I ran into that were different from what was documented on the github site. I can help you if you want.
From: shrjain [mailto:notifications@github.com] Sent: Thursday, January 30, 2014 3:23 PM To: uwescience/sqlshare-web Subject: [sqlshare-web] Setting up a new instance of frontend fails for ss_apikey authentication type. (#9)
I set up a new instance of sqlshare-web following the instructions line by line as given here: https://github.com/uwescience/sqlshare-web/wiki/Installation-instructions
Things seem to work for the ss_trust. But with ss_apikey authentication, when I open the instance address in my browser, I see that it is logged in as some user called 'javerage'. For ss_apikey authentication, I have the following in my settings.py: SQLSHARE_AUTH_TYPE = "apikey" SQLSHARE_API_KEY = "4916f21df583c0e0bc5361c42d2e6b58" SQLSHARE_API_USER = "sqlshare2012@gmail.commailto:sqlshare2012@gmail.com"
Given that I have no experience with Django, I am obviously missing something, but the instructions are not clear as to what I might have missed.
I can provide access to the EC2 instance for debugging if needed.
— Reply to this email directly or view it on GitHubhttps://github.com/uwescience/sqlshare-web/issues/9.
I am using the remote user middleware: (having the following in my settings.py under MIDDLEWARE_CLASSES django.contrib.auth.middleware.RemoteUserMiddleware and AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.RemoteUserBackend', ) )
And I launch the server as follows: REMOTE_USER=sqlshare2012@gmail.com python manage.py runserver 0.0.0.0:8000
I see the following exception again and again: Exception: Logged in user doesn't match the SQLSHARE user in settings
here’a what mine looks like:
INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'sqlshare', 'templatetag_handlebars', 'userservice', 'compressor', 'userservice', )
MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.RemoteUserMiddleware', 'userservice.user.UserServiceMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', )
AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.RemoteUserBackend', )
ROOT_URLCONF = 'ss_project.urls'
WSGI_APPLICATION = 'ss_project.wsgi.application'
From: shrjain notifications@github.com<mailto:notifications@github.com> Reply-To: uwescience/sqlshare-web reply@reply.github.com<mailto:reply@reply.github.com> Date: Thursday, January 30, 2014 at 4:20 PM To: uwescience/sqlshare-web sqlshare-web@noreply.github.com<mailto:sqlshare-web@noreply.github.com> Cc: Tsianina Bohn tbohn@uw.edu<mailto:tbohn@uw.edu> Subject: Re: [sqlshare-web] Setting up a new instance of frontend fails for ss_apikey authentication type. (#9)
I am using the remote user middleware: (having the following in my settings.py under MIDDLEWARE_CLASSES django.contrib.auth.middleware.RemoteUserMiddleware and AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.RemoteUserBackend', ) )
And I launch the server as follows: REMOTE_USER=sqlshare2012@gmail.commailto:sqlshare2012@gmail.com python manage.py runserver 0.0.0.0:8000
I see the following exception again and again: Exception: Logged in user doesn't match the SQLSHARE user in settings
— Reply to this email directly or view it on GitHubhttps://github.com/uwescience/sqlshare-web/issues/9#issuecomment-33750351.
Also, I use this url to reach my server through the browser so maybe double check your urls.py as well: http://0.0.0.0:8000/sqlshare/
From: shrjain notifications@github.com<mailto:notifications@github.com> Reply-To: uwescience/sqlshare-web reply@reply.github.com<mailto:reply@reply.github.com> Date: Thursday, January 30, 2014 at 4:20 PM To: uwescience/sqlshare-web sqlshare-web@noreply.github.com<mailto:sqlshare-web@noreply.github.com> Cc: Tsianina Bohn tbohn@uw.edu<mailto:tbohn@uw.edu> Subject: Re: [sqlshare-web] Setting up a new instance of frontend fails for ss_apikey authentication type. (#9)
I am using the remote user middleware: (having the following in my settings.py under MIDDLEWARE_CLASSES django.contrib.auth.middleware.RemoteUserMiddleware and AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.RemoteUserBackend', ) )
And I launch the server as follows: REMOTE_USER=sqlshare2012@gmail.commailto:sqlshare2012@gmail.com python manage.py runserver 0.0.0.0:8000
I see the following exception again and again: Exception: Logged in user doesn't match the SQLSHARE user in settings
— Reply to this email directly or view it on GitHubhttps://github.com/uwescience/sqlshare-web/issues/9#issuecomment-33750351.
Yep. My settings.py is same (similar). Ya I have no problem reaching the URL, its after I reach the URL, I am somehow logged in as the wrong user (javerage).
@shrjain: it's also the case that you are using a different SQL backend, right?
Yes.
I’m connecting to the production/sqlshare-test back end server using my own sqlshare-web front end….so I didn’t set up a separate db, only sql-lite I’m guessing.
How did you figure out what your api-key is? I got mine by going to this link and logging in: https://sqlshare.escience.washington.edu/sqlshare/#s=credentials
From: Daniel Halperin notifications@github.com<mailto:notifications@github.com> Reply-To: uwescience/sqlshare-web reply@reply.github.com<mailto:reply@reply.github.com> Date: Friday, January 31, 2014 at 11:29 AM To: uwescience/sqlshare-web sqlshare-web@noreply.github.com<mailto:sqlshare-web@noreply.github.com> Cc: Tsianina Bohn tbohn@uw.edu<mailto:tbohn@uw.edu> Subject: Re: [sqlshare-web] Setting up a new instance of frontend fails for ss_apikey authentication type. (#9)
@shrjainhttps://github.com/shrjain: it's also the case that you are using a different SQL backend, right?
— Reply to this email directly or view it on GitHubhttps://github.com/uwescience/sqlshare-web/issues/9#issuecomment-33834127.
I have access to the backend sql for production, so I just cheated to figure out my api_key. the url above gives me the same value.
I set up a new instance of sqlshare-web following the instructions line by line as given here: https://github.com/uwescience/sqlshare-web/wiki/Installation-instructions
Things seem to work for the ss_trust. But with ss_apikey authentication, when I open the instance address in my browser, I see that it is logged in as some user called 'javerage'. For ss_apikey authentication, I have the following in my settings.py: SQLSHARE_AUTH_TYPE = "apikey" SQLSHARE_API_KEY = "4916f21df583c0e0bc5361c42d2e6b58" SQLSHARE_API_USER = "sqlshare2012@gmail.com"
Given that I have no experience with Django, I am obviously missing something, but the instructions are not clear as to what I might have missed.
I can provide access to the EC2 instance for debugging if needed.