Thanks for your replies,

I was not on the good branch, now I am :-). Following Dmitriy's
directions, I've modified application.properties to include :


spring.profiles.active=native
spring.cloud.config.server.native.searchLocations=file:///etc/chl/cas5/config

The properties file is read, but... json files continues to be read from
classpath instead of property set. My new cleaned-up cas.properties is now :

##
# CAS Server Host/Prefix
#
cas.server.name=https://id.ch-poitiers.fr
cas.server.prefix=${server.name}/cas

##
# CAS Configuration Cloud Amqp Bus
#
spring.cloud.bus.enabled=false
spring.cloud.bus.refresh.enabled=true
spring.cloud.bus.env.enabled=true
spring.cloud.bus.destination=CasCloudBus
spring.cloud.bus.ack.enabled=true
# spring.activemq.broker-url=
# spring.activemq.in-memory=
# spring.activemq.pooled=
# spring.activemq.user=
# spring.activemq.password=

cas.serviceRegistry.config.location=file:///etc/chl/cas5/services

>From log file :

2016-08-08 17:44:16,483 INFO
[org.apereo.cas.services.AbstractResourceBasedServiceRegistryDao] -
<Watching service registry directory at
/var/tomcat/inst2/webapps/cas/WEB-INF/classes/services>

is cas.serviceRegistry.config.location the right property ? (taken from
v5 template)

Regards.




Le 08/08/2016 à 17:02, Misagh Moayyed a écrit :
> Simply put, you should be following the docs here:
> https://github.com/apereo/cas-overlay-template/tree/5.0
>
> There is no “propertyFileConfigurer.xml”.
> Using “deployerConfigContext.xml” is also useless for most if not all
> cases. 
>
> -- 
> Misagh
>
> From: Philippe MARASSE <[email protected]>
> <mailto:[email protected]>
> Reply: Philippe MARASSE <[email protected]>
> <mailto:[email protected]>
> Date: August 8, 2016 at 7:42:47 AM
> To: [email protected] <[email protected]> <mailto:[email protected]>
> Subject: [cas-user] CAS 5 does not read cas.properties file
>
>> Folks,
>>
>> I'm preparing a new CAS service for our organisation (we use CAS 3.5
>> for years now :-) ), my plan is to upgrade to v5 in order to use MFA.
>>
>> I'm using maven overlay (from
>> https://apereo.github.io/cas/development/installation/Maven-Overlay-Installation.html
>> )
>> and json service registry
>>
>> Unfortunately, I did not manage to make cas read my customized
>> properties.
>>
>> 1st try : cas/WEB-INF/spring-configuration/propertyFileConfigurer.xml
>> is not read
>>
>> verified with iwatch tool.
>>
>> 2nd try : moved this file as WEB-INF/deployerConfigContext.xml (the
>> packaged one is empty), this file get read but catalina.out shows :
>>
>> 08-Aug-2016 15:29:35.339 INFO [localhost-startStop-1]
>> org.apache.catalina.startup.HostConfig.deployWAR Déploiement de
>> l'archive /var/tomcat/inst2/webapps/cas.war de l'application web
>> 08-Aug-2016 15:29:41.429 INFO [localhost-startStop-1]
>> org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was
>> scanned for TLDs yet contained no TLDs. Enable debug logging for this
>> logger for a complete list of JARs that were scanned but no TLDs were
>> found in them. Skipping unneeded JARs during scanning can improve
>> startup time and JSP compilation time.
>>
>>
>>   __  ____     _     ____  __
>>  / / / ___|   / \   / ___| \ \
>> | | | |      / _ \  \___ \  | |
>> | | | |___  / ___ \  ___) | | |
>> | |  \____|/_/   \_\|____/  | |
>>  \_\                       /_/
>>
>> CAS Version: 5.0.0.RC1-SNAPSHOT
>> Build Date/Time: 2016-08-08T07:37:10Z
>> Java Home: /usr/java/jdk1.8.0_101/jre
>> Java Vendor: Oracle Corporation
>> Java Version: 1.8.0_101
>> OS Architecture: i386
>> OS Name: Linux
>> OS Version: 3.16.0-4-686-pae
>>
>>
>> 2016-08-08 15:29:45,485 INFO
>> [org.apereo.cas.web.CasWebApplicationServletInitializer] - <The
>> following profiles are active: native>
>> 2016-08-08 15:29:49,005 WARN
>> [org.springframework.context.annotation.ConfigurationClassPostProcessor]
>> - <Cannot enhance @Configuration bean definition 'refreshScope' since
>> its singleton instance has been created too early. The typical cause
>> is a non-static @Bean method with a
>> BeanDefinitionRegistryPostProcessor return type: Consider declaring
>> such methods as 'static'.>
>> *2016-08-08 15:29:49,393 WARN
>> [org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor]
>> - <Multiple PropertySourcesPlaceholderConfigurer beans registered
>> [placeHolderConfigurer,
>> org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0],
>> falling back to Environment>*
>> 2016-08-08 15:29:51,702 INFO
>> [org.apereo.cas.services.AbstractResourceBasedServiceRegistryDao] -
>> <Watching service registry directory at
>> /var/tomcat/inst2/webapps/cas/WEB-INF/classes/services>
>> 2016-08-08 15:29:51,952 INFO
>> [org.apereo.cas.services.DefaultServicesManagerImpl] - <Loaded 2
>> services from JsonServiceRegistryDao.>
>> 2016-08-08 15:29:58,240 WARN
>> [org.apereo.cas.WebflowConversationStateCipherExecutor] - <Secret key
>> for signing is not defined. CAS will attempt to auto-generate the
>> signing key>
>> 2016-08-08 15:29:58,247 WARN
>> [org.apereo.cas.WebflowConversationStateCipherExecutor] - <Generated
>> signing key
>> UfOXj8N0pNAX6QJQHL4ewu_cvlTAHo6abg0NqUhf7y-vlOT_brv2Eq9sDspXBir1bGXZMME9FaX0II1Jd0CB0g
>> of size 512. The generated key MUST be added to CAS settings.>
>> 2016-08-08 15:29:58,247 WARN
>> [org.apereo.cas.WebflowConversationStateCipherExecutor] - <No
>> encryption key is defined. CAS will attempt to auto-generate keys>
>> 2016-08-08 15:29:58,248 WARN
>> [org.apereo.cas.WebflowConversationStateCipherExecutor] - <Generated
>> encryption key KgExTpQBSNYWtAxn of size 16. The generated key MUST be
>> added to CAS settings.>
>> 2016-08-08 15:30:05,729 INFO
>> [org.apereo.cas.configuration.CasConfigurationRebinder] - <Reloading
>> CAS configuration via
>> cas-org.apereo.cas.configuration.CasConfigurationProperties>
>> 2016-08-08 15:30:05,876 INFO
>> [org.apereo.cas.configuration.CasConfigurationRebinder] - <Reloaded
>> CAS configuration
>> cas-org.apereo.cas.configuration.CasConfigurationProperties>
>> 2016-08-08 15:30:08,132 WARN
>> [org.apereo.cas.util.TicketGrantingCookieCipherExecutor] - <Secret
>> key for encryption is not defined. CAS will attempt to auto-generate
>> the encryption key>
>> 2016-08-08 15:30:08,133 WARN
>> [org.apereo.cas.util.TicketGrantingCookieCipherExecutor] - <Generated
>> encryption key JN9SKOR9JI8cvJs6u7HfICuE24qxfHgzsZ6APedCV2w of size
>> 256. The generated key MUST be added to CAS settings.>
>> 2016-08-08 15:30:08,133 WARN
>> [org.apereo.cas.util.TicketGrantingCookieCipherExecutor] - <Secret
>> key for signing is not defined. CAS will attempt to auto-generate the
>> signing key>
>> 2016-08-08 15:30:08,133 WARN
>> [org.apereo.cas.util.TicketGrantingCookieCipherExecutor] - <Generated
>> signing key
>> O9OEbsskQwZCAn0LgbEIUhMa7LwrLJoaSizSS6upqfBG0AowkzxrYudB-r_e5avpvuTf4ekCcr3iwxXw4cR_ZQ
>> of size 512. The generated key MUST be added to CAS settings.>
>> 2016-08-08 15:30:08,581 INFO
>> [org.apereo.cas.configuration.support.Beans] - <Ticket registry
>> encryption/signing is turned off. This may NOT be safe in a clustered
>> production environment. Consider using other choices to handle
>> encryption, signing and verification of ticket registry tickets.>
>> 2016-08-08 15:30:08,647 INFO
>> [org.apereo.cas.web.CasWebApplicationServletInitializer] - <Started
>> CasWebApplicationServletInitializer in 26.485 seconds (JVM running
>> for 34.81)>
>>
>> my cas.properties contains these customizations (from maven overlay
>> template) :
>>
>> tgc.encryption.key=ppL7OCfnABdvhjzCz3z1b7xsngqBTnBBWBsthw_wC7E
>> tgc.signing.key=JVKEUrcfz0j76Dh6gzyQBuKkSIJpVpFzAflfWcL9DclY4N66kddjT0zFJ35RgbfC6yCWd5DLKmco70zTbKPhfg
>> tgc.secure=true
>>
>> service.registry.config.location=/etc/chl/cas5/services
>>
>> and cas.properties is never read... (json services read from
>> classpath instead of my location, keys generated instead of
>> configured ones)
>>
>> What am I doing wrong ??
>>
>> relevant portion of my pom.xml :
>>
>> <properties>
>>         <!-- Propriétés du projet -->
>>        
>> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>>         <java.source.version>1.8</java.source.version>
>>         <java.target.version>1.8</java.target.version>
>> ...
>>         <!-- Version de CAS support -->
>>         <cas.groupId>org.apereo.cas</cas.groupId>
>>         <cas.version>5.0.0.RC1-SNAPSHOT</cas.version>
>> </properties>
>>
>> ...
>>     <dependencies>
>>         ...
>>         <dependency>
>>             <groupId>${cas.groupId}</groupId>
>>             <artifactId>cas-server-webapp</artifactId>
>>             <version>${cas.version}</version>
>>             <type>war</type>
>>             <scope>runtime</scope>
>>         </dependency>
>>
>>         <!-- Authentification -->
>>         <dependency>
>>             <groupId>${cas.groupId}</groupId>
>>             <artifactId>cas-server-support-spnego</artifactId>
>>             <version>${cas.version}</version>
>>             <scope>runtime</scope>
>>         </dependency>
>>         <dependency>
>>             <groupId>${cas.groupId}</groupId>
>>             <artifactId>cas-server-support-spnego-webflow</artifactId>
>>             <version>${cas.version}</version>
>>             <scope>runtime</scope>
>>         </dependency>
>>         <dependency>
>>             <groupId>${cas.groupId}</groupId>
>>            
>> <artifactId>cas-server-support-json-service-registry</artifactId>
>>             <version>${cas.version}</version>
>>         </dependency>
>>     </dependencies>
>>
>> Regards.
>>
>> --  
>> Philippe MARASSE
>>
>> Responsable pôle Infrastructures - DSIO
>> Centre Hospitalier Henri Laborit
>> CS 10587 - 370 avenue Jacques Cœur  
>> 86021 Poitiers Cedex
>> Tel : 05.49.44.57.19
>> --
>> 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 [email protected]
>> <mailto:[email protected]>.
>> To post to this group, send email to [email protected]
>> <mailto:[email protected]>.
>> Visit this group at
>> https://groups.google.com/a/apereo.org/group/cas-user/.
>> To view this discussion on the web visit
>> https://groups.google.com/a/apereo.org/d/msgid/cas-user/8a4abe26-6887-caad-333c-fb578208c169%40ch-poitiers.fr
>> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/8a4abe26-6887-caad-333c-fb578208c169%40ch-poitiers.fr?utm_medium=email&utm_source=footer>.
>> For more options, visit https://groups.google.com/a/apereo.org/d/optout.
> -- 
> 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 [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at
> https://groups.google.com/a/apereo.org/group/cas-user/.
> To view this discussion on the web visit
> https://groups.google.com/a/apereo.org/d/msgid/cas-user/etPan.57a89f0b.7fb6ac3c.2c03%40unicon.net
> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/etPan.57a89f0b.7fb6ac3c.2c03%40unicon.net?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/a/apereo.org/d/optout.

-- 
Philippe MARASSE

Responsable pôle Infrastructures - DSIO
Centre Hospitalier Henri Laborit
CS 10587 - 370 avenue Jacques Cœur 
86021 Poitiers Cedex
Tel : 05.49.44.57.19

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/b8797f30-2857-d72e-33d8-733118606e4a%40ch-poitiers.fr.
For more options, visit https://groups.google.com/a/apereo.org/d/optout.

Reply via email to