Unauthorized Service Access. Service [] is not found in service registry

141 views
Skip to first unread message

Christophe Delcour

unread,
Sep 25, 2020, 5:52:30 AM9/25/20
to CAS Community
Hello,
I am trying to install Apereo CAS 6.3 under Tomcat 9 but I have a problem. 
My service is not recognised and in my logs, I have these 2 lines of warning:
 
WARNING [https-jsse-nio-443-exec-4] javax.persistence.spi.PersistenceProviderResolverHolder$DefaultPersistenceProviderResolver.log javax.persistence.spi::No valid providers found.

WARN [org.apereo.cas.services.RegisteredServiceAccessStrategyUtils] - <Unauthorized Service Access. Service [] is not found in service registry.>

My service defined  in /etc/cas/services/ is well recognised:
INFO [org.apereo.cas.services.AbstractServicesManager] - <Loaded [1] service(s) from [JsonServiceRegistry].>

I use the default persistent storage (in memory).

Detail of my service:
{
"@class" : "org.apereo.cas.services.RegexRegisteredService",
"serviceId" : "^(https)://belenios.eca.eu/.*",
"name" : "Belenios",
"id" : 1601021856,
"evaluationOrder" : 99999
}

Does anyone have any ideas?

Thank you,

Christophe


Marc MAURICE

unread,
Sep 25, 2020, 6:04:21 AM9/25/20
to cas-...@apereo.org, Christophe Delcour
You need that in build.gradle :

    implementation
"org.apereo.cas:cas-server-support-json-service-registry:${casServerVersion}"

And that in cas.properties :

cas.service-registry.json.location=file:///etc/cas/services


Can you check?

Christophe Delcour

unread,
Sep 25, 2020, 7:08:11 AM9/25/20
to CAS Community, Marc Maurice, Christophe Delcour
thank you for the quick response ;-)
here are the modules added in the build.gradle:
    implementation "org.apereo.cas:cas-server-support-json-service-registry:${casServerVersion}"
    implementation "org.apereo.cas:cas-server-support-ldap:${project.'cas.version'}"
    implementation "org.apereo.cas: cas-server-webapp${project.appServer}:${casServerVersion}"

and cas.serviceRegistry.json.location=file:///etc/cas/services is correctly configured:

cas.properties:
cas.server.prefix=${cas.server.name}/cas

logging.config=file:/etc/cas/config/log4j2.xml
cas.serviceRegistry.initFromJson=true
cas.serviceRegistry.json.location=file:///etc/cas/services

cas.authn.accept.users=
### Connexion LDAP
cas.authn.ldap\[0\].providerClass=org.ldaptive.provider.unboundid.UnboundIDProvider
cas.authn.ldap\[0\].type=AUTHENTICATED
cas.authn.ldap\[0\].useSsl=true
...

I have activated the debug and here are the logs 
2020-09-25 13:02:49,081 INFO [org.apereo.cas.services.AbstractServicesManager] - <Loaded [1] service(s) from [JsonServiceRegistry].>
2020-09-25 13:03:01,934 DEBUG [org.apereo.cas.ticket.registry.AbstractMapBasedTicketRegistry] - <Ticket [TGT-1-*****8ovoFM8IAk-belenios] could not be found>
25-Sep-2020 13:03:02.176 WARNING [https-jsse-nio-443-exec-6] javax.persistence.spi.PersistenceProviderResolverHolder$DefaultPersistenceProviderResolver.log javax.persistence.spi::No valid providers found.
2020-09-25 13:03:02,207 DEBUG [org.apereo.cas.web.flow.login.InitialFlowSetupAction] - <Setting path for cookies for warn cookie generator to: [/cas/]>
2020-09-25 13:03:02,208 DEBUG [org.apereo.cas.web.flow.login.InitialFlowSetupAction] - <Setting path for cookies for TGC cookie generator to: [/cas/]>
2020-09-25 13:03:02,215 DEBUG [org.apereo.cas.web.flow.login.InitialFlowSetupAction] - <Placing service in context scope: [https://belenios.eca.eu:8001/auth/cas?state=oxnzF3WnHV7qAn]>
2020-09-25 13:03:02,218 WARN [org.apereo.cas.services.RegisteredServiceAccessStrategyUtils] - <Unauthorized Service Access. Service [] is not found in service registry.>
2020-09-25 13:03:04,029 DEBUG [org.apereo.cas.web.view.CasReloadableMessageBundle] - <No properties file found for [classpath:custom_messages_en] - neither plain properties nor XML>
2020-09-25 13:03:04,030 DEBUG [org.apereo.cas.web.view.CasReloadableMessageBundle] - <No properties file found for [classpath:custom_messages] - neither plain properties nor XML>
2020-09-25 13:03:04,031 DEBUG [org.apereo.cas.web.view.CasReloadableMessageBundle] - <No properties file found for [classpath:messages_en] - neither plain properties nor XML>
2020-09-25 13:03:04,039 DEBUG [org.apereo.cas.web.view.CasReloadableMessageBundle] - <Loading properties [messages.properties] with encoding 'UTF-8'>
2020-09-25 13:03:04,822 DEBUG [org.apereo.cas.ticket.registry.AbstractMapBasedTicketRegistry] - <Ticket [TGT-1-*****8ovoFM8IAk-belenios] could not be found>
2020-09-25 13:03:05,205 DEBUG [org.apereo.cas.ticket.registry.AbstractMapBasedTicketRegistry] - <Ticket [TGT-1-*****8ovoFM8IAk-belenios] could not be found>
2020-09-25 13:03:07,952 INFO [org.apereo.cas.services.AbstractServicesManager] - <Loaded [1] service(s) from [JsonServiceRegistry].>
2020-09-25 13:03:17,974 INFO [org.apereo.cas.ticket.registry.DefaultTicketRegistryCleaner] - <[0] expired tickets removed.>
2020-09-25 13:03:17,975 DEBUG [org.apereo.cas.ticket.registry.DefaultTicketRegistryCleaner] - <Finished ticket cleanup.>

amit rathee

unread,
Sep 25, 2020, 7:21:11 AM9/25/20
to cas-...@apereo.org, Marc Maurice
I have configured my xx.com domian and now I have to support yy.com by the same CAS server . Where do I need to do the changes ?

Regards,
Amit 

--
- 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/904b6923-0f23-4bbf-a835-1abe66300f79n%40apereo.org.


--
Cheers,
Amit

Misagh Moayyed

unread,
Sep 25, 2020, 7:21:22 AM9/25/20
to CAS Community
Your service URL is: https://belenios.eca.eu:8001/auth/cas?state=oxnzF3WnHV7qAn

Your pattern is: ^(https)://belenios.eca.eu/.*

Use a regex tester like https://regex101.com/ and you'll see why the pattern does not match your service request (i.e. it does not account for the port).

Christophe Delcour

unread,
Sep 25, 2020, 8:00:35 AM9/25/20
to CAS Community, Misagh Moayyed

Arrr, yes, I had forgotten the port number of benelios in the json.
Thank you very much
Reply all
Reply to author
Forward
0 new messages