Building from Gradle on Heroku - where to change the cas properties ?

96 views
Skip to first unread message

Pol D.

unread,
Nov 12, 2019, 5:22:28 AM11/12/19
to cas-...@apereo.org
Hello,

I would like to publish on Heroku a CAS server with Proxy Callback authentication enabled (hosted here)

I used the branch heroku-caswebapp as starting point.

I modified the only service to allow proxy callback: https://github.com/drupol/cas/commit/96dbe05ac12f666fb0a3eeb1935dd046d288e469

Now I would also like to modify the cas server properties and I would like to enable some other properties like following:

cas.logout.followServiceRedirects=true
cas.logout.redirectParameter=service
cas.logout.confirmLogout=true
cas.slo.disabled=false

Could you please tell me where I should do that in that repository ?

I tried to do it gradle.properties, but it doesn't work (commit)

The goal of this is for developing a CAS bundle for Symfony 4, you can already test it here: https://psrcas-client.herokuapp.com/

Thanks.

  -φol Dellaiera-

  Communications without intelligence is noise;
  Intelligence without communications is irrelevant.
  [Alfred M. Gray]
Message has been deleted

Andy Ng

unread,
Nov 12, 2019, 10:32:39 PM11/12/19
to CAS Community, pol.de...@gmail.com
Hi,

I haven't tried Heroku so wasn't the most familar with the structure, but see the following:


CAS by default will attempt to locate settings and properties inside a given directory indicated under the setting name cas.standalone.configurationDirectory and otherwise falls back to using:

  1. /etc/cas/config
  2. /opt/cas/config
  3. /var/cas/config


You can put your config in the above directory (usually we put it in /etc/cas/config), and they will take effect. Note that those path are relative to the root of the system, so 
- config in "YOUR_APP/etc/cas/config" will not take effect
- Instead, config in "/etc/cas/config" will take effect 

Don't know how could heroku copy your config to /etc/cas/config, see if other can helps in regard to that.

See if the above info helps.

Cheers!
- Andy

Pol Dellaiera

unread,
Nov 13, 2019, 2:34:47 AM11/13/19
to CAS Community, pol.de...@gmail.com
Hi Andy,

Thanks for your reply, I already checked the documentation and I could not find anything that would work on Heroku because we need to place some files in specific directories which are not accessible on Heroku.

I see in the Procfile that some parameters are passed through the command line, do you know if there's a way to specify the configuration file there ?

Something like this:

java -jar build/libs/cas.war --config=/path/to/cas.properties

Thanks again!

Andy Ng

unread,
Nov 13, 2019, 3:57:14 AM11/13/19
to CAS Community, pol.de...@gmail.com
Hi,

Referring this here:

I am using this for my testing system, and I just checked it does work, and it can be consumed by CAS:

java -server -noverify -Xmx2048M -jar -Dcas.standalone.configurationDirectory=/mycasproperties cas.war ${ADDITIONAL_JAVA_PARAM}


And you should be able to see this message if cas properties is loaded:
2019-11-13 08:52:18,444 INFO [org.apereo.cas.configuration.DefaultCasConfigurationPropertiesSourceLocator] - <Configuration files found at [/mycasproperties] are [[file [/mycasproperties/cas.properties]]] under profile(s)

See if this would work...

Cheers!
- Andy



Anmol Budhewar

unread,
Nov 13, 2019, 4:14:47 AM11/13/19
to cas-...@apereo.org
Hello,
       Thank you for your response, currently I am using cas 5.1 in maven project. Not using the gradle can you help me in maven to connect the cas with
LDAP.

-Anmol

--
- 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/cee0bfd6-bf40-48ba-bda3-e7202e2a2d63%40apereo.org.

Pol Dellaiera

unread,
Nov 13, 2019, 4:17:36 AM11/13/19
to CAS Community
Hello Anmol,

Please use the proper thread for your question or create a new one.

Thanks.

On Wednesday, November 13, 2019 at 10:14:47 AM UTC+1, Anmol Budhewar wrote:
Hello,
       Thank you for your response, currently I am using cas 5.1 in maven project. Not using the gradle can you help me in maven to connect the cas with
LDAP.

-Anmol

On Wed, Nov 13, 2019 at 2:27 PM Andy Ng <lon...@gmail.com> wrote:
Hi,

Referring this here:

I am using this for my testing system, and I just checked it does work, and it can be consumed by CAS:

java -server -noverify -Xmx2048M -jar -Dcas.standalone.configurationDirectory=/mycasproperties cas.war ${ADDITIONAL_JAVA_PARAM}


And you should be able to see this message if cas properties is loaded:
2019-11-13 08:52:18,444 INFO [org.apereo.cas.configuration.DefaultCasConfigurationPropertiesSourceLocator] - <Configuration files found at [/mycasproperties] are [[file [/mycasproperties/cas.properties]]] under profile(s)

See if this would work...

Cheers!
- Andy



--
- 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-...@apereo.org.

Anmol Budhewar

unread,
Nov 13, 2019, 4:47:58 AM11/13/19
to cas-...@apereo.org
hello
I am attaching the cas.properties file screenshot and also a cas.properties file so I need to know how to connect
ldap with cas server. the version of cas is 5.1 which is in maven.
kindly check my mail please give me the any solution .

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/c4548ac7-9799-4fcf-af38-64dc2fd045a0%40apereo.org.
cas.properties
a222.png

Pol Dellaiera

unread,
Nov 13, 2019, 11:26:38 AM11/13/19
to CAS Community, pol.de...@gmail.com
Thanks Andy,

I finally managed to get it working thanks to you.

I also submitted a PR to improve the official branch that gets deployed on Heroku (https://github.com/apereo/cas/pull/4438/) but it has been rejected.

Then I created my own repository that gets deployed on Heroku, find it here: https://github.com/drupol/heroku-cas-server

Thanks again.
Reply all
Reply to author
Forward
0 new messages