kratos icon indicating copy to clipboard operation
kratos copied to clipboard

`/version` endpoint giving 404 error on Public API

Open chrispump opened this issue 1 year ago • 0 comments

Preflight checklist

Ory Network Project

No response

Describe the bug

The /version endpoint of Kratos only seems to work within requests via the admin API, other than documented here: https://www.ory.sh/docs/kratos/reference/api#tag/metadata/operation/getVersion

If the endpoint is called via the public API, a 404 error is returned.

Reproducing the bug

  1. docker compose -f quickstart.yml up -d
  2. curl 'http://127.0.0.1:4433/version'
  3. 404 page not found is returned
  4. curl 'http://127.0.0.1:4434/admin/version'
  5. {"version":"v1.0.0"} is returned

Relevant log output

No response

Relevant configuration

version: '3.7'
services:
  kratos-migrate:
    image: oryd/kratos:v1.0.0
    environment:
      - DSN=sqlite:///var/lib/sqlite/db.sqlite?_fk=true&mode=rwc
    volumes:
      - type: volume
        source: kratos-sqlite
        target: /var/lib/sqlite
        read_only: false
      - type: bind
        source: ./contrib/quickstart/kratos/email-password
        target: /etc/config/kratos
    command: -c /etc/config/kratos/kratos.yml migrate sql -e --yes
    restart: on-failure
    networks:
      - intranet
  kratos:
    depends_on:
      - kratos-migrate
    image: oryd/kratos:v1.0.0
    ports:
      - '4433:4433' # public
      - '4434:4434' # admin
    restart: unless-stopped
    environment:
      - DSN=sqlite:///var/lib/sqlite/db.sqlite?_fk=true
      - LOG_LEVEL=trace
    command: serve -c /etc/config/kratos/kratos.yml --dev --watch-courier
    volumes:
      - type: volume
        source: kratos-sqlite
        target: /var/lib/sqlite
        read_only: false
      - type: bind
        source: ./contrib/quickstart/kratos/email-password
        target: /etc/config/kratos
    networks:
      - intranet
networks:
  intranet:
volumes:
  kratos-sqlite:

Version

1.0.0

On which operating system are you observing this issue?

macOS

In which environment are you deploying?

Docker Compose

Additional Context

No response

chrispump avatar Jan 26 '24 03:01 chrispump