Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .deployment-envs/.env.development
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
KEYCLOAK_REALM=SBO
NEXT_PUBLIC_ACCOUNTING_BASE_URL=https://staging.openbraininstitute.org/api/accounting
NEXT_PUBLIC_SMALL_SCALE_SIMULATOR_URL=https://staging.openbraininstitute.org/api/small-scale-simulator
NEXT_PUBLIC_CELL_SVC_BASE_URL=https://staging.openbraininstitute.org/api/circuit
Expand Down Expand Up @@ -38,4 +39,5 @@ NEXT_PUBLIC_NOTEBOOK_SERVICE_BASE_URL=https://staging.openbraininstitute.org/api

NEXT_PUBLIC_SENTRY_DSN='https://4ab8c9fedfd77b1016de8f1aeef34c65@o4508608744587264.ingest.de.sentry.io/4509015226712144'
NEXT_PUBLIC_SENTRY_ORG=openbraininstitute
NEXT_PUBLIC_SENTRY_PRJ=core-web-app
NEXT_PUBLIC_SENTRY_PRJ=core-web-app
AUTH_MANAGER_VAULT_STORAGE=pg
5 changes: 4 additions & 1 deletion .deployment-envs/.env.preview
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

KEYCLOAK_REALM=SBO
NEXT_PUBLIC_ACCOUNTING_BASE_URL=https://staging.openbraininstitute.org/api/accounting
NEXT_PUBLIC_SMALL_SCALE_SIMULATOR_URL=https://staging.openbraininstitute.org/api/small-scale-simulator
NEXT_PUBLIC_CELL_SVC_BASE_URL=https://staging.openbraininstitute.org/api/circuit
Expand Down Expand Up @@ -38,4 +40,5 @@ NEXT_PUBLIC_NOTEBOOK_SERVICE_BASE_URL=https://staging.openbraininstitute.org/api

NEXT_PUBLIC_SENTRY_DSN='https://4ab8c9fedfd77b1016de8f1aeef34c65@o4508608744587264.ingest.de.sentry.io/4509015226712144'
NEXT_PUBLIC_SENTRY_ORG=openbraininstitute
NEXT_PUBLIC_SENTRY_PRJ=core-web-app
NEXT_PUBLIC_SENTRY_PRJ=core-web-app
AUTH_MANAGER_VAULT_STORAGE=pg
4 changes: 3 additions & 1 deletion .deployment-envs/.env.production
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
KEYCLOAK_REALM=SBO
NEXT_PUBLIC_ACCOUNTING_BASE_URL=https://www.openbraininstitute.org/api/accounting
NEXT_PUBLIC_SMALL_SCALE_SIMULATOR_URL=https://www.openbraininstitute.org/api/small-scale-simulator
NEXT_PUBLIC_CELL_SVC_BASE_URL=https://www.openbraininstitute.org/api/circuit
Expand Down Expand Up @@ -43,4 +44,5 @@ NEXT_PUBLIC_NOTEBOOK_SERVICE_BASE_URL=https://www.openbraininstitute.org/api/not

NEXT_PUBLIC_SENTRY_DSN='https://4ab8c9fedfd77b1016de8f1aeef34c65@o4508608744587264.ingest.de.sentry.io/4509015226712144'
NEXT_PUBLIC_SENTRY_ORG=openbraininstitute
NEXT_PUBLIC_SENTRY_PRJ=core-web-app
NEXT_PUBLIC_SENTRY_PRJ=core-web-app
AUTH_MANAGER_VAULT_STORAGE=pg
4 changes: 3 additions & 1 deletion .deployment-envs/.env.staging
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
KEYCLOAK_REALM=SBO
NEXT_PUBLIC_ACCOUNTING_BASE_URL=https://staging.openbraininstitute.org/api/accounting
NEXT_PUBLIC_SMALL_SCALE_SIMULATOR_URL=https://staging.openbraininstitute.org/api/small-scale-simulator
NEXT_PUBLIC_CELL_SVC_BASE_URL=https://staging.openbraininstitute.org/api/circuit
Expand Down Expand Up @@ -42,4 +43,5 @@ NEXT_PUBLIC_NOTEBOOK_SERVICE_BASE_URL=https://staging.openbraininstitute.org/api

NEXT_PUBLIC_SENTRY_DSN='https://4ab8c9fedfd77b1016de8f1aeef34c65@o4508608744587264.ingest.de.sentry.io/4509015226712144'
NEXT_PUBLIC_SENTRY_ORG=openbraininstitute
NEXT_PUBLIC_SENTRY_PRJ=core-web-app
NEXT_PUBLIC_SENTRY_PRJ=core-web-app
AUTH_MANAGER_VAULT_STORAGE=pg
4 changes: 3 additions & 1 deletion .deployment-envs/.env.staging-azure
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
KEYCLOAK_REALM=SBO
NEXT_PUBLIC_ACCOUNTING_BASE_URL=https://staging.azure.openbraininstitute.org/api/accounting
NEXT_PUBLIC_SMALL_SCALE_SIMULATOR_URL=https://staging.azure.openbraininstitute.org/api/small-scale-simulator
NEXT_PUBLIC_CELL_SVC_BASE_URL=https://staging.azure.openbraininstitute.org/api/circuit
Expand Down Expand Up @@ -36,4 +37,5 @@ NEXT_PUBLIC_NOTEBOOK_SERVICE_BASE_URL=https://staging.openbraininstitute.org/api

NEXT_PUBLIC_SENTRY_DSN='https://4ab8c9fedfd77b1016de8f1aeef34c65@o4508608744587264.ingest.de.sentry.io/4509015226712144'
NEXT_PUBLIC_SENTRY_ORG=openbraininstitute
NEXT_PUBLIC_SENTRY_PRJ=core-web-app
NEXT_PUBLIC_SENTRY_PRJ=core-web-app
AUTH_MANAGER_VAULT_STORAGE=pg
4 changes: 3 additions & 1 deletion .deployment-envs/.env.staging-local
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
KEYCLOAK_REALM=SBO
KEYCLOAK_ISSUER=https://staging.openbraininstitute.org/auth/realms/SBO
KEYCLOAK_CLIENT_ID=obp-core-web-app-dev
KEYCLOAK_CLIENT_SECRET=dummy-secret
Expand Down Expand Up @@ -35,4 +36,5 @@ NEXT_PUBLIC_LEGACY_DEFAULT_CIRCUIT_ID="https://bbp.epfl.ch/data/bbp/mmb-point-ne

NEXT_PUBLIC_SENTRY_DSN='https://4ab8c9fedfd77b1016de8f1aeef34c65@o4508608744587264.ingest.de.sentry.io/4509015226712144'
NEXT_PUBLIC_SENTRY_ORG=openbraininstitute
NEXT_PUBLIC_SENTRY_PRJ=core-web-app
NEXT_PUBLIC_SENTRY_PRJ=core-web-app
AUTH_MANAGER_VAULT_STORAGE=pg
27 changes: 0 additions & 27 deletions Dockerfile.dev

This file was deleted.

59 changes: 0 additions & 59 deletions docker-compose.dev.yml

This file was deleted.

50 changes: 0 additions & 50 deletions docker-compose.yml

This file was deleted.

16 changes: 16 additions & 0 deletions drizzle.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { defineConfig, Config } from 'drizzle-kit';
import * as dotenv from 'dotenv';
import { env } from '@/env';

dotenv.config({ path: '.env.local' });

export default defineConfig({
schema: './src/services/auth-manager/db/schema.ts',
out: './drizzle/migrations',
dialect: 'postgresql',
dbCredentials: {
url: env.AUTH_MANAGER_DATABASE_URL!,
},
verbose: true,
strict: true,
}) as Config;
18 changes: 18 additions & 0 deletions drizzle/migrations/0000_flat_rafael_vega.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
CREATE TYPE "public"."auth_token_status" AS ENUM('pending', 'active', 'failed', 'undefined');--> statement-breakpoint
CREATE TYPE "public"."auth_token_type" AS ENUM('offline', 'refresh');--> statement-breakpoint
CREATE TABLE "auth_vault" (
"id" uuid PRIMARY KEY DEFAULT 'b523167e-8d92-4f07-97b7-d3f82e25f83a' NOT NULL,
"user_id" uuid NOT NULL,
"token_type" "auth_token_type" NOT NULL,
"encrypted_token" text,
"iv" text,
"token_hash" text,
"metadata" jsonb,
"status" "auth_token_status",
"session_state" text,
"created_at" timestamp DEFAULT now() NOT NULL
);
--> statement-breakpoint
CREATE INDEX "auth_vault_user_id_token_type_idx" ON "auth_vault" USING btree ("user_id","token_type" DESC NULLS LAST);--> statement-breakpoint
CREATE INDEX "auth_vault_session_state_idx" ON "auth_vault" USING btree ("session_state");--> statement-breakpoint
CREATE INDEX "auth_vault_token_hash_idx" ON "auth_vault" USING btree ("token_hash");
Loading
Loading