CAS 7.1.3: Service Registry not loading custom table that is created to store service registry

42 views
Skip to first unread message

Akash Mohapatra

unread,
Oct 16, 2025, 3:10:36 PM (4 days ago) Oct 16
to CAS Community
CAS 7.1.3: We are using cas 7.1.3 and planning to use DynamoDb as our storage . We successfully created cas_tickets and cas_services table for ticketregistry and serviceregistry. We have also seeded the cas_services with one valid service registry entry. But, while bootrunning, its not taking cas_services entries into account. Its just taking in memory service registry entry. My config for service registry looks like below :
cas:
service-registry:
  core:
    init-from-json: false
  dynamo-db:
    endpoint: http://localhost:8000
    billing-mode: PAY_PER_REQUEST
    region: us-east-1
    credential-access-key: dummy
    credential-secret-key: dummy
    local-instance: true
    drop-tables-on-startup: false
    prevent-table-creation-on-startup: true
    table-name: cas_services
FYI, tables are created and I can see the tables with its entries while I do aws dynamodb scan  --table-name cas_services  --projection-expression "id, body"  --endpoint-url http://localhost:8000  --output json
I see this result while scanning using above command:
{
  "Items": [
    {
      "body": {
        "S": "{\"@class\": \"org.apereo.cas.services.CasRegisteredService\", \"serviceId\": \"^https?://localhost(:[0-9]+)?/.*\", \"name\": \"localhost\", \"id\": 8444, \"evaluationOrder\": 10, \"enabled\": true, \"ssoEnabled\": true, \"accessStrategy\": {\"@class\": \"org.apereo.cas.services.DefaultRegisteredServiceAccessStrategy\", \"enabled\": true, \"ssoEnabled\": true, \"requireAllAttributes\": false, \"unauthorizedRedirectUrl\": null}}"
      },
      "id": {
        "N": "8444"
      }
    }
  ],
  "Count": 1,
  "ScannedCount": 1,
  "ConsumedCapacity": null
}
Any help here is appreciated. Thank you

Ray Bon

unread,
Oct 16, 2025, 8:30:14 PM (4 days ago) Oct 16
to cas-...@apereo.org
Akash,

It looks like you are just starting; I suggest you switch to 7.3 version, 7.1 is already EOL.
Have you added the feature to build.gradle?
Enable at least debug logging.
See top and bottom of page [1]

It is OK to have multiple service registries, but they should have services with different serviceId.

Ray


From: 'Akash Mohapatra' via CAS Community <cas-...@apereo.org>
Sent: October 16, 2025 10:33
To: CAS Community <cas-...@apereo.org>
Subject: [cas-user] CAS 7.1.3: Service Registry not loading custom table that is created to store service registry
 
--
- Website: https://apereo.github.io/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 visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/be944a29-78e5-46c5-bd6b-2cc7ea12ed6bn%40apereo.org.

Akash Mohapatra

unread,
Oct 16, 2025, 8:30:24 PM (4 days ago) Oct 16
to CAS Community, Akash Mohapatra
Apparently, it was searching for encoded in blob form under service registry table hence, it was not reading correctly even though all properties were correct. This issue is now fixed.

Akash Mohapatra

unread,
Oct 16, 2025, 9:54:28 PM (4 days ago) Oct 16
to CAS Community, Ray Bon
Thanks Ron for giving this insight about CAS. Yes, we just started this year to migrate CAS from 3 to 7.1.3. But it seems CAS is progressing at a higher rate. We have setup the DynamoDB now using the configuration in Application.yml and also enabled debugging for logs to generate. at application level.

But, unlike in POSTGRESQL, which used to store body column which represent TicketGrantingTicketImpl or ServiceTicketImpl class under CAS_TICKETS table , DynamoDb tables store in encoded format. Is there a way or page which has documented the represenation of CAS_TICKETS or CAS_SERVICES in DynamoDB?

Thank you
Akash

Reply all
Reply to author
Forward
0 new messages