Hi,

I send you my log4j2.xml (see attached file).

This is the log "cas.log":

[32m2021-10-23 16:36:03,832 INFO 
[org.apereo.cas.services.AbstractServicesManager] - <Loaded [1] service(s) 
from [JsonServiceRegistry].>
[32m2021-10-23 16:36:12,135 INFO 
[org.apereo.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit 
trail record BEGIN
=============================================================
WHO: audit:unknown
WHAT: {result=Service Access Granted, requiredAttributes={}}
ACTION: SERVICE_ACCESS_ENFORCEMENT_TRIGGERED
APPLICATION: CAS
WHEN: Sat Oct 23 16:36:12 CEST 2021
CLIENT IP ADDRESS: XXX.XXX.XXX.XXX
SERVER IP ADDRESS: XXX.XXX.XXX.XXX
=============================================================

>
[36m2021-10-23 16:36:12,294 DEBUG 
[org.apereo.cas.web.flow.login.InitialFlowSetupAction] - <Setting path for 
cookies for warn cookie generator to: [/cas/]>
[36m2021-10-23 16:36:12,294 DEBUG 
[org.apereo.cas.web.flow.login.InitialFlowSetupAction] - <Setting path for 
cookies for TGC cookie generator to: [/cas/]>
[36m2021-10-23 16:36:12,301 DEBUG 
[org.apereo.cas.web.flow.login.InitialFlowSetupAction] - <Placing service 
in context scope: [https://XXXXXXXXX.com:8443/cas-sample/]>
[36m2021-10-23 16:36:12,301 DEBUG 
[org.apereo.cas.web.flow.login.InitialFlowSetupAction] - <Placing 
registered service [^(https|imaps)://.*] with id [10001] in context scope>
[36m2021-10-23 16:36:12,321 DEBUG 
[org.apereo.cas.web.flow.authentication.RegisteredServiceAuthenticationPolicySingleSignOnParticipationStrategy]
 
- <Evaluating authentication policy 
[DefaultRegisteredServiceAuthenticationPolicy(requiredAuthenticationHandlers=[],
 
excludedAuthenticationHandlers=[], 
criteria=AnyAuthenticationHandlerRegisteredServiceAuthenticationPolicyCriteria(tryAll=false))]
 
for [test]>
[36m2021-10-23 16:36:12,330 DEBUG 
[org.apereo.cas.web.flow.resolver.impl.AbstractCasWebflowEventResolver] - 
<Resolved single event [success] via 
[org.apereo.cas.web.flow.resolver.impl.RankedMultifactorAuthenticationProviderWebflowEventResolver]
 
for this context>
[32m2021-10-23 16:36:12,331 INFO 
[org.apereo.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit 
trail record BEGIN
=============================================================
WHO: audit:unknown
WHAT: {source=RankedMultifactorAuthenticationProviderWebflowEventResolver, 
event=success, timestamp=Sat Oct 23 16:36:12 CEST 2021}
ACTION: AUTHENTICATION_EVENT_TRIGGERED
APPLICATION: CAS
WHEN: Sat Oct 23 16:36:12 CEST 2021
CLIENT IP ADDRESS: XXX.XXX.XXX.XXX
SERVER IP ADDRESS: XXX.XXX.XXX.XXX
=============================================================

>
[36m2021-10-23 16:36:14,221 DEBUG 
[org.apereo.cas.web.view.CasReloadableMessageBundle] - <No properties file 
found for [file:/etc/cas/config/custom_messages_es_ES] - neither plain 
properties nor XML>
[36m2021-10-23 16:36:14,222 DEBUG 
[org.apereo.cas.web.view.CasReloadableMessageBundle] - <No properties file 
found for [classpath:custom_messages_es_ES] - neither plain properties nor 
XML>
[36m2021-10-23 16:36:14,223 DEBUG 
[org.apereo.cas.web.view.CasReloadableMessageBundle] - <No properties file 
found for [classpath:messages_es_ES] - neither plain properties nor XML>
[36m2021-10-23 16:36:14,224 DEBUG 
[org.apereo.cas.web.view.CasReloadableMessageBundle] - <No properties file 
found for [file:/etc/cas/config/custom_messages_es] - neither plain 
properties nor XML>
[36m2021-10-23 16:36:14,224 DEBUG 
[org.apereo.cas.web.view.CasReloadableMessageBundle] - <No properties file 
found for [file:/etc/cas/config/custom_messages] - neither plain properties 
nor XML>
[36m2021-10-23 16:36:14,224 DEBUG 
[org.apereo.cas.web.view.CasReloadableMessageBundle] - <No properties file 
found for [classpath:custom_messages_es] - neither plain properties nor XML>
[36m2021-10-23 16:36:14,225 DEBUG 
[org.apereo.cas.web.view.CasReloadableMessageBundle] - <No properties file 
found for [classpath:custom_messages] - neither plain properties nor XML>
[36m2021-10-23 16:36:14,226 DEBUG 
[org.apereo.cas.web.view.CasReloadableMessageBundle] - <Loading properties 
[messages_es.properties] with encoding 'UTF-8'>
[36m2021-10-23 16:36:14,231 DEBUG 
[org.apereo.cas.web.view.CasReloadableMessageBundle] - <Loading properties 
[messages.properties] with encoding 'UTF-8'>
[32m2021-10-23 16:36:29,202 INFO 
[org.apereo.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit 
trail record BEGIN
=============================================================
WHO: audit:unknown
WHAT: {result=Service Access Granted, requiredAttributes={}}
ACTION: SERVICE_ACCESS_ENFORCEMENT_TRIGGERED
APPLICATION: CAS
WHEN: Sat Oct 23 16:36:29 CEST 2021
CLIENT IP ADDRESS: XXX.XXX.XXX.XXX
SERVER IP ADDRESS: XXX.XXX.XXX.XXX
=============================================================

>
[36m2021-10-23 16:36:29,204 DEBUG 
[org.apereo.cas.web.flow.login.InitialFlowSetupAction] - <Placing service 
in context scope: [https://XXXXXXXXX.com:8443/cas-sample/]>
[36m2021-10-23 16:36:29,205 DEBUG 
[org.apereo.cas.web.flow.login.InitialFlowSetupAction] - <Placing 
registered service [^(https|imaps)://.*] with id [10001] in context scope>
[36m2021-10-23 16:36:29,205 DEBUG 
[org.apereo.cas.web.flow.authentication.RegisteredServiceAuthenticationPolicySingleSignOnParticipationStrategy]
 
- <Evaluating authentication policy 
[DefaultRegisteredServiceAuthenticationPolicy(requiredAuthenticationHandlers=[],
 
excludedAuthenticationHandlers=[], 
criteria=AnyAuthenticationHandlerRegisteredServiceAuthenticationPolicyCriteria(tryAll=false))]
 
for [test]>
[36m2021-10-23 16:36:29,206 DEBUG 
[org.apereo.cas.web.flow.resolver.impl.AbstractCasWebflowEventResolver] - 
<Resolved single event [success] via 
[org.apereo.cas.web.flow.resolver.impl.RankedMultifactorAuthenticationProviderWebflowEventResolver]
 
for this context>
[32m2021-10-23 16:36:29,206 INFO 
[org.apereo.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit 
trail record BEGIN
=============================================================
WHO: audit:unknown
WHAT: {source=RankedMultifactorAuthenticationProviderWebflowEventResolver, 
event=success, timestamp=Sat Oct 23 16:36:29 CEST 2021}
ACTION: AUTHENTICATION_EVENT_TRIGGERED
APPLICATION: CAS
WHEN: Sat Oct 23 16:36:29 CEST 2021
CLIENT IP ADDRESS: XXX.XXX.XXX.XXX
SERVER IP ADDRESS: XXX.XXX.XXX.XXX
=============================================================

>
[33m2021-10-23 16:37:03,833 WARN 
[org.apereo.cas.services.resource.AbstractResourceBasedServiceRegistry] - 
<[test.10001.json] does not match the recommended pattern 
[(\w+-)+(\d+)\.json]. While CAS tries to be forgiving as much as possible, 
it's recommended that you rename the file to match the requested pattern to 
avoid issues with duplicate service loading. Future CAS versions may try to 
strictly force the naming syntax, refusing to load the file.>
[36m2021-10-23 16:37:03,833 DEBUG 
[org.apereo.cas.services.resource.AbstractResourceBasedServiceRegistry] - 
<Attempting to read and parse 
[/opt/URVsso/cas-test/apache-tomcat-9.0.31.8443/webapps/cas/WEB-INF/classes/services/test.10001.json]>
[32m2021-10-23 16:37:03,835 INFO 
[org.apereo.cas.services.AbstractServicesManager] - <Loaded [1] service(s) 
from [JsonServiceRegistry].>
[32m2021-10-23 16:37:13,902 INFO 
[org.apereo.cas.ticket.registry.DefaultTicketRegistryCleaner] - <[0] 
expired tickets removed.>
[36m2021-10-23 16:37:13,902 DEBUG 
[org.apereo.cas.ticket.registry.DefaultTicketRegistryCleaner] - <Finished 
ticket cleanup.>

Many thanks

El viernes, 22 de octubre de 2021 a las 17:18:34 UTC+2, Ray Bon escribió:

> Jordi,
>
> If the log in screen is being shown, cas thinks you need to authenticate.
>
> Before looking at the spring logs, check the cas audit log. It will have 
> lines like:
>
> 2021-10-21 17:43:37,920 
> INFO  [       org.aper.insp.audi.supp.Slf4jLoggingAuditTrailManager] - <Thu 
> Oct 21 17:43:37 PDT 2021|CAS| ...
>
> This is the relevant section in log4j2.xml
>
>         <!-- Log audit to all root appenders, and also to audit log 
> (additivity is not false) -->
>         <AsyncLogger name="org.apereo.inspektr.audit.support" level="info" 
> includeLocation="true" >
>             <!-- <AppenderRef ref="casAudit"/>
>             <AppenderRef ref="syslog"/> -->
>         </AsyncLogger>
>
> You can also try these loggers to get details about your service:
>
>         <!-- INFO  Granted ticket [...] for service [...] for user [...]
>              DEBUG Resolved service [limited details about service]
>                    Located registered service definition [service details] 
> -->
>         <AsyncLogger 
> name="org.apereo.cas.DefaultCentralAuthenticationService" level="debug" />
>         <!-- DEBUG service definitions -->
>         <AsyncLogger name="org.apereo.cas.adaptors" level="debug" />
>
> Ray
>
> On Fri, 2021-10-22 at 01:03 -0700, Jordi wrote:
>
> Notice: This message was sent from outside the University of Victoria 
> email system. Please be cautious with links and sensitive information. 
>
> Hello  Ray Bon, 
>
> this is the log:
> [image: Logs.png]
>
> If do you need more information, i could extract more logs. 
>
> Thanks.
>
> El viernes, 22 de octubre de 2021 a las 9:57:52 UTC+2, Jordi escribió:
>
> Hello 
>
> I did another test only with json register service, without LDAP 
> Authentication. The problem is when I register a service, because CAS not 
> redirect to. 
>
> In this example the URL that I am calling is : 
> https://localhost:8443/cas/login?service=https%3A%2F%2Flocalhost%3A8443%2Fcas-sample%2F
>
> I send you the video and the project (https://we.tl/t-MMM4MbxyPF send you 
> by https://wetransfer.com/). The project was deployed on apache Tomcat 
> v9.0.31
>
> SO Version:
> [image: VersionSO.png]
>
> Safari version:
> [image: VersionSafari.png]
>
> This works perfectly on all browsers on Windows, but doesn't work on 
> Safari . 
>
> Many thanks!
>
>
> -- 
>
> Ray Bon
> Programmer Analyst
> Development Services, University Systems
> 2507218831 <(250)%20721-8831> | CLE 019 | [email protected]
>
> I acknowledge and respect the lək̓ʷəŋən peoples on whose traditional 
> territory the university stands, and the Songhees, Esquimalt and WSÁNEĆ 
> peoples whose historical relationships with the land continue to this day.
>

-- 
- 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/f31fd588-3a11-4f17-8857-e48f215bb51cn%40apereo.org.
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Specify the refresh internal in seconds. -->
<Configuration monitorInterval="5" packages="org.apereo.cas.logging">
    <Properties>
    	<!-- <Property name="baseDir">C:\tmp\logs</Property> -->
        <Property name="baseDir">/var/logs</Property>
        <Property name="cas.log.level">debug</Property>
        <Property name="spring.webflow.log.level">info</Property>
        <Property name="spring.security.log.level">info</Property>
        <Property name="spring.cloud.log.level">warn</Property>
        <Property name="spring.web.log.level">warn</Property>
        <Property name="spring.boot.log.level">warn</Property>
        <Property name="ldap.log.level">info</Property>
        <Property name="pac4j.log.level">warn</Property>
        <Property name="opensaml.log.level">warn</Property>
        <Property name="hazelcast.log.level">warn</Property>
    </Properties>
    <Appenders>
        <Console name="console" target="SYSTEM_OUT">
            <PatternLayout pattern="%highlight{%d %p [%c] - &lt;%m&gt;}%n"/>
        </Console>

        <RollingFile name="file" fileName="${baseDir}/cas.log" append="true"
                     filePattern="${baseDir}/cas-%d{yyyy-MM-dd-HH}-%i.log">
            <PatternLayout pattern="%highlight{%d %p [%c] - &lt;%m&gt;%n}" />
            <Policies>
                <OnStartupTriggeringPolicy />
                <SizeBasedTriggeringPolicy size="10 MB"/>
                <TimeBasedTriggeringPolicy />
            </Policies>
            <DefaultRolloverStrategy max="5" compressionLevel="9">
                <Delete basePath="${baseDir}" maxDepth="2">
                    <IfFileName glob="*/*.log.gz" />
                    <IfLastModified age="7d" />
                </Delete>
            </DefaultRolloverStrategy>
        </RollingFile>
        <RollingFile name="auditlogfile" fileName="${baseDir}/cas_audit.log" append="true"
                     filePattern="${baseDir}/cas_audit-%d{yyyy-MM-dd-HH}-%i.log">
            <PatternLayout pattern="%highlight{%d %p [%c] - %m%n}" />
            <Policies>
                <OnStartupTriggeringPolicy />
                <SizeBasedTriggeringPolicy size="10 MB"/>
                <TimeBasedTriggeringPolicy />
            </Policies>
            <DefaultRolloverStrategy max="5" compressionLevel="9">
                <Delete basePath="${baseDir}" maxDepth="2">
                    <IfFileName glob="*/*.log.gz" />
                    <IfLastModified age="7d" />
                </Delete>
            </DefaultRolloverStrategy>
        </RollingFile>

        <CasAppender name="casAudit">
            <AppenderRef ref="auditlogfile" />
        </CasAppender>
        <CasAppender name="casFile">
            <AppenderRef ref="file" />
        </CasAppender>
        <CasAppender name="casConsole">
            <AppenderRef ref="console" />
        </CasAppender>
    </Appenders>
    <Loggers>
        <AsyncLogger name="org.apereo.cas" level="${sys:cas.log.level}" includeLocation="true" />
        <AsyncLogger name="org.apereo.cas.services" level="${sys:cas.log.level}" includeLocation="true" />
        <AsyncLogger name="org.apereo.spring" level="${sys:cas.log.level}" includeLocation="true" />
        <AsyncLogger name="org.apereo.services.persondir" level="${sys:cas.log.level}" includeLocation="true" />
        <AsyncLogger name="org.apereo.cas.web.flow" level="${sys:cas.log.level}" includeLocation="true" />
        <AsyncLogger name="org.apereo.cas.web.CasWebApplication" level="${sys:cas.log.level}" includeLocation="true"/>

        <!-- INFO  Granted ticket [...] for service [...] for user [...]
             DEBUG Resolved service [limited details about service]
                   Located registered service definition [service details] -->
        <AsyncLogger name="org.apereo.cas.DefaultCentralAuthenticationService" level="debug" />
        <!-- DEBUG service definitions -->
        <AsyncLogger name="org.apereo.cas.adaptors" level="debug" />


        <AsyncLogger name="org.apereo.inspektr.audit.support" additivity="true" level="info" includeLocation="true">
            <AppenderRef ref="casAudit"/>
        </AsyncLogger>

        <AsyncLogger name="org.springframework.boot" level="${sys:spring.boot.log.level}" />
        <AsyncLogger name="org.springframework.boot.context.embedded" level="info" />
        <AsyncLogger name="org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration" level="${sys:spring.security.log.level}" />
        <AsyncLogger name="org.springframework.boot.autoconfigure.security" level="${sys:spring.security.log.level}" />
        <AsyncLogger name="org.springframework.boot.devtools" level="debug" />

        <AsyncLogger name="org.springframework" level="warn" includeLocation="true" />
        <AsyncLogger name="org.springframework.webflow" level="${sys:spring.webflow.log.level}" includeLocation="true"/>
        <AsyncLogger name="org.springframework.aop" level="warn" includeLocation="true" />
        <AsyncLogger name="org.springframework.web" level="warn" includeLocation="true"/>
        <AsyncLogger name="org.springframework.session" level="warn" includeLocation="true"/>
        <AsyncLogger name="org.springframework.scheduling" level="info" includeLocation="true"/>
        <AsyncLogger name="org.springframework.cloud.vault" level="warn" includeLocation="true" />
        <AsyncLogger name="org.springframework.web.client" level="warn" includeLocation="true" />
        <AsyncLogger name="org.springframework.security" level="${sys:spring.security.log.level}" includeLocation="true"/>
        <AsyncLogger name="org.springframework.cloud" level="${sys:spring.cloud.log.level}" includeLocation="true"/>
        <AsyncLogger name="org.springframework.amqp" level="error" />
        <AsyncLogger name="org.springframework.integration" level="warn" includeLocation="true"/>
        <AsyncLogger name="org.springframework.messaging" level="warn" includeLocation="true"/>
        <AsyncLogger name="org.springframework.web" level="${sys:spring.web.log.level}" includeLocation="true"/>
        <AsyncLogger name="org.springframework.orm.jpa" level="warn" includeLocation="true"/>
        <AsyncLogger name="org.springframework.scheduling" level="warn" includeLocation="true"/>
        <AsyncLogger name="org.springframework.context.annotation" level="off" includeLocation="true"/>
        <AsyncLogger name="org.springframework.web.socket" level="warn" includeLocation="true"/>
        <AsyncLogger name="org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter" level="debug" includeLocation="true"/>

        <AsyncLogger name="com.couchbase" level="warn" includeLocation="true" />
        <AsyncLogger name="org.apache" level="error" includeLocation="true"/>
        <AsyncLogger name="com.netflix" level="warn" includeLocation="true"/>
        <AsyncLogger name="org.quartz" level="warn" includeLocation="true"/>
        <AsyncLogger name="org.thymeleaf" level="warn" includeLocation="true"/>
        <AsyncLogger name="org.pac4j" level="${sys:pac4j.log.level}" includeLocation="true"/>

        <AsyncLogger name="org.opensaml" level="${sys:opensaml.log.level}" includeLocation="true"/>
        <AsyncLogger name="PROTOCOL_MESSAGE" level="${sys:opensaml.log.level}" includeLocation="true" />

        <AsyncLogger name="net.sf.ehcache" level="warn" includeLocation="true"/>
        <AsyncLogger name="net.jradius" level="warn" includeLocation="true"/>
        <AsyncLogger name="org.openid4java" level="warn" includeLocation="true"/>
        <AsyncLogger name="org.ldaptive" level="${sys:ldap.log.level}" includeLocation="true"/>
        <AsyncLogger name="com.hazelcast" level="${sys:hazelcast.log.level}" includeLocation="true"/>
        <AsyncLogger name="org.jasig.spring" level="warn" includeLocation="true"/>
        <AsyncLogger name="org.apache.cxf" level="warn" includeLocation="true"/>
        <AsyncLogger name="org.apache.http" level="warn" includeLocation="true"/>

        <AsyncLogger name="org.apereo.cas.adaptors.x509" level="warn" includeLocation="true"/>

        <AsyncRoot level="warn">
            <AppenderRef ref="casFile"/>
            <AppenderRef ref="casConsole"/>
        </AsyncRoot>
    </Loggers>
</Configuration>

Reply via email to