Page 1 of 1

Login failed. Insufficient privileges.

Posted: July 18th, 2017, 10:36 pm
by mka.surveys
Hi everyone,

I just finished setting up CSWeb server. I got the "Setup Complete!" message and was redirected to the app login page http://mydomain.com/csweb/ui but I can't manage to login.

I'm following the instructions on http://www.csprousers.org/help/CSWeb/ap ... setup.html so I try to login as user "admin" and using the password I typed in the setup.

I already tried deleting the config files and re-doing the process, but I get the same error. Inside the logs/ui.log file I see:


[2017-07-18 21:19:50] CSPro UI.INFO: Matched route "GET_". {"route_parameters":{"_controller":"Controllers\\LoginController::login","_route":"GET_"},"request_uri":"http://mydomain.com/csweb/ui/"} []
[2017-07-18 21:19:53] CSPro UI.INFO: Matched route "login_check". {"route_parameters":{"_controller":"Controllers\\LoginController::loginAction","_route":"login_check"},"request_uri":"http://mydomain.com/csweb/ui/login_check"} []


Thanks

Re: Login failed. Insufficient privileges.

Posted: July 19th, 2017, 6:37 am
by josh
Do you see anything in the api.log file?

Re: Login failed. Insufficient privileges.

Posted: July 19th, 2017, 1:49 pm
by mka.surveys
I don't have the api.log file, and the info in ui.log is not very useful. What else can I do?

Thank you josh!

Re: Login failed. Insufficient privileges.

Posted: July 19th, 2017, 4:29 pm
by tpr
I'm also getting the "Insufficient Privileges" error on a new csweb server when I log in as a regular user. I'm able to log in as admin with no problem. I have an api.log file. Anything in particular I should look for?

ETA: here's part of the log.

[2017-07-18 15:22:57] CSPro API.ERROR: Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /csweb/api" (uncaught exception) at C:\inetpub\wwwroot\csweb\vendor\symfony\http-kernel\EventListener\RouterListener.php line 176 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET /csweb/api\" at C:\\inetpub\\wwwroot\\csweb\\vendor\\symfony\\http-kernel\\EventListener\\RouterListener.php:176, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): No routes found for \"/csweb/api\". at C:\\inetpub\\wwwroot\\csweb\\vendor\\symfony\\routing\\Matcher\\UrlMatcher.php:98)"} []

Another update:
I don't think that log actually shows the error. It isn't updated when I get the failed login. The ui log is updated when I log in, but it doesn't look like there's anything helpful here.

[2017-07-19 16:33:14] CSPro UI.INFO: Matched route "login_check". {"route_parameters":{"_controller":"Controllers\\LoginController::loginAction","_route":"login_check"},"request_uri":"https://cpc-fs1.ad.unc.edu/csweb/ui/login_check"} []


Thanks.

Re: Login failed. Insufficient privileges.

Posted: July 20th, 2017, 6:34 am
by josh
@tpr Regular users can't log in to the web interface. Only admin users can login to the web interface. The idea is that a regular user is what you use for your interviewer tablets to send data to the server but they can't use the web interface. Only an admin user can use the web interface.

@mka.surveys if you don't have an api.log file then there is probably something wrong with the configuration. To get more detailed info in the ui.log file try changing the line:

Code: Select all

$logLevel = Monolog\Logger::ERROR;
to

Code: Select all

$logLevel = Monolog\Logger::DEBUG;
in the file csweb\src\ui\src\app.php and then try to log in again and post what you see in the ui.log.

Re: Login failed. Insufficient privileges.

Posted: July 20th, 2017, 8:37 am
by tpr
Ah, ok. Thanks, Josh.

Re: Login failed. Insufficient privileges.

Posted: July 20th, 2017, 1:39 pm
by mka.surveys
Thanks Josh,

The particular line you mention is missing in app.php. Are the following lines equivalent? If so, the debug mode is already active :| .

Code: Select all

$app->register(new Silex\Provider\MonologServiceProvider(), array(
    'monolog.logfile' => __DIR__.'/../../../logs/ui.log',
	'monolog.name' => 'CSPro UI',
	'monolog.level'=> Monolog\Logger::DEBUG
));
I guess I'm running out of options, so I'll be willing to give you access to my server if you could help me.

Again, thanks Josh!

Re: Login failed. Insufficient privileges.

Posted: July 20th, 2017, 3:54 pm
by josh
Yes, that should be the same. Please email or PM credentials to the server and I'll take a look.

Re: Login failed. Insufficient privileges.

Posted: August 29th, 2018, 4:01 pm
by savy
If CSWeb is running under apache with fastcgi then the authorization headers are possibly being removed causing this issue.
In this case, add this line to .htaccess located in csweb folder

SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0

Re: Login failed. Insufficient privileges.

Posted: April 2nd, 2020, 4:14 am
by Jeevan
Thank you it work :) :)