Installation

CAS User with administrator permissions is unable to perform administrator functions

CAS User with administrator permissions is unable to perform administrator functions

by Gary Maxwell -
Number of replies: 9

We brought up 2.19 VM image and performed the following:

1. We logged in with built-in "admin" user and added a new user that has administrator permissions.

2. We then altered Webwork configuration  to use CAS authentication.

3. We login successfully with CAS using the new user that has administrator permissions.

4.. After going into Accounts Manager, I click on Add User however the New User form does not appear.

Does anyone know what is missing?

-Gary
Tags:
In reply to Gary Maxwell

Re: CAS User with administrator permissions is unable to perform administrator functions

by Danny Glin -

First, just making sure that after you select the "Add" tab, that you click the "Add" button to generate the form with the selected number of rows.

Can you post a screenshot of what you see after you do that?

In reply to Danny Glin

Re: CAS User with administrator permissions is unable to perform administrator functions

by Gary Maxwell -
Hi Danny
I click the Add tab then the Add button and then I see the following...



Attachment webwork.png
In reply to Gary Maxwell

Re: CAS User with administrator permissions is unable to perform administrator functions

by Glenn Rice -

I sounds like the JavaScript is not loading correctly. Try running "npm ci" in the htdocs directory.  Also check for console errors in the browser.

In reply to Glenn Rice

Re: CAS User with administrator permissions is unable to perform administrator functions

by Gary Maxwell -

Hi Danny Thank you for looking at this.

I am still having the same issue. No errors in the browser however I do see the following warnings in the log...

2024-12-05 08:08:59.29015] [1790] [warn] [Tum_YOglDVKe] [/webwork2/admin] Implicit use of @_ in subroutine entry with signatured subroutine is experimental at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/UserList.pm line 239.

[2024-12-05 08:08:59.29025] [1790] [warn] [Tum_YOglDVKe] [/webwork2/admin] Implicit use of @_ in subroutine entry with signatured subroutine is experimental at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/UserList.pm line 239.

[2024-12-05 08:08:59.29029] [1790] [warn] [Tum_YOglDVKe] [/webwork2/admin] Implicit use of @_ in subroutine entry with signatured subroutine is experimental at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/UserList.pm line 239.

[2024-12-05 08:09:00.32517] [1790] [warn] [R9u9kTfJ8MNs] [/webwork2/admin/instructor/users] Use of uninitialized value in hash element at template ContentGenerator/Login.html.ep line 12.

[2024-12-05 08:09:00.32525] [1790] [warn] [R9u9kTfJ8MNs] [/webwork2/admin/instructor/users] Use of uninitialized value in hash element at template ContentGenerator/Login.html.ep line 12.



In reply to Gary Maxwell

Re: CAS User with administrator permissions is unable to perform administrator functions

by Glenn Rice -

None of those warnings will cause the issue you are experiencing.  The "implicit use of @_ in subroutine entry with signatured subroutine is experimental" warning is just a warning issued by newer versions of perl, and is an inconsequential warning.  That has been fixed in the develop branch.

The warning "Use of uninitialized value in hash element" is not related to this page at all, and is due to the CAS authentication module declaring itself as "external" and then the Login.html.ep template using variables from the LTI authentication module even though that is not enabled.  That has also been fixed in the develop branch.

In any case, that is not what your issue is.  The way that the tabs work in the accounts manager (and other pages that use tabs) is that javascript sets the value of a hidden input anytime a tab is change.  That value is submitted if you click the "Add" button, and lets WeBWorK know which tab was selected.  It seems that for some reason WeBWorK is not getting that value when you click the "Add" button, and so WeBWorK just sends you to the main account manager page.  That is why I told you to execute "npm ci" in the htdocs directory to ensure that all assets are properly generated and the asset JSON file correctly lists those assets for access by the server.

In reply to Glenn Rice

Re: CAS User with administrator permissions is unable to perform administrator functions

by Gary Maxwell -
If I log into WebWork using Basic Authentication, everything seems to work. The built-in admin users and new users that are assigned admin authorization. The problem is when I configure CAS as the authentication method in localOverrides.conf

$authen{admin_module} = [
"WeBWorK::Authen::CAS"
];
In reply to Gary Maxwell

Re: CAS User with administrator permissions is unable to perform administrator functions

by Glenn Rice -

The CAS authentication module has not been tested with recent revisions to the WeBWorK authentication system.  I see that it relies on the "key" parameter.  That parameter will generally not be available.  That is no longer used by authentication for any of the updated authentication modules except in the case that $session_management_via = "key".  So you should try that setting in localOverrides.conf.  Note that using that setting is less secure as the "key" parameter is accessible client side.  That authentication module needs to be updated to use techniques like in the new Saml2 authentication module (not yet released) instead of what it currently does.

In reply to Glenn Rice

Re: CAS User with administrator permissions is unable to perform administrator functions

by Gary Maxwell -
CAS is now working. Nice Thank You!
Any estimate of when the module would be changed to use SAML?
In reply to Gary Maxwell

Re: CAS User with administrator permissions is unable to perform administrator functions

by Glenn Rice -
The CAS module isn't being changed to use SAML. However, in the next release of WeBWorK there will be a separate new SAML authentication module. It is already in the develop branch of WeBWorK.