Error when trying to add new service to CAS

71 views
Skip to first unread message

bobbintb

unread,
May 10, 2017, 12:38:34 PM5/10/17
to CAS Community
I have CAS 5 set up and am trying to add a service to manage with the CAS services management app. When doing so I get "An error has occurred while attempting to save the service. Please try again later." 
Catalina.out also shows "[org.pac4j.cas.client.CasClient] - <AJAX request detected -> returning 401>" which I assume is some authorization error. I do have the user set to ROLE_ADMIN in the user.properties file though. Any idea what is wrong?

sesharaju sv

unread,
May 12, 2017, 7:04:56 AM5/12/17
to cas-...@apereo.org
i m sure i have looked at this error when i was installing the management app.
Please look into the properties file some where you have provide the
user ROLE defined

management.properties file :
=====================
cas.mgmt.adminRoles=ROLE_ADMIN
cas.mgmt.userPropertiesFile=file:/C:/Users/IBM_ADMIN/Documents/GitHub/cas-config/cas-config/users.properties

IF you look at the above properties (cas.mgmt.adminRoles) it says the
users who is having the ROLE_ADMIN should be able to access the pages.
so, please provide your addition roles which you use in your
environment.

users.properties file :
===============
casuser=notused,ROLE_ADMIN
user.0=admin,ROLE_ADMIN

This is how i was able to make it working please check the same and
let me know if you still have any issues.

Thanks
Seshu
> --
> - CAS gitter chatroom: https://gitter.im/apereo/cas
> - CAS mailing list guidelines:
> https://apereo.github.io/cas/Mailing-Lists.html
> - CAS documentation website: https://apereo.github.io/cas
> - CAS project website: https://github.com/apereo/cas
> ---
> You received this message because you are subscribed to the Google Groups
> "CAS Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cas-user+u...@apereo.org.
> To view this discussion on the web visit
> https://groups.google.com/a/apereo.org/d/msgid/cas-user/32c2ee87-f29a-4a27-a81d-acf66d449bad%40apereo.org.



--
Venkata S Sadhu (Seshu)
India (Mobile) : +91 7032638062 (WhatsApp)
INDIA
Message has been deleted

bobbintb

unread,
May 15, 2017, 1:17:53 PM5/15/17
to CAS Community
my management.properties file contains:

cas.mgmt.adminRoles=ROLE_ADMIN
cas.mgmt.userPropertiesFile=file:/etc/cas/config/users.properties

and my users.properties file:

username=password,ROLE_ADMIN

I verified the location is correct "/etc/cas/config/users.properties"
Using yours as an example I changed the users.properties to:

user.0=username,ROLE_ADMIN

But that won't even allow me to log into the webapp at all:

Access Denied
You are not authorized to access this resource. Contact your CAS administrator for more info.

bobbintb

unread,
May 15, 2017, 2:18:02 PM5/15/17
to CAS Community
I changed

username=password,ROLE_ADMIN

to

username=notused,ROLE_ADMIN

and it seems to work now.
Reply all
Reply to author
Forward
0 new messages