CAS-Management : Services Added are lost after tomcat restart

150 views
Skip to first unread message

Julien Whizz

unread,
Aug 11, 2017, 11:09:35 AM8/11/17
to CAS Community
Hi,

When i add a new service in CAS-MANGAMENT that working, but when i restart my tomcat, i loss all services configuration.

I think is because my new service are save in memory..

My log :
2017-08-11 16:43:33,525 INFO [org.apereo.cas.services.DefaultServicesManager] - Loaded [1] service(s) from [InMemoryServiceRegistry].
2017-08-11 16:43:33,933 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - === SECURITY ===
2017-08-11 16:43:33,933 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - url: https://server.domain.prive.fr:8443/cas-management/getService?id=-1
2017-08-11 16:43:33,934 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - matchers: null
2017-08-11 16:43:33,934 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - clients: CasClient
2017-08-11 16:43:33,934 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - currentClients: [#DirectCasClient# | configuration: #CasConfiguration# | loginUrl: https://server.domain.prive.fr:8443/cas/login | prefixUrl: https://server.domain.prive.fr:8443/cas/ | restUrl: https://server.domain.prive.fr:8443/cas/v1/tickets | protocol: CAS30 | renew: false | gateway: false | encoding: UTF-8 | logoutHandler: #DefaultCasLogoutHandler# | store: #GuavaStore# | size: 10000 | timeout: 30 | timeUnit: MINUTES | | destroySession: false | | acceptAnyProxy: false | allowedProxyChains: [] | proxyReceptor: null | timeTolerance: 1000 | postLogoutUrlParameter: service | defaultTicketValidator: null | urlResolver: org.pac4j.core.http.DefaultUrlResolver@5cea0d4d | |]
2017-08-11 16:43:33,934 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - loadProfilesFromSession: true
2017-08-11 16:43:33,934 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - profiles: [#CasProfile# | id: mylogin | attributes: {isFromNewLogin=true, authenticationDate=2017-08-11T16:43:31.400+02:00[Europe/Paris], authenticationMethod=LdapAuthenticationHandler, successfulAuthenticationHandlers=LdapAuthenticationHandler, longTermAuthenticationRequestTokenUsed=false} | roles: [ROLE_ADMIN] | permissions: [] | isRemembered: false | clientName: CasClient | linkedId: null |]
2017-08-11 16:43:33,934 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - authorizers: securityHeaders,csrfToken,RequireAnyRoleAuthorizer
2017-08-11 16:43:33,934 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - authenticated and authorized -> grant access
2017-08-11 16:43:33,935 DEBUG [org.apereo.services.persondir.support.MergingPersonAttributeDaoImpl] - Aggregated possible attribute names 'null'
2017-08-11 16:44:06,963 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - === SECURITY ===
2017-08-11 16:44:06,963 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - url: https://server.domain.prive.fr:8443/cas-management/saveService.html
2017-08-11 16:44:06,964 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - matchers: null
2017-08-11 16:44:06,964 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - clients: CasClient
2017-08-11 16:44:06,964 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - currentClients: [#DirectCasClient# | configuration: #CasConfiguration# | loginUrl: https://server.domain.prive.fr:8443/cas/login | prefixUrl: https://server.domain.prive.fr:8443/cas/ | restUrl: https://server.domain.prive.fr:8443/cas/v1/tickets | protocol: CAS30 | renew: false | gateway: false | encoding: UTF-8 | logoutHandler: #DefaultCasLogoutHandler# | store: #GuavaStore# | size: 10000 | timeout: 30 | timeUnit: MINUTES | | destroySession: false | | acceptAnyProxy: false | allowedProxyChains: [] | proxyReceptor: null | timeTolerance: 1000 | postLogoutUrlParameter: service | defaultTicketValidator: null | urlResolver: org.pac4j.core.http.DefaultUrlResolver@5cea0d4d | |]
2017-08-11 16:44:06,964 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - loadProfilesFromSession: true
2017-08-11 16:44:06,964 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - profiles: [#CasProfile# | id: mylogin | attributes: {isFromNewLogin=true, authenticationDate=2017-08-11T16:43:31.400+02:00[Europe/Paris], authenticationMethod=LdapAuthenticationHandler, successfulAuthenticationHandlers=LdapAuthenticationHandler, longTermAuthenticationRequestTokenUsed=false} | roles: [ROLE_ADMIN] | permissions: [] | isRemembered: false | clientName: CasClient | linkedId: null |]
2017-08-11 16:44:06,964 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - authorizers: securityHeaders,csrfToken,RequireAnyRoleAuthorizer
2017-08-11 16:44:06,964 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - authenticated and authorized -> grant access
2017-08-11 16:44:07,031 INFO [org.apereo.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - Audit trail record BEGIN
=============================================================
WHO: mylogin
WHAT: id=2,name=service_test,description=service_test,serviceId=service_test,usernameAttributeProvider=org.apereo.cas.services.DefaultRegisteredServiceUsernameProvider@d,theme=sjsl,evaluationOrder=1,logoutType=NONE,attributeReleasePolicy=org.apereo.cas.services.ReturnAllAttributeReleasePolicy@6fd6ef2[attributeFilter=<null>,principalAttributesRepository=org.apereo.cas.authentication.principal.DefaultPrincipalAttributesRepository@2512cc73[],authorizedToReleaseCredentialPassword=false,authorizedToReleaseProxyGrantingTicket=false,excludeDefaultAttributes=false,principalIdAttribute=<null>],accessStrategy=org.apereo.cas.services.DefaultRegisteredServiceAccessStrategy@544b7034[enabled=true,ssoEnabled=true,requireAllAttributes=false,requiredAttributes={},unauthorizedRedirectUrl=<null>,caseInsensitive=false,rejectedAttributes={}],publicKey=<null>,proxyPolicy=org.apereo.cas.services.RefuseRegisteredServiceProxyPolicy@52bae5d8,logo=<null>,logoutUrl=<null>,requiredHandlers=[],properties={},multifactorPolicy=org.apereo.cas.services.DefaultRegisteredServiceMultifactorPolicy@3fddb14c[multifactorAuthenticationProviders=[],failureMode=CLOSED,principalAttributeNameTrigger=<null>,principalAttributeValueToMatch=<null>,bypassEnabled=false],informationUrl=<null>,privacyUrl=<null>,<null>
ACTION: SAVE_SERVICE_SUCCESS
APPLICATION: CAS_Management
WHEN: Fri Aug 11 16:44:07 CEST 2017
CLIENT IP ADDRESS: CLIENT_IP
SERVER IP ADDRESS: SERVER_IP
=============================================================


2017-08-11 16:44:07,032 INFO [org.apereo.cas.mgmt.services.web.RegisteredServiceSimpleFormController] - Saved changes to service [2]
2017-08-11 16:44:07,085 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - === SECURITY ===
2017-08-11 16:44:07,085 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - url: https://server.domain.prive.fr:8443/cas-management/getService?id=2
2017-08-11 16:44:07,085 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - matchers: null
2017-08-11 16:44:07,085 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - clients: CasClient
2017-08-11 16:44:07,085 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - currentClients: [#DirectCasClient# | configuration: #CasConfiguration# | loginUrl: https://server.domain.prive.fr:8443/cas/login | prefixUrl: https://server.domain.prive.fr:8443/cas/ | restUrl: https://server.domain.prive.fr:8443/cas/v1/tickets | protocol: CAS30 | renew: false | gateway: false | encoding: UTF-8 | logoutHandler: #DefaultCasLogoutHandler# | store: #GuavaStore# | size: 10000 | timeout: 30 | timeUnit: MINUTES | | destroySession: false | | acceptAnyProxy: false | allowedProxyChains: [] | proxyReceptor: null | timeTolerance: 1000 | postLogoutUrlParameter: service | defaultTicketValidator: null | urlResolver: org.pac4j.core.http.DefaultUrlResolver@5cea0d4d | |]
2017-08-11 16:44:07,085 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - loadProfilesFromSession: true
2017-08-11 16:44:07,085 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - profiles: [#CasProfile# | id: mylogin | attributes: {isFromNewLogin=true, authenticationDate=2017-08-11T16:43:31.400+02:00[Europe/Paris], authenticationMethod=LdapAuthenticationHandler, successfulAuthenticationHandlers=LdapAuthenticationHandler, longTermAuthenticationRequestTokenUsed=false} | roles: [ROLE_ADMIN] | permissions: [] | isRemembered: false | clientName: CasClient | linkedId: null |]
2017-08-11 16:44:07,086 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - authorizers: securityHeaders,csrfToken,RequireAnyRoleAuthorizer
2017-08-11 16:44:07,086 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - authenticated and authorized -> grant access
2017-08-11 16:44:07,088 DEBUG [org.apereo.services.persondir.support.MergingPersonAttributeDaoImpl] - Aggregated possible attribute names 'null'
2017-08-11 16:44:07,384 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - === SECURITY ===
2017-08-11 16:44:07,385 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - url: https://server.domain.prive.fr:8443/cas-management/getServices.html
2017-08-11 16:44:07,385 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - matchers: null
2017-08-11 16:44:07,385 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - clients: CasClient
2017-08-11 16:44:07,385 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - currentClients: [#DirectCasClient# | configuration: #CasConfiguration# | loginUrl: https://server.domain.prive.fr:8443/cas/login | prefixUrl: https://server.domain.prive.fr:8443/cas/ | restUrl: https://server.domain.prive.fr:8443/cas/v1/tickets | protocol: CAS30 | renew: false | gateway: false | encoding: UTF-8 | logoutHandler: #DefaultCasLogoutHandler# | store: #GuavaStore# | size: 10000 | timeout: 30 | timeUnit: MINUTES | | destroySession: false | | acceptAnyProxy: false | allowedProxyChains: [] | proxyReceptor: null | timeTolerance: 1000 | postLogoutUrlParameter: service | defaultTicketValidator: null | urlResolver: org.pac4j.core.http.DefaultUrlResolver@5cea0d4d | |]
2017-08-11 16:44:07,385 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - loadProfilesFromSession: true
2017-08-11 16:44:07,385 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - profiles: [#CasProfile# | id: mylogin | attributes: {isFromNewLogin=true, authenticationDate=2017-08-11T16:43:31.400+02:00[Europe/Paris], authenticationMethod=LdapAuthenticationHandler, successfulAuthenticationHandlers=LdapAuthenticationHandler, longTermAuthenticationRequestTokenUsed=false} | roles: [ROLE_ADMIN] | permissions: [] | isRemembered: false | clientName: CasClient | linkedId: null |]
2017-08-11 16:44:07,385 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - authorizers: securityHeaders,csrfToken,RequireAnyRoleAuthorizer
2017-08-11 16:44:07,385 DEBUG [org.apereo.cas.mgmt.web.CasManagementSecurityInterceptor$CasManagementSecurityLogic] - authenticated and authorized -> grant access
2017-08-11 16:44:07,385 DEBUG [org.apereo.cas.services.DefaultServicesManager] - Loading services from [InMemoryServiceRegistry]
2017-08-11 16:44:07,386 DEBUG [org.apereo.cas.services.DefaultServicesManager] - Adding registered service [^https://server.domain.prive.fr:8443/cas-management/manage.html]
2017-08-11 16:44:07,386 DEBUG [org.apereo.cas.services.DefaultServicesManager] - Adding registered service [service_test]
2017-08-11 16:44:07,386 INFO [org.apereo.cas.services.DefaultServicesManager] - Loaded [2] service(s) from [InMemoryServiceRegistry].


How i cna configure my cas-management for save my service in a json file for exemple ?
Thx all

Tom O'Neill

unread,
Aug 11, 2017, 1:56:04 PM8/11/17
to cas-...@apereo.org

Hi,

 

What version of CAS are you using?

You need to look at configuring a persistent service registry for CAS and the Service Management app.

 

https://apereo.github.io/cas/5.1.x/installation/JSON-Service-Management.html

 

Thanks,

 

Tom

--
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
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/db179c56-f864-4df2-9cbd-90e5a3e45938%40apereo.org.

Reply all
Reply to author
Forward
0 new messages