Unable to go through basic setup error.validation.out-of-range

Viewed 49

I've been using Curity with docker for quite some time.

After watching Curity Identity Server 7.2 Release Webinar video today, I was thinking to give EdDSA a shot.

So I created a new container like I always do but this time I could not complete the Basic set up. Curity is running behind Traefik and traefik is sending UI requests to curity_container:6749.

Here are the logs.

I uploaded my license on the UI and use default settings for everything. (To be honest, I have no idea how to connect to a PG container as I could not find postgres-create_database.sql anywhere inside the curity container.

2022-07-20T04:40:22:729+0000 WARN    {conf-Thread-12-58} se.curity.identityserver.licensing.LicenseManager - The License JWT does not contain the expected parts
2022-07-20T04:40:22:729+0000 WARN    {conf-Thread-12-58} se.curity.identityserver.licensing.LicenseManager -
*********************************************************************************
No valid license has been found. The Server will NOT work normally without a license,
it is advisable that you get a license for this server as soon as possible.
*********************************************************************************
2022-07-20T04:40:22:729+0000 WARN    {conf-Thread-12-58} se.curity.identityserver.licensing.LicenseManager - No valid license has been provided
2022-07-20T04:40:22:737+0000 INFO    {conf-Thread-12-58} se.curity.identityserver.event.EventBusImplFactoryInjector - Starting EventBus without any EventListeners configured
2022-07-20T04:40:22:740+0000 INFO    {conf-super-app-server-BixNNLvj-c5500ce30ca5} se.curity.identityserver.config.ConfDConnection - Thread conf-Thread-12-58 is connected to the Configuration Service
2022-07-20T04:40:22:740+0000 INFO    {server-start-stop-5} se.curity.identityserver.jetty.AppServer.AdminApiServerLifecycleManager - Starting HTTP server (run 1)
2022-07-20T04:40:22:867+0000 INFO    {app-server-AdminApiServerLifecycleManager} se.curity.identityserver.jetty.AppServer.AdminApiServerLifecycleManager - Listening on 0.0.0.0:6749
2022-07-20T04:40:30:056+0000 WARN  agbbC7En  {req-80} se.curity.identityserver.errors.SystemRuntimeException - se.curity.identityserver.errors.ServiceUnavailableException@67c97b7a[_httpStatus=503,_errorMessageId=system.status.service-unavailable,_errorCode=generic_error,_errorDescription=]
2022-07-20T04:40:58:601+0000 INFO    {maapi-connection-manager-1} se.curity.identityserver.adminapi.operations.Create - create failed with exception: error.validation.out-of-range
2022-07-20T04:40:58:601+0000 INFO  WQM4ONhN  {req-78} se.curity.identityserver.adminapi.operations.Create - create failed with exception: error.validation.out-of-range
2022-07-20T04:40:58:608+0000 INFO  k8e6C3iW  {req-78} se.curity.identityserver.adminapi.operations.Create - create failed with exception: error.validation.out-of-range
2022-07-20T04:40:58:647+0000 INFO    {maapi-connection-manager-1} se.curity.identityserver.adminapi.operations.Create - create failed with exception: error.validation.out-of-range
2022-07-20T04:40:58:702+0000 INFO    {maapi-connection-manager-1} se.curity.identityserver.adminapi.operations.Create - create failed with exception: error.validation.out-of-range
2022-07-20T04:40:58:762+0000 INFO  hFcEIqOT  {req-82} se.curity.identityserver.adminapi.operations.Create - create failed with exception: error.validation.out-of-range

My docker compose looks like this

  curity:
    image: curity.azurecr.io/curity/idsvr
    container_name: curity
    restart: always
    environment:
      PASSWORD: 
    networks:
    - proxy

Does anyone know what this error means and how to get pass it?

1 Answers

Good to see that you've resolved your problem, and here are some further notes to help with your understanding and productivity:

LOGGED ERRORS

Looks like Traefik is somehow blocking how the Identity Server pushes configuration updates from admin to runtime nodes. By default a listener is created on port 6789, and this seems to be failing in your case. I have not used Curity Identity Server behind Traefik, but see if you can prevent it interfering with this port, or just the Identity Server container.

DEBUGGING

Consider adding a more detailed log level during development, which will help with certain types of problem. This is one of the approaches suggested in OAuth Troubleshooting for Developers.

curity:
  image: curity.azurecr.io/curity/idsvr
  container_name: curity
  restart: always
  environment:
    PASSWORD: MyPassword
    LOGGING_LEVEL: DEBUG
  networks:
  - proxy

POSTGRES

The script to create the postgres schema exists here in a deployed Docker container for the Curity Identity Server:

export IDSVR_CONTAINER_ID=$(docker ps | grep idsvr | awk '{print $1}')
docker exec -it $IDSVR_CONTAINER_ID bash -c "ls /opt/idsvr/etc"

In the Admin UI, under the Facilities / Default Data Source menu item you can configure a Postgres connection like this:

<data-source>
  <id>default-datasource</id>
  <jdbc xmlns="https://curity.se/ns/ext-conf/jdbc">
    <connection-string>jdbc:mypostgres-container://dbserver/idsvr</connection-string>
    <driver>org.postgresql.Driver</driver>
    <password>MySecr3t</password>
    <use-for-audit>true</use-for-audit>
    <username>postgres</username>
  </jdbc>
</data-source>

You can deploy postgres and run the schema script like this, and the script can include data such as backed up users:

curity-data:
  image: postgres:13.2
  hostname: mypostgres-container
  volumes:
  - ./components/idsvr/postgres-create_database.sql:/docker-entrypoint-initdb.d/data-backup.sql
  environment:
    POSTGRES_USER: 'postgres'
    POSTGRES_PASSWORD: 'MySecr3t'
    POSTGRES_DB: 'idsvr'

See also these resources, which use postgres and deploy a backed up user account:

Related