Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrations not running on new Azure Postgres Flexible Server #3844

Open
3 of 5 tasks
WatcherWhale opened this issue Sep 20, 2024 · 0 comments
Open
3 of 5 tasks

Migrations not running on new Azure Postgres Flexible Server #3844

WatcherWhale opened this issue Sep 20, 2024 · 0 comments
Labels
bug Something is not working.

Comments

@WatcherWhale
Copy link

WatcherWhale commented Sep 20, 2024

Preflight checklist

Ory Network Project

No response

Describe the bug

When starting a new Hydra instance in a fresh Azure Postgres Flexible Server (v15) the migrations will fail immediately due to the md5 being disabled for FIPS compliancy.

The culprits in this situation are following migrations:

A possibillity is to change the uuid generation with the uuid-ossp extenstion.

Reproducing the bug

  1. Start an Azure Postgres Flexible Server version 15
  2. Point hydra to this database and run the migrations

Relevant log output

{"audience":"application","level":"info","migration_file":"migrations/20150101000001000000_networks.postgres.up.sql","migration_name":"networks","msg":"Migration has not yet been applied, running
 migration.","service_name":"Ory Hydra","service_version":"v2.2.0","time":"2024-09-25T13:37:00.960450904Z","version":"20150101000001000000"}
this error should never be printed
Could not apply migrations:
ERROR: could not compute MD5 hash: disabled for FIPS (SQLSTATE XX000)
error executing migrations/20150101000001000000_networks.postgres.up.sql, sql: -- Migration generated by the command below; DO NOT EDIT.
-- hydra:generate hydra migrate gen
CREATE TABLE "networks" (
  "id" UUID NOT NULL,
  PRIMARY KEY("id"),
  "created_at" timestamp NOT NULL,
  "updated_at" timestamp NOT NULL
);

INSERT INTO networks (id, created_at, updated_at) VALUES (uuid_in(
  overlay(
    overlay(
      md5(random()::text || ':' || clock_timestamp()::text)
      placing '4'
      from 13
    )
    placing to_hex(floor(random()*(11-8+1) + 8)::int)::text
    from 17
  )::cstring
), '2013-10-07 08:23:19', '2013-10-07 08:23:19');

Relevant configuration

No response

Version

2.2.0

On which operating system are you observing this issue?

Linux

In which environment are you deploying?

Kubernetes with Helm

Additional Context

No response

@WatcherWhale WatcherWhale added the bug Something is not working. label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

No branches or pull requests

1 participant