cas-management 6.1 RC4 turn off version control

192 views
Skip to first unread message

Ray Bon

unread,
Sep 17, 2019, 12:43:03 PM9/17/19
to cas-...@apereo.org
How do I turn off version control in cas-management 6.1 RC4.

In 5.3.x branch there was a config setting: mgmt.enableVersionControl=true, but this has been replaced by the following code (line 155 in https://github.com/apereo/cas-management/blob/master/api/cas-mgmt-api-configuration/src/main/java/org/apereo/cas/configuration/CasManagementConfigurationProperties.java):
private boolean enabled = ClassUtils.isPresent("org.apereo.cas.mgmt.config.CasManagementVersionControlConfiguration",
this.getClass().getClassLoader());

It looks like org.apereo.cas.mgmt.config.CasManagementVersionControlConfiguration is included by default (the libraries are in the war). All I have/want is ldap service registry (compile "org.apereo.cas:cas-server-support-ldap-service-registry:${project.'casmgmt.version'}") but it is being ignored.

Thanks
Ray

-- 
Ray Bon
Programmer Analyst
Development Services, University Systems

I respectfully acknowledge that my place of work is located within the ancestral, traditional and unceded territory of the Songhees, Esquimalt and WSÁNEĆ Nations.

mba...@scad.edu

unread,
Sep 17, 2019, 12:54:56 PM9/17/19
to CAS Community

I would like to know that too. 

Thanks,
Mike


Michael Barsic
Director of Technical Architecture
Savannah College of Art and Design®
mba...@scad.edu - www.scad.edu

randomuser878

unread,
Oct 25, 2019, 9:55:01 AM10/25/19
to CAS Community
Hello

  Thanks for the hint per CasManagementConfigurationProperties.java
  Have been really struggling with this one as well.  Really feel cas-management is behind cas and sure hope the recent indicators of moving dashboards from cas to cas-management means better product eventually.

  Ranting aside, cas-management 6.1 RC4, these two flags end up as non-bound and service will fail/crash to restart.
   mgmt.enableVersionControl=false
   mgmt.enableDelegatedMgmt=false

  Overlaying this file src/main/java/org/apereo/cas/configuration/CasManagementConfigurationProperties.java by setting the two references you alluded to false it will compile but then on restart it will throw tons of errors about ALL mgmt parameters being unbound.  If you can figure out what I could have missed by just modifying that code directly that would be great.
  Added this to build.gradle
    compile "org.apereo.cas:cas-mgmt-api-core:${project.'casmgmt.version'}"
    compile "org.projectlombok:lombok:1.18.8"

  Then tried the 6.1. RC5 snapshot, maybe those two parameters that are in documentation would work but nope, it would crash per  some collusion about groovy libraries and such, anyway gave up on that front, it is snapshot after all.

  HERE is what currently WORKS for me (not sure if it breaks anything else but I am past the point of desperation)
  1) deploy cas-management.war and explode into webapps (remove war afterwards) 
  rm -v $CATALINA_BASE/webapps/cas-management/WEB-INF/lib/cas-mgmt-config-version-control-6.1.0-RC4.jar
  rm -v $CATALINA_BASE/webapps/cas-management/WEB-INF/lib/cas-mgmt-config-delegated-6.1.0-RC4.jar


  Now here are other gems
  1) using JPA so would really like to tell JSON to take a back-seat.
     cas.serviceRegistry.initFromJson=false
   YET it loads from services default or whatever you specify including commenting out or leaving default or whatever:  cas.serviceRegistry.json.location=classpath:/services
   Implicit PROBLEM for me: when you create new service you see double entries. One for JPA, the other one for json. Which is which?
   Workaround: 
    1) do not specify at all cas.serviceRegistry.json.location in config (not sure it matters)
    2) same as above post explode cas-management.war (not sure how can I remove them from overlay, I could just try empty files in overlay but removing is cleaner)
       rm -v $CATALINA_BASE/webapps/cas-management/WEB-INF/classes/services/*.json

   Another headache: I want to have search work for me. Why can't I change the path of luceneIndexDir. (no parameter, nor can change and compile above without other failures)
   So must create folder /etc/cas/lucene even though for this scenario it is just a placeholder, so I can get search working. I never see anything get stored there?

   And finally,  really no idea why but if you logout the manager with a success message at /cas-management/logout.html, 
      throws an exception 500 in access logs like "GET /cas-management/error?ticket=ST-XYZ...  but you click on "Services Management" link to get you back to /cas-management/manage.html and then cas-management is unavailable.
     WORKAROUND: just change URL to /cas-management/ and voila you are back to admin

  Stuff like this, I really really hope cas-management gets its love back.  Not gonna bother with discoveryEndpointPath = "/actuator/discoveryProfile" and how to actually properly securely setup magical setting in CAS separate service itself to that cas-management can get info. Tried but at this point I am happy to just use the web app. 

  All the best.


  

On Tuesday, September 17, 2019 at 12:43:03 PM UTC-4, rbon wrote:

Travis Schmidt

unread,
Oct 25, 2019, 11:20:47 AM10/25/19
to CAS Community
Admittedly the CAS Mgmt documentation is lagging some of the latest refactors in the snapshots.  I usually try and make an effort when GA rolls around to try and make sure at least config properties are updated.  You can look here directly at the source of truth:


The property name would just follow object "." notation starting with "mgmt."

You can specify a luceneIndexDir and I think it only uses this directory as temp storage when executing queries, so I think it is always cleaned up.  Anyways Lucene needed some file system dir configured.

If you are using version control then you will always see a JSONServiceRegistry popup in the logs, since JSON files in a Git repository is how that is implemented, regardless of the persistence you use for your configured service registry.

Not sure what the logout thing is.

For the /dashboard and discovery endpoint, I have it configured and about the only way I know it would work is to open up the admin endpoints by IP address to the IP of your running CAS Management webapp.  Documentation can be found here:


I do not personally use the gradle overlays or even do any real testing with them.  It has turned out in the past that the overlay was picking up conflicting config from cas in the overlay that wasn't realized when just building and deploying from source.

Lastly, I do believe some resources may be picking up the cause of CAS Mgmt, and I may have some more time for the OS version freeing up soon, at least will try and smooth out some rough edges for GA.  As always pull requests are welcomed and encouraged.

Travis






--
- 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/9acf720f-b81f-4b5d-a85f-cd3930fee1c4%40apereo.org.

Ray Bon

unread,
Oct 25, 2019, 2:19:21 PM10/25/19
to cas-...@apereo.org
I tried building from source to add more debugging, but was unable to build without error. If I fixed one error, then another popped up. I do not have time to chase them down.
I will come back to it, perhaps in the new year. Until then we will use an older version.

Ray

JC

unread,
Mar 26, 2020, 2:02:19 PM3/26/20
to CAS Community
I know this topic is five months old, but I wanted to add what I discovered so that it will be here if someone else finds this in a search, like I did.

I have found that the documentation that shows the two properties' syntax referenced is wrong, unsurprisingly. The values that worked for me in the 6.1.5 management web app are:

mgmt.versionControl.enabled=false
mgmt.delegated.enabled=false

However, even with version control disabled, the management app still wants to put stuff in '/etc/cas/services-repo'. The following property changes that:

mgmt.versionControl.servicesRepo=file:/path/to/services

Now the management app saves new services in the directory I want, but doesn't show existing services. This whole version control thing is a real pain.

J

Jonathon Taylor

unread,
Jun 18, 2020, 7:02:41 PM6/18/20
to CAS Community
Sorry to also chime in on an old thread but I've just been trying to upgrade to the latest cas-management overlay today and ran into similar issues.

For the issue where existing services weren't showing up it might be incorrect permissions on the git repo that is automatically generated in the mgmt.versionControl.servicesRepo path.  If I recall several items under .git had bad permission preventing the tomcat service from reading the repo (e.g. .git/index, .git/config) and a chown tomcat: -R .git fixed it after a service restart.

randomuser878

unread,
Jun 23, 2020, 4:55:14 PM6/23/20
to CAS Community
Hello

  Using master of cas-management release.
  So far with all those changes noted by JC and parameters and permissions, I just add this when exploding war on the webapps folder
rm -v "SOME_PATH/cas-management/WEB-INF/lib/cas-mgmt-config-version-control-${VERSION}.jar"
rm -v "SOME_PATH/cas-management/WEB-INF/lib/cas-mgmt-config-delegated-${VERSION}.jar"

Otherwise it also simply would not work for me. 

Also hoping cas-management will be compatible (have not tried yet) with cas-6.2 since cas 6.1 will reach EOL in October or such?

B.


On Tuesday, September 17, 2019 at 12:43:03 PM UTC-4, rbon wrote:
Reply all
Reply to author
Forward
0 new messages