Hi everyone,
The issue with the configs seem to appear when we "seperate" the 
cas.authn.pac4j.saml[0] configs in different config files

For example all the configs of the type cas.authn.pac4j.saml[0]  that we 
use in cas are the below:
cas.authn.pac4j.saml[0].keystorePassword=pac4j-demo-passwd
cas.authn.pac4j.saml[0].privateKeyPassword=pac4j-demo-passwd
cas.authn.pac4j.saml[0].serviceProviderEntityId=urn:mace:saml:pac4j.org
cas.authn.pac4j.saml[0].serviceProviderMetadataPath=/etc/cas/config/sp-metadata.xml
cas.authn.pac4j.saml[0].keystorePath=/etc/cas/config/samlKeystore.jks
cas.authn.pac4j.saml[0].identityProviderMetadataPath=https://blablabla
cas.authn.pac4j.saml[0].clientName=SAML2Client

When we set up e.g. cas.authn.pac4j.saml[0].identityProviderMetadataPath in 
the file conf/cas_custom.properties and all the rest in the file 
conf/cas_base.properties, then the login does not work correctly.
However, when we set up ALL the used cas.authn.pac4j.saml[0]  configs in 
the config file (either cas_custom.properties or/and cas_base.properties) 
then the login is working as expected.
So it looks like those kind of configs need to be read from the same file 
all together, else if they are read partially from different files, 
something is not working as expected.
I am not sure if this kind of issue can happen in different config types as 
well.

Thanks,
Ria


On Friday, December 2, 2022 at 11:50:09 AM UTC+2 Freedom K wrote:

> Thank you Ray. 
> I will try it (in thelog4j2.xml?) and see if more information will be 
> visible.
> If this is a spring config issue, can we use a bigger version of spring 
> for the cas version 5.2.9?
> I see that the versions in the pom.xml is 
>         <springboot.version>1.5.14.RELEASE</springboot.version>
>         <spring.version>4.3.17.RELEASE</spring.version>
>
> On Thursday, December 1, 2022 at 6:42:36 PM UTC+2 Ray Bon wrote:
>
>> Ria
>>
>> This sounds more like a spring config issue than a cas one.
>> This logger may provide some details:
>>
>> <AsyncLogger name="org.apereo.cas.config" level="debug" />
>>
>> Ray
>>
>> On Thu, 2022-12-01 at 07:10 -0800, Freedom K wrote:
>>
>> Notice: This message was sent from outside the University of Victoria 
>> email system. Please be cautious with links and sensitive information.
>>
>>
>> Hi everyone,
>>
>> I am facing an issue when trying to create a config file hierarchy for 
>> cas.
>>
>> I am using something like the below arguments in the run line of cas
>>
>> --spring.config.location=conf/cas_base.properties,conf/cas_custom.properties
>>
>> so as to be able to have some hierarchy of configs based on some 
>> environment specific preferences.
>>
>> I have noticed that if I set for example 
>> logging.level.org.apereo.cas=DEBUG in the file cas_base.properties and no 
>> logging.level.org.apereo.cas is set to cas_custom.properties, it is read 
>> from cas and I can see the logs in debug mode, as expected.
>>
>> However, if I set cas.authn.pac4j.saml[0].clientName in 
>> cas_base.properties and not in cas_custom.properties, then the app does not 
>> read it and I cannot get redirected to the identity provider I wish (OKTA).
>>
>> Is there any differences between the different type of configs that 
>> prevents them from being able to work with a hierarchy type of config file 
>> reading?
>>
>> The CAS version I am using is 5.2.9
>>
>> Thanks,
>> Ria
>>
>>
>>
>>

-- 
- 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/d68acdb1-ae26-4f78-bd57-e5c6d967efcdn%40apereo.org.

Reply via email to