Access Strategy not working???

17 views
Skip to first unread message

Tim Tyler

unread,
Feb 23, 2018, 10:35:38ā€ÆAM2/23/18
to cas-...@apereo.org

CAS users,

Ā  Ok, I am on CAS 5.2 on Redhat 7.Ā 

Ā 

I have created a number of services stored in json files in /etc/cas/services.Ā Ā  But I donā€™t think any of them are getting read by CAS. Ā Ā The CAS-Management creates them and puts them there.Ā  But I am not sure CAS is reading them there.Ā  My goal was to create a service for one of our Moodle development servers where only staff could access it, not students.Ā  I simply added an ldap attribute which contains the value of Staff.Ā  CAS-Management seems to create it properly.Ā Ā  But CAS ignores it.

Ā 

Instead I get the following results from the CAS Dashboard from the ā€œAttribute Releaseā€ interface (see picture below):Ā  The result is https|imap which I never created a service for.Ā  I had to hunt for where this was coming from and found it in /usr/local/cas/target/cas/WEB-INF/classes/services/HTTPSandIMAPS-10000001.json

Ā 

I tried removing it but it restored itself when I restarted the server.Ā  I donā€™t understand what is going on here.Ā  I have the following setting in cas:

cas.serviceRegistry.config.location: file:/etc/cas/services

Ā 

So why is CAS finding json services from /usr/local/cas/target/cas/WEB-INF/classes/services instead of /etc/cas/servicesĀ  {or at least the dashboard anyways}? Ā Ā Shouldnā€™t the ā€œcas.serviceRegistry.config.location: entry be pointing in to /etc/cas/servicesā€???Ā  I think I got this from the documentation.

Ā 

In case this helps, this is in the DevMoodle service registration json file:

@class: org.apereo.cas.services.RegexRegisteredService

Ā  serviceId: https://devmoodle.beloit.edu.*

Ā  name: Dev Moodle

Ā  id: 1519398393836Ā Ā 

ā€¦..and much more

Ā 

Ā 

Ā 

Ā 

Tim Tyler

Network Engineer

Beloit College

Ā 

Travis Schmidt

unread,
Feb 23, 2018, 11:11:11ā€ÆAM2/23/18
to cas-...@apereo.org
The property was changed in 5.2 to cas.serviceRegistry.json.location.Ā  5.2 currently ignores unknown properties and falls back to default on this.Ā  I got bit by this on a deployment two weeks ago.Ā  Also the property names for webflow and tgc encryption were changed, so check those as well.



--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
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/03d58f91ff6f2a6b1fc06d57f6946e3b%40mail.gmail.com.

Tim Tyler

unread,
Feb 23, 2018, 12:51:06ā€ÆPM2/23/18
to cas-...@apereo.org

Travis,

Thanks! I think that worked.Ā  That is what I get for reading older documentation.Ā  I really wish bad lines would not be ignored.Ā  Makes me wonder what else I have entered might not be doing anything.Ā 

Tim

Travis Schmidt

unread,
Feb 23, 2018, 12:57:43ā€ÆPM2/23/18
to cas-...@apereo.org
The next CAS release has been changed to no longer ignore unknown fields.

Tom Poage

unread,
Feb 23, 2018, 1:43:21ā€ÆPM2/23/18
to cas-...@apereo.org

I was going to ask about this: Apereo/Unicon, do you have a policy on what/when ā€œbreakingā€ changes are allowed between different versions?

Ā 

E.g. https://semver.org/

Ā 

In addition to the registry location property change, I think we were also bit by a change from JSON to HJSON somewhere back there in a point release.

Ā 

Thanks!

Tom.

Ā 

From: <cas-...@apereo.org> on behalf of Travis Schmidt <travis....@gmail.com>
Reply-To: "cas-...@apereo.org" <cas-...@apereo.org>
Date: Friday, February 23, 2018 at 8:11 AM
To: "cas-...@apereo.org" <cas-...@apereo.org>
Subject: Re: [cas-user] Access Strategy not working???

Ā 

On Fri, Feb 23, 2018 at 7:35 AM Tim Tyler <ty...@beloit.edu> wrote:

CAS users,

Ā  Ok, I am on CAS 5.2 on Redhat 7.Ā 

Ā 

I have created a number of services stored in json files in /etc/cas/services.Ā Ā  But I donā€™t think any of them are getting read by CAS. Ā Ā The CAS-Management creates them and puts them there.Ā  But I am not sure CAS is reading them there.Ā  My goal was to create a service for one of our Moodle development servers where only staff could access it, not students.Ā  I simply added an ldap attribute which contains the value of Staff.Ā  CAS-Management seems to create it properly.Ā Ā  But CAS ignores it.

Ā 

Instead I get the following results from the CAS Dashboard from the ā€œAttribute Releaseā€ interface (see picture below):Ā  The result is https|imap which I never created a service for.Ā  I had to hunt for where this was coming from and found it in /usr/local/cas/target/cas/WEB-INF/classes/services/HTTPSandIMAPS-10000001.json

Ā 

I tried removing it but it restored itself when I restarted the server.Ā  I donā€™t understand what is going on here.Ā  I have the following setting in cas:

cas.serviceRegistry.config.location: file:/etc/cas/services

Ā 

So why is CAS finding json services from /usr/local/cas/target/cas/WEB-INF/classes/services instead of /etc/cas/servicesĀ  {or at least the dashboard anyways}? Ā Ā Shouldnā€™t the ā€œcas.serviceRegistry.config.location: entry be pointing in to /etc/cas/servicesā€???Ā  I think I got this from the documentation.

Ā 

In case this helps, this is in the DevMoodle service registration json file:

@class: org.apereo.cas.services.RegexRegisteredService

Ā  serviceId: https://devmoodle.beloit.edu.*

Ā  name: Dev Moodle

Ā  id: 1519398393836Ā Ā 

ā€¦..and much more

Ā 

Ā 

cid:image001.png@01D3AC87.FB4AC4A0

Ā 

Ā 

Tim Tyler

Network Engineer

Beloit College

Ā 

--
- Website:
https://apereo.github.io/cas
- Gitter Chatroom:
https://gitter.im/apereo/cas
- List Guidelines:
https://goo.gl/1VRrw7
- Contributions:
https://goo.gl/mh7qDG
---
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/03d58f91ff6f2a6b1fc06d57f6946e3b%40mail.gmail.com.

--
- Website:
https://apereo.github.io/cas
- Gitter Chatroom:
https://gitter.im/apereo/cas
- List Guidelines:
https://goo.gl/1VRrw7
- Contributions:
https://goo.gl/mh7qDG
---
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

Reply all
Reply to author
Forward
0 new messages