removed further class files
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -32,3 +32,4 @@
|
|||||||
/cygnus-cloud-client/target
|
/cygnus-cloud-client/target
|
||||||
/cygnus-installer/src/test
|
/cygnus-installer/src/test
|
||||||
/cygnus-cloud-client/target
|
/cygnus-cloud-client/target
|
||||||
|
/cygnus-cloud-service/target
|
||||||
|
|||||||
@@ -1,79 +0,0 @@
|
|||||||
spring:
|
|
||||||
application:
|
|
||||||
name: cygnus-cloud-service
|
|
||||||
mail:
|
|
||||||
host: ${CYGNUS_MAIL_HOST:}
|
|
||||||
port: ${CYGNUS_MAIL_PORT:587}
|
|
||||||
username: ${CYGNUS_MAIL_USERNAME:}
|
|
||||||
password: ${CYGNUS_MAIL_PASSWORD:}
|
|
||||||
properties:
|
|
||||||
mail:
|
|
||||||
smtp:
|
|
||||||
auth: ${CYGNUS_MAIL_SMTP_AUTH:true}
|
|
||||||
starttls:
|
|
||||||
enable: ${CYGNUS_MAIL_STARTTLS:true}
|
|
||||||
data:
|
|
||||||
redis:
|
|
||||||
host: ${REDIS_HOST:192.168.0.111}
|
|
||||||
port: ${REDIS_PORT:7901}
|
|
||||||
password: ${REDIS_PASSWORD:}
|
|
||||||
connect-timeout: ${REDIS_CONNECT_TIMEOUT:3s}
|
|
||||||
timeout: ${REDIS_COMMAND_TIMEOUT:3s}
|
|
||||||
lettuce:
|
|
||||||
pool:
|
|
||||||
max-active: ${REDIS_MAX_ACTIVE:20}
|
|
||||||
max-idle: ${REDIS_MAX_IDLE:10}
|
|
||||||
min-idle: ${REDIS_MIN_IDLE:1}
|
|
||||||
max-wait: ${REDIS_MAX_WAIT:2s}
|
|
||||||
|
|
||||||
cygnus:
|
|
||||||
database:
|
|
||||||
host: ${DB_HOST:192.168.0.111}
|
|
||||||
port: ${DB_PORT:5432}
|
|
||||||
database: ${DB_NAME:matrix}
|
|
||||||
username: ${DB_USER:postgres}
|
|
||||||
password: ${DB_PASSWORD:}
|
|
||||||
ssl: ${DB_SSL:false}
|
|
||||||
connect-timeout: ${DB_CONNECT_TIMEOUT:3s}
|
|
||||||
pool-size: ${DB_POOL_SIZE:20}
|
|
||||||
pool-wait-queue-size: ${DB_POOL_WAIT_QUEUE_SIZE:100}
|
|
||||||
security:
|
|
||||||
enabled: ${CYGNUS_SECURITY_ENABLED:false}
|
|
||||||
issuer-uri: ${CYGNUS_JWT_ISSUER_URI:http://localhost:8090}
|
|
||||||
audience: ${CYGNUS_JWT_AUDIENCE:cygnus-cloud-api}
|
|
||||||
token-audience: ${CYGNUS_TOKEN_AUDIENCE:http://localhost:8090/oauth2/token}
|
|
||||||
assertion-ttl: ${CYGNUS_ASSERTION_TTL:370d}
|
|
||||||
access-token-ttl: ${CYGNUS_ACCESS_TOKEN_TTL:20m}
|
|
||||||
assertion-decryption-private-key: ${CYGNUS_ASSERTION_DECRYPTION_PRIVATE_KEY:file:./config/keys/assertion-decryption-private.pem}
|
|
||||||
access-token-private-key: ${CYGNUS_ACCESS_TOKEN_PRIVATE_KEY:file:./config/keys/access-token-private.pem}
|
|
||||||
access-token-public-key: ${CYGNUS_ACCESS_TOKEN_PUBLIC_KEY:file:./config/keys/access-token-public.pem}
|
|
||||||
login-encryption:
|
|
||||||
key-id: ${CYGNUS_LOGIN_KEY_ID:cygnus-login-2026-01}
|
|
||||||
private-key-location: ${CYGNUS_LOGIN_PRIVATE_KEY:file:./config/keys/login-private.pem}
|
|
||||||
payload-ttl: ${CYGNUS_LOGIN_PAYLOAD_TTL:5m}
|
|
||||||
cache:
|
|
||||||
key-prefix: ${CYGNUS_CACHE_PREFIX:cygnus}
|
|
||||||
default-ttl: ${CYGNUS_CACHE_TTL:10m}
|
|
||||||
registration-email:
|
|
||||||
from: ${CYGNUS_REGISTRATION_EMAIL_FROM:noreply@cygnus.invalid}
|
|
||||||
activation-rate-limit:
|
|
||||||
maximum-attempts: ${CYGNUS_ACTIVATION_MAX_ATTEMPTS:10}
|
|
||||||
window: ${CYGNUS_ACTIVATION_RATE_WINDOW:10m}
|
|
||||||
|
|
||||||
server:
|
|
||||||
port: ${CYGNUS_CLOUD_PORT:8090}
|
|
||||||
shutdown: graceful
|
|
||||||
|
|
||||||
management:
|
|
||||||
endpoints:
|
|
||||||
web:
|
|
||||||
exposure:
|
|
||||||
include: health,info
|
|
||||||
endpoint:
|
|
||||||
health:
|
|
||||||
show-details: never
|
|
||||||
|
|
||||||
info:
|
|
||||||
app:
|
|
||||||
name: ${spring.application.name}
|
|
||||||
version: 1.0.0-SNAPSHOT
|
|
||||||
@@ -1,217 +0,0 @@
|
|||||||
BEGIN;
|
|
||||||
|
|
||||||
CREATE SCHEMA IF NOT EXISTS identity;
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS identity.company
|
|
||||||
(LIKE public.company INCLUDING ALL);
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS identity.company_branch
|
|
||||||
(LIKE public.company_branch INCLUDING ALL);
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS identity.user_group
|
|
||||||
(LIKE public.user_group INCLUDING ALL);
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS identity.app_user
|
|
||||||
(LIKE public.app_user INCLUDING ALL);
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS identity.pages
|
|
||||||
(LIKE public.pages INCLUDING ALL);
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS identity.permission
|
|
||||||
(LIKE public.permission INCLUDING ALL);
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS identity.denied_pages
|
|
||||||
(LIKE public.denied_pages INCLUDING ALL);
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS identity.user_loginhistory
|
|
||||||
(LIKE public.user_loginhistory INCLUDING ALL);
|
|
||||||
|
|
||||||
CREATE SEQUENCE IF NOT EXISTS identity.app_user_user_id_seq
|
|
||||||
AS smallint MAXVALUE 32767;
|
|
||||||
CREATE SEQUENCE IF NOT EXISTS identity.company_company_id_seq
|
|
||||||
AS smallint MAXVALUE 32767;
|
|
||||||
CREATE SEQUENCE IF NOT EXISTS identity.company_branch_branch_id_seq
|
|
||||||
AS smallint MAXVALUE 32767;
|
|
||||||
CREATE SEQUENCE IF NOT EXISTS identity.user_group_group_id_seq
|
|
||||||
AS smallint MAXVALUE 32767;
|
|
||||||
CREATE SEQUENCE IF NOT EXISTS identity.pages_page_id_seq
|
|
||||||
AS smallint MAXVALUE 32767;
|
|
||||||
CREATE SEQUENCE IF NOT EXISTS identity.permission_permission_id_seq
|
|
||||||
AS integer;
|
|
||||||
CREATE SEQUENCE IF NOT EXISTS identity.denied_pages_uid_seq
|
|
||||||
AS integer;
|
|
||||||
CREATE SEQUENCE IF NOT EXISTS identity.user_loginhistory_uid_seq
|
|
||||||
AS bigint;
|
|
||||||
|
|
||||||
ALTER TABLE identity.app_user
|
|
||||||
ALTER COLUMN user_id SET DEFAULT nextval('identity.app_user_user_id_seq');
|
|
||||||
ALTER TABLE identity.company
|
|
||||||
ALTER COLUMN company_id SET DEFAULT nextval('identity.company_company_id_seq');
|
|
||||||
ALTER TABLE identity.company_branch
|
|
||||||
ALTER COLUMN branch_id SET DEFAULT nextval('identity.company_branch_branch_id_seq');
|
|
||||||
ALTER TABLE identity.user_group
|
|
||||||
ALTER COLUMN group_id SET DEFAULT nextval('identity.user_group_group_id_seq');
|
|
||||||
ALTER TABLE identity.pages
|
|
||||||
ALTER COLUMN page_id SET DEFAULT nextval('identity.pages_page_id_seq');
|
|
||||||
ALTER TABLE identity.permission
|
|
||||||
ALTER COLUMN permission_id SET DEFAULT nextval('identity.permission_permission_id_seq');
|
|
||||||
ALTER TABLE identity.denied_pages
|
|
||||||
ALTER COLUMN uid SET DEFAULT nextval('identity.denied_pages_uid_seq');
|
|
||||||
ALTER TABLE identity.user_loginhistory
|
|
||||||
ALTER COLUMN uid SET DEFAULT nextval('identity.user_loginhistory_uid_seq');
|
|
||||||
ALTER TABLE identity.user_loginhistory
|
|
||||||
ALTER COLUMN ipaddr TYPE character varying(45);
|
|
||||||
|
|
||||||
INSERT INTO identity.company
|
|
||||||
SELECT * FROM public.company
|
|
||||||
ON CONFLICT (company_id) DO UPDATE SET
|
|
||||||
companyname = EXCLUDED.companyname,
|
|
||||||
companycode = EXCLUDED.companycode,
|
|
||||||
servicetaxno = EXCLUDED.servicetaxno,
|
|
||||||
panno = EXCLUDED.panno,
|
|
||||||
createdon = EXCLUDED.createdon,
|
|
||||||
isactive = EXCLUDED.isactive,
|
|
||||||
cinno = EXCLUDED.cinno;
|
|
||||||
|
|
||||||
INSERT INTO identity.company_branch
|
|
||||||
SELECT * FROM public.company_branch
|
|
||||||
ON CONFLICT (branch_id) DO UPDATE SET
|
|
||||||
company_id = EXCLUDED.company_id,
|
|
||||||
branchname = EXCLUDED.branchname,
|
|
||||||
branchcode = EXCLUDED.branchcode,
|
|
||||||
address1 = EXCLUDED.address1,
|
|
||||||
address2 = EXCLUDED.address2,
|
|
||||||
address3 = EXCLUDED.address3,
|
|
||||||
city = EXCLUDED.city,
|
|
||||||
pincode = EXCLUDED.pincode,
|
|
||||||
landlineno = EXCLUDED.landlineno,
|
|
||||||
faxno = EXCLUDED.faxno,
|
|
||||||
emailid = EXCLUDED.emailid,
|
|
||||||
contactperson1 = EXCLUDED.contactperson1,
|
|
||||||
contactno1 = EXCLUDED.contactno1,
|
|
||||||
emailid1 = EXCLUDED.emailid1,
|
|
||||||
contactperson2 = EXCLUDED.contactperson2,
|
|
||||||
contactno2 = EXCLUDED.contactno2,
|
|
||||||
emailid2 = EXCLUDED.emailid2,
|
|
||||||
isactive = EXCLUDED.isactive,
|
|
||||||
createdon = EXCLUDED.createdon,
|
|
||||||
gstin = EXCLUDED.gstin,
|
|
||||||
cgst = EXCLUDED.cgst,
|
|
||||||
sgst = EXCLUDED.sgst,
|
|
||||||
igst = EXCLUDED.igst;
|
|
||||||
|
|
||||||
INSERT INTO identity.user_group
|
|
||||||
SELECT * FROM public.user_group
|
|
||||||
ON CONFLICT (group_id) DO UPDATE SET
|
|
||||||
name = EXCLUDED.name,
|
|
||||||
department_id = EXCLUDED.department_id,
|
|
||||||
createdon = EXCLUDED.createdon,
|
|
||||||
createdby = EXCLUDED.createdby,
|
|
||||||
lasteditedon = EXCLUDED.lasteditedon,
|
|
||||||
lasteditedby = EXCLUDED.lasteditedby,
|
|
||||||
isactive = EXCLUDED.isactive;
|
|
||||||
|
|
||||||
INSERT INTO identity.app_user
|
|
||||||
SELECT * FROM public.app_user
|
|
||||||
ON CONFLICT (user_id) DO UPDATE SET
|
|
||||||
loginid = EXCLUDED.loginid,
|
|
||||||
displayname = EXCLUDED.displayname,
|
|
||||||
loginpassword = EXCLUDED.loginpassword,
|
|
||||||
group_id = EXCLUDED.group_id,
|
|
||||||
createdon = EXCLUDED.createdon,
|
|
||||||
createdby = EXCLUDED.createdby,
|
|
||||||
activatedon = EXCLUDED.activatedon,
|
|
||||||
activatedby = EXCLUDED.activatedby,
|
|
||||||
lasteditedon = EXCLUDED.lasteditedon,
|
|
||||||
lasteditedby = EXCLUDED.lasteditedby,
|
|
||||||
branch_id = EXCLUDED.branch_id,
|
|
||||||
company_id = EXCLUDED.company_id,
|
|
||||||
isactive = EXCLUDED.isactive,
|
|
||||||
team_id = EXCLUDED.team_id,
|
|
||||||
emailid = EXCLUDED.emailid,
|
|
||||||
entry_time = EXCLUDED.entry_time;
|
|
||||||
|
|
||||||
INSERT INTO identity.pages
|
|
||||||
SELECT * FROM public.pages
|
|
||||||
ON CONFLICT (page_id) DO UPDATE SET
|
|
||||||
menulabel = EXCLUDED.menulabel,
|
|
||||||
targeturl = EXCLUDED.targeturl,
|
|
||||||
parentpage = EXCLUDED.parentpage,
|
|
||||||
targetwindow = EXCLUDED.targetwindow,
|
|
||||||
pageorder = EXCLUDED.pageorder,
|
|
||||||
isvisible = EXCLUDED.isvisible;
|
|
||||||
|
|
||||||
INSERT INTO identity.permission
|
|
||||||
SELECT * FROM public.permission
|
|
||||||
ON CONFLICT (permission_id) DO UPDATE SET
|
|
||||||
page_id = EXCLUDED.page_id,
|
|
||||||
group_id = EXCLUDED.group_id,
|
|
||||||
lasteditedon = EXCLUDED.lasteditedon,
|
|
||||||
lasteditedby = EXCLUDED.lasteditedby,
|
|
||||||
permission = EXCLUDED.permission,
|
|
||||||
requestval = EXCLUDED.requestval;
|
|
||||||
|
|
||||||
INSERT INTO identity.denied_pages
|
|
||||||
SELECT * FROM public.denied_pages
|
|
||||||
ON CONFLICT (uid) DO UPDATE SET
|
|
||||||
page_id = EXCLUDED.page_id,
|
|
||||||
user_id = EXCLUDED.user_id,
|
|
||||||
isdenied = EXCLUDED.isdenied;
|
|
||||||
|
|
||||||
INSERT INTO identity.user_loginhistory
|
|
||||||
SELECT * FROM public.user_loginhistory
|
|
||||||
ON CONFLICT (uid) DO UPDATE SET
|
|
||||||
loginid = EXCLUDED.loginid,
|
|
||||||
logintime = EXCLUDED.logintime,
|
|
||||||
logouttime = EXCLUDED.logouttime,
|
|
||||||
ipaddr = EXCLUDED.ipaddr,
|
|
||||||
user_id = EXCLUDED.user_id;
|
|
||||||
|
|
||||||
CREATE INDEX IF NOT EXISTS ix_identity_app_user_loginid_ci
|
|
||||||
ON identity.app_user (upper(loginid));
|
|
||||||
CREATE INDEX IF NOT EXISTS ix_identity_permission_group_page
|
|
||||||
ON identity.permission (group_id, page_id)
|
|
||||||
WHERE permission <> '000';
|
|
||||||
CREATE INDEX IF NOT EXISTS ix_identity_pages_menu
|
|
||||||
ON identity.pages (parentpage, pageorder DESC)
|
|
||||||
WHERE isvisible = 1;
|
|
||||||
CREATE INDEX IF NOT EXISTS ix_identity_denied_pages_user_page
|
|
||||||
ON identity.denied_pages (user_id, page_id)
|
|
||||||
WHERE isdenied = 1;
|
|
||||||
CREATE INDEX IF NOT EXISTS ix_identity_login_history_user_time
|
|
||||||
ON identity.user_loginhistory (user_id, logintime DESC);
|
|
||||||
|
|
||||||
SELECT setval(
|
|
||||||
'identity.app_user_user_id_seq',
|
|
||||||
GREATEST(COALESCE((SELECT max(user_id) FROM identity.app_user), 1), 1),
|
|
||||||
EXISTS (SELECT 1 FROM identity.app_user));
|
|
||||||
SELECT setval(
|
|
||||||
'identity.company_company_id_seq',
|
|
||||||
GREATEST(COALESCE((SELECT max(company_id) FROM identity.company), 1), 1),
|
|
||||||
EXISTS (SELECT 1 FROM identity.company));
|
|
||||||
SELECT setval(
|
|
||||||
'identity.company_branch_branch_id_seq',
|
|
||||||
GREATEST(COALESCE((SELECT max(branch_id) FROM identity.company_branch), 1), 1),
|
|
||||||
EXISTS (SELECT 1 FROM identity.company_branch));
|
|
||||||
SELECT setval(
|
|
||||||
'identity.user_group_group_id_seq',
|
|
||||||
GREATEST(COALESCE((SELECT max(group_id) FROM identity.user_group), 1), 1),
|
|
||||||
EXISTS (SELECT 1 FROM identity.user_group));
|
|
||||||
SELECT setval(
|
|
||||||
'identity.pages_page_id_seq',
|
|
||||||
GREATEST(COALESCE((SELECT max(page_id) FROM identity.pages), 1), 1),
|
|
||||||
EXISTS (SELECT 1 FROM identity.pages));
|
|
||||||
SELECT setval(
|
|
||||||
'identity.permission_permission_id_seq',
|
|
||||||
GREATEST(COALESCE((SELECT max(permission_id) FROM identity.permission), 1), 1),
|
|
||||||
EXISTS (SELECT 1 FROM identity.permission));
|
|
||||||
SELECT setval(
|
|
||||||
'identity.denied_pages_uid_seq',
|
|
||||||
GREATEST(COALESCE((SELECT max(uid) FROM identity.denied_pages), 1), 1),
|
|
||||||
EXISTS (SELECT 1 FROM identity.denied_pages));
|
|
||||||
SELECT setval(
|
|
||||||
'identity.user_loginhistory_uid_seq',
|
|
||||||
GREATEST(COALESCE((SELECT max(uid) FROM identity.user_loginhistory), 1), 1),
|
|
||||||
EXISTS (SELECT 1 FROM identity.user_loginhistory));
|
|
||||||
|
|
||||||
COMMIT;
|
|
||||||
@@ -1,153 +0,0 @@
|
|||||||
BEGIN;
|
|
||||||
|
|
||||||
-- DMLP phase 2: introduce the tenant, installation and license source of truth.
|
|
||||||
-- The fixed legacy tenant is a migration bridge for the identity data copied by
|
|
||||||
-- 001_identity_login_schema.sql. Replace its migration license through the
|
|
||||||
-- administration workflow before commercial enforcement is enabled.
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS identity.client_account (
|
|
||||||
tenant_id uuid PRIMARY KEY,
|
|
||||||
client_slug character varying(80) NOT NULL,
|
|
||||||
client_name character varying(200) NOT NULL,
|
|
||||||
status character varying(20) NOT NULL,
|
|
||||||
created_at timestamp with time zone NOT NULL DEFAULT now(),
|
|
||||||
updated_at timestamp with time zone NOT NULL DEFAULT now(),
|
|
||||||
CONSTRAINT uq_identity_client_account_slug UNIQUE (client_slug),
|
|
||||||
CONSTRAINT ck_identity_client_account_slug
|
|
||||||
CHECK (client_slug ~ '^[a-z0-9]+(?:-[a-z0-9]+)*$'),
|
|
||||||
CONSTRAINT ck_identity_client_account_status
|
|
||||||
CHECK (status IN ('ACTIVE', 'SUSPENDED', 'CANCELLED'))
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS identity.client_installation (
|
|
||||||
installation_id uuid PRIMARY KEY,
|
|
||||||
tenant_id uuid NOT NULL,
|
|
||||||
client_id character varying(80) NOT NULL,
|
|
||||||
installation_code character varying(100) NOT NULL,
|
|
||||||
assertion_public_key text NOT NULL,
|
|
||||||
allowed_scopes text[] NOT NULL DEFAULT ARRAY[]::text[],
|
|
||||||
enabled boolean NOT NULL DEFAULT true,
|
|
||||||
security_version integer NOT NULL DEFAULT 1,
|
|
||||||
last_authenticated_at timestamp with time zone,
|
|
||||||
created_at timestamp with time zone NOT NULL DEFAULT now(),
|
|
||||||
updated_at timestamp with time zone NOT NULL DEFAULT now(),
|
|
||||||
CONSTRAINT fk_identity_installation_tenant
|
|
||||||
FOREIGN KEY (tenant_id)
|
|
||||||
REFERENCES identity.client_account (tenant_id),
|
|
||||||
CONSTRAINT uq_identity_installation_client_code
|
|
||||||
UNIQUE (client_id, installation_code),
|
|
||||||
CONSTRAINT ck_identity_installation_client_id
|
|
||||||
CHECK (client_id ~ '^[A-Za-z0-9][A-Za-z0-9_-]*$'),
|
|
||||||
CONSTRAINT ck_identity_installation_code
|
|
||||||
CHECK (installation_code ~ '^[A-Za-z0-9][A-Za-z0-9_-]*$'),
|
|
||||||
CONSTRAINT ck_identity_installation_security_version
|
|
||||||
CHECK (security_version > 0)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS identity.client_license (
|
|
||||||
license_id uuid PRIMARY KEY,
|
|
||||||
tenant_id uuid NOT NULL,
|
|
||||||
license_type character varying(30) NOT NULL,
|
|
||||||
package_code character varying(50) NOT NULL,
|
|
||||||
valid_from timestamp with time zone NOT NULL,
|
|
||||||
valid_until timestamp with time zone NOT NULL,
|
|
||||||
status character varying(20) NOT NULL,
|
|
||||||
max_users integer,
|
|
||||||
max_installations integer,
|
|
||||||
created_at timestamp with time zone NOT NULL DEFAULT now(),
|
|
||||||
updated_at timestamp with time zone NOT NULL DEFAULT now(),
|
|
||||||
CONSTRAINT fk_identity_license_tenant
|
|
||||||
FOREIGN KEY (tenant_id)
|
|
||||||
REFERENCES identity.client_account (tenant_id),
|
|
||||||
CONSTRAINT ck_identity_license_period
|
|
||||||
CHECK (valid_until > valid_from),
|
|
||||||
CONSTRAINT ck_identity_license_status
|
|
||||||
CHECK (status IN ('ACTIVE', 'SUSPENDED', 'EXPIRED', 'CANCELLED')),
|
|
||||||
CONSTRAINT ck_identity_license_limits
|
|
||||||
CHECK ((max_users IS NULL OR max_users > 0)
|
|
||||||
AND (max_installations IS NULL OR max_installations > 0))
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX IF NOT EXISTS ix_identity_installation_tenant_enabled
|
|
||||||
ON identity.client_installation (tenant_id, enabled);
|
|
||||||
CREATE INDEX IF NOT EXISTS ix_identity_installation_lookup
|
|
||||||
ON identity.client_installation (client_id, installation_code, enabled);
|
|
||||||
CREATE INDEX IF NOT EXISTS ix_identity_license_tenant_period
|
|
||||||
ON identity.client_license (tenant_id, status, valid_from, valid_until);
|
|
||||||
|
|
||||||
-- Add tenant ownership without changing any legacy primary-key values.
|
|
||||||
ALTER TABLE identity.company
|
|
||||||
ADD COLUMN IF NOT EXISTS tenant_id uuid;
|
|
||||||
ALTER TABLE identity.company_branch
|
|
||||||
ADD COLUMN IF NOT EXISTS tenant_id uuid;
|
|
||||||
ALTER TABLE identity.user_group
|
|
||||||
ADD COLUMN IF NOT EXISTS tenant_id uuid;
|
|
||||||
ALTER TABLE identity.app_user
|
|
||||||
ADD COLUMN IF NOT EXISTS tenant_id uuid;
|
|
||||||
ALTER TABLE identity.permission
|
|
||||||
ADD COLUMN IF NOT EXISTS tenant_id uuid;
|
|
||||||
ALTER TABLE identity.denied_pages
|
|
||||||
ADD COLUMN IF NOT EXISTS tenant_id uuid;
|
|
||||||
ALTER TABLE identity.user_loginhistory
|
|
||||||
ADD COLUMN IF NOT EXISTS tenant_id uuid;
|
|
||||||
|
|
||||||
-- Seed a stable bridge tenant for all identity data that already exists.
|
|
||||||
INSERT INTO identity.client_account
|
|
||||||
(tenant_id, client_slug, client_name, status)
|
|
||||||
VALUES ('00000000-0000-4000-8000-000000000001', 'matrix', 'Matrix', 'ACTIVE')
|
|
||||||
ON CONFLICT (tenant_id) DO UPDATE SET
|
|
||||||
client_slug = EXCLUDED.client_slug,
|
|
||||||
client_name = EXCLUDED.client_name,
|
|
||||||
updated_at = now();
|
|
||||||
|
|
||||||
-- A non-expiring migration bridge keeps current users operational. It must be
|
|
||||||
-- replaced by a commercial license before license administration goes live.
|
|
||||||
INSERT INTO identity.client_license
|
|
||||||
(license_id, tenant_id, license_type, package_code,
|
|
||||||
valid_from, valid_until, status)
|
|
||||||
VALUES ('00000000-0000-4000-8000-000000000002',
|
|
||||||
'00000000-0000-4000-8000-000000000001',
|
|
||||||
'MIGRATION', 'LEGACY_FULL',
|
|
||||||
'2020-01-01 00:00:00+00', '2099-12-31 23:59:59+00', 'ACTIVE')
|
|
||||||
ON CONFLICT (license_id) DO NOTHING;
|
|
||||||
|
|
||||||
UPDATE identity.company
|
|
||||||
SET tenant_id = '00000000-0000-4000-8000-000000000001'
|
|
||||||
WHERE tenant_id IS NULL;
|
|
||||||
UPDATE identity.company_branch
|
|
||||||
SET tenant_id = '00000000-0000-4000-8000-000000000001'
|
|
||||||
WHERE tenant_id IS NULL;
|
|
||||||
UPDATE identity.user_group
|
|
||||||
SET tenant_id = '00000000-0000-4000-8000-000000000001'
|
|
||||||
WHERE tenant_id IS NULL;
|
|
||||||
UPDATE identity.app_user
|
|
||||||
SET tenant_id = '00000000-0000-4000-8000-000000000001'
|
|
||||||
WHERE tenant_id IS NULL;
|
|
||||||
UPDATE identity.permission
|
|
||||||
SET tenant_id = '00000000-0000-4000-8000-000000000001'
|
|
||||||
WHERE tenant_id IS NULL;
|
|
||||||
UPDATE identity.denied_pages
|
|
||||||
SET tenant_id = '00000000-0000-4000-8000-000000000001'
|
|
||||||
WHERE tenant_id IS NULL;
|
|
||||||
UPDATE identity.user_loginhistory
|
|
||||||
SET tenant_id = '00000000-0000-4000-8000-000000000001'
|
|
||||||
WHERE tenant_id IS NULL;
|
|
||||||
|
|
||||||
CREATE INDEX IF NOT EXISTS ix_identity_company_tenant
|
|
||||||
ON identity.company (tenant_id, company_id);
|
|
||||||
CREATE INDEX IF NOT EXISTS ix_identity_branch_tenant
|
|
||||||
ON identity.company_branch (tenant_id, company_id, branch_id);
|
|
||||||
CREATE INDEX IF NOT EXISTS ix_identity_group_tenant
|
|
||||||
ON identity.user_group (tenant_id, group_id);
|
|
||||||
CREATE INDEX IF NOT EXISTS ix_identity_user_tenant_login
|
|
||||||
ON identity.app_user (tenant_id, upper(loginid));
|
|
||||||
CREATE INDEX IF NOT EXISTS ix_identity_permission_tenant_group_page
|
|
||||||
ON identity.permission (tenant_id, group_id, page_id)
|
|
||||||
WHERE permission <> '000';
|
|
||||||
CREATE INDEX IF NOT EXISTS ix_identity_denied_tenant_user_page
|
|
||||||
ON identity.denied_pages (tenant_id, user_id, page_id)
|
|
||||||
WHERE isdenied = 1;
|
|
||||||
CREATE INDEX IF NOT EXISTS ix_identity_login_history_tenant_user_time
|
|
||||||
ON identity.user_loginhistory (tenant_id, user_id, logintime DESC);
|
|
||||||
|
|
||||||
COMMIT;
|
|
||||||
@@ -1,231 +0,0 @@
|
|||||||
BEGIN;
|
|
||||||
|
|
||||||
-- DMLP phase 3: make tenant ownership mandatory and enforce same-tenant
|
|
||||||
-- relationships without changing any legacy primary keys.
|
|
||||||
|
|
||||||
ALTER TABLE identity.company
|
|
||||||
ALTER COLUMN tenant_id SET NOT NULL;
|
|
||||||
ALTER TABLE identity.company_branch
|
|
||||||
ALTER COLUMN tenant_id SET NOT NULL;
|
|
||||||
ALTER TABLE identity.user_group
|
|
||||||
ALTER COLUMN tenant_id SET NOT NULL;
|
|
||||||
ALTER TABLE identity.app_user
|
|
||||||
ALTER COLUMN tenant_id SET NOT NULL;
|
|
||||||
ALTER TABLE identity.permission
|
|
||||||
ALTER COLUMN tenant_id SET NOT NULL;
|
|
||||||
ALTER TABLE identity.denied_pages
|
|
||||||
ALTER COLUMN tenant_id SET NOT NULL;
|
|
||||||
ALTER TABLE identity.user_loginhistory
|
|
||||||
ALTER COLUMN tenant_id SET NOT NULL;
|
|
||||||
|
|
||||||
CREATE UNIQUE INDEX IF NOT EXISTS uq_identity_company_tenant_id
|
|
||||||
ON identity.company (tenant_id, company_id);
|
|
||||||
CREATE UNIQUE INDEX IF NOT EXISTS uq_identity_branch_tenant_id
|
|
||||||
ON identity.company_branch (tenant_id, branch_id, company_id);
|
|
||||||
CREATE UNIQUE INDEX IF NOT EXISTS uq_identity_group_tenant_id
|
|
||||||
ON identity.user_group (tenant_id, group_id);
|
|
||||||
CREATE UNIQUE INDEX IF NOT EXISTS uq_identity_user_tenant_id
|
|
||||||
ON identity.app_user (tenant_id, user_id);
|
|
||||||
|
|
||||||
DO $migration$
|
|
||||||
BEGIN
|
|
||||||
IF NOT EXISTS (
|
|
||||||
SELECT 1 FROM pg_constraint
|
|
||||||
WHERE conname = 'fk_identity_company_tenant'
|
|
||||||
AND conrelid = 'identity.company'::regclass) THEN
|
|
||||||
ALTER TABLE identity.company
|
|
||||||
ADD CONSTRAINT fk_identity_company_tenant
|
|
||||||
FOREIGN KEY (tenant_id)
|
|
||||||
REFERENCES identity.client_account (tenant_id)
|
|
||||||
NOT VALID;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT EXISTS (
|
|
||||||
SELECT 1 FROM pg_constraint
|
|
||||||
WHERE conname = 'fk_identity_branch_tenant'
|
|
||||||
AND conrelid = 'identity.company_branch'::regclass) THEN
|
|
||||||
ALTER TABLE identity.company_branch
|
|
||||||
ADD CONSTRAINT fk_identity_branch_tenant
|
|
||||||
FOREIGN KEY (tenant_id)
|
|
||||||
REFERENCES identity.client_account (tenant_id)
|
|
||||||
NOT VALID;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT EXISTS (
|
|
||||||
SELECT 1 FROM pg_constraint
|
|
||||||
WHERE conname = 'fk_identity_branch_company_tenant'
|
|
||||||
AND conrelid = 'identity.company_branch'::regclass) THEN
|
|
||||||
ALTER TABLE identity.company_branch
|
|
||||||
ADD CONSTRAINT fk_identity_branch_company_tenant
|
|
||||||
FOREIGN KEY (tenant_id, company_id)
|
|
||||||
REFERENCES identity.company (tenant_id, company_id)
|
|
||||||
NOT VALID;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT EXISTS (
|
|
||||||
SELECT 1 FROM pg_constraint
|
|
||||||
WHERE conname = 'fk_identity_group_tenant'
|
|
||||||
AND conrelid = 'identity.user_group'::regclass) THEN
|
|
||||||
ALTER TABLE identity.user_group
|
|
||||||
ADD CONSTRAINT fk_identity_group_tenant
|
|
||||||
FOREIGN KEY (tenant_id)
|
|
||||||
REFERENCES identity.client_account (tenant_id)
|
|
||||||
NOT VALID;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT EXISTS (
|
|
||||||
SELECT 1 FROM pg_constraint
|
|
||||||
WHERE conname = 'fk_identity_user_tenant'
|
|
||||||
AND conrelid = 'identity.app_user'::regclass) THEN
|
|
||||||
ALTER TABLE identity.app_user
|
|
||||||
ADD CONSTRAINT fk_identity_user_tenant
|
|
||||||
FOREIGN KEY (tenant_id)
|
|
||||||
REFERENCES identity.client_account (tenant_id)
|
|
||||||
NOT VALID;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT EXISTS (
|
|
||||||
SELECT 1 FROM pg_constraint
|
|
||||||
WHERE conname = 'fk_identity_user_group_tenant'
|
|
||||||
AND conrelid = 'identity.app_user'::regclass) THEN
|
|
||||||
ALTER TABLE identity.app_user
|
|
||||||
ADD CONSTRAINT fk_identity_user_group_tenant
|
|
||||||
FOREIGN KEY (tenant_id, group_id)
|
|
||||||
REFERENCES identity.user_group (tenant_id, group_id)
|
|
||||||
NOT VALID;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT EXISTS (
|
|
||||||
SELECT 1 FROM pg_constraint
|
|
||||||
WHERE conname = 'fk_identity_user_company_tenant'
|
|
||||||
AND conrelid = 'identity.app_user'::regclass) THEN
|
|
||||||
ALTER TABLE identity.app_user
|
|
||||||
ADD CONSTRAINT fk_identity_user_company_tenant
|
|
||||||
FOREIGN KEY (tenant_id, company_id)
|
|
||||||
REFERENCES identity.company (tenant_id, company_id)
|
|
||||||
NOT VALID;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT EXISTS (
|
|
||||||
SELECT 1 FROM pg_constraint
|
|
||||||
WHERE conname = 'fk_identity_user_branch_tenant'
|
|
||||||
AND conrelid = 'identity.app_user'::regclass) THEN
|
|
||||||
ALTER TABLE identity.app_user
|
|
||||||
ADD CONSTRAINT fk_identity_user_branch_tenant
|
|
||||||
FOREIGN KEY (tenant_id, branch_id, company_id)
|
|
||||||
REFERENCES identity.company_branch (tenant_id, branch_id, company_id)
|
|
||||||
NOT VALID;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT EXISTS (
|
|
||||||
SELECT 1 FROM pg_constraint
|
|
||||||
WHERE conname = 'fk_identity_permission_tenant'
|
|
||||||
AND conrelid = 'identity.permission'::regclass) THEN
|
|
||||||
ALTER TABLE identity.permission
|
|
||||||
ADD CONSTRAINT fk_identity_permission_tenant
|
|
||||||
FOREIGN KEY (tenant_id)
|
|
||||||
REFERENCES identity.client_account (tenant_id)
|
|
||||||
NOT VALID;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT EXISTS (
|
|
||||||
SELECT 1 FROM pg_constraint
|
|
||||||
WHERE conname = 'fk_identity_permission_group_tenant'
|
|
||||||
AND conrelid = 'identity.permission'::regclass) THEN
|
|
||||||
ALTER TABLE identity.permission
|
|
||||||
ADD CONSTRAINT fk_identity_permission_group_tenant
|
|
||||||
FOREIGN KEY (tenant_id, group_id)
|
|
||||||
REFERENCES identity.user_group (tenant_id, group_id)
|
|
||||||
NOT VALID;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT EXISTS (
|
|
||||||
SELECT 1 FROM pg_constraint
|
|
||||||
WHERE conname = 'fk_identity_permission_page'
|
|
||||||
AND conrelid = 'identity.permission'::regclass) THEN
|
|
||||||
ALTER TABLE identity.permission
|
|
||||||
ADD CONSTRAINT fk_identity_permission_page
|
|
||||||
FOREIGN KEY (page_id)
|
|
||||||
REFERENCES identity.pages (page_id)
|
|
||||||
NOT VALID;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT EXISTS (
|
|
||||||
SELECT 1 FROM pg_constraint
|
|
||||||
WHERE conname = 'fk_identity_denied_tenant'
|
|
||||||
AND conrelid = 'identity.denied_pages'::regclass) THEN
|
|
||||||
ALTER TABLE identity.denied_pages
|
|
||||||
ADD CONSTRAINT fk_identity_denied_tenant
|
|
||||||
FOREIGN KEY (tenant_id)
|
|
||||||
REFERENCES identity.client_account (tenant_id)
|
|
||||||
NOT VALID;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT EXISTS (
|
|
||||||
SELECT 1 FROM pg_constraint
|
|
||||||
WHERE conname = 'fk_identity_denied_user_tenant'
|
|
||||||
AND conrelid = 'identity.denied_pages'::regclass) THEN
|
|
||||||
ALTER TABLE identity.denied_pages
|
|
||||||
ADD CONSTRAINT fk_identity_denied_user_tenant
|
|
||||||
FOREIGN KEY (tenant_id, user_id)
|
|
||||||
REFERENCES identity.app_user (tenant_id, user_id)
|
|
||||||
NOT VALID;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT EXISTS (
|
|
||||||
SELECT 1 FROM pg_constraint
|
|
||||||
WHERE conname = 'fk_identity_denied_page'
|
|
||||||
AND conrelid = 'identity.denied_pages'::regclass) THEN
|
|
||||||
ALTER TABLE identity.denied_pages
|
|
||||||
ADD CONSTRAINT fk_identity_denied_page
|
|
||||||
FOREIGN KEY (page_id)
|
|
||||||
REFERENCES identity.pages (page_id)
|
|
||||||
NOT VALID;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT EXISTS (
|
|
||||||
SELECT 1 FROM pg_constraint
|
|
||||||
WHERE conname = 'fk_identity_login_history_tenant'
|
|
||||||
AND conrelid = 'identity.user_loginhistory'::regclass) THEN
|
|
||||||
ALTER TABLE identity.user_loginhistory
|
|
||||||
ADD CONSTRAINT fk_identity_login_history_tenant
|
|
||||||
FOREIGN KEY (tenant_id)
|
|
||||||
REFERENCES identity.client_account (tenant_id)
|
|
||||||
NOT VALID;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
END
|
|
||||||
$migration$;
|
|
||||||
|
|
||||||
ALTER TABLE identity.company
|
|
||||||
VALIDATE CONSTRAINT fk_identity_company_tenant;
|
|
||||||
ALTER TABLE identity.company_branch
|
|
||||||
VALIDATE CONSTRAINT fk_identity_branch_tenant;
|
|
||||||
ALTER TABLE identity.company_branch
|
|
||||||
VALIDATE CONSTRAINT fk_identity_branch_company_tenant;
|
|
||||||
ALTER TABLE identity.user_group
|
|
||||||
VALIDATE CONSTRAINT fk_identity_group_tenant;
|
|
||||||
ALTER TABLE identity.app_user
|
|
||||||
VALIDATE CONSTRAINT fk_identity_user_tenant;
|
|
||||||
ALTER TABLE identity.app_user
|
|
||||||
VALIDATE CONSTRAINT fk_identity_user_group_tenant;
|
|
||||||
ALTER TABLE identity.app_user
|
|
||||||
VALIDATE CONSTRAINT fk_identity_user_company_tenant;
|
|
||||||
ALTER TABLE identity.app_user
|
|
||||||
VALIDATE CONSTRAINT fk_identity_user_branch_tenant;
|
|
||||||
ALTER TABLE identity.permission
|
|
||||||
VALIDATE CONSTRAINT fk_identity_permission_tenant;
|
|
||||||
ALTER TABLE identity.permission
|
|
||||||
VALIDATE CONSTRAINT fk_identity_permission_group_tenant;
|
|
||||||
ALTER TABLE identity.permission
|
|
||||||
VALIDATE CONSTRAINT fk_identity_permission_page;
|
|
||||||
ALTER TABLE identity.denied_pages
|
|
||||||
VALIDATE CONSTRAINT fk_identity_denied_tenant;
|
|
||||||
ALTER TABLE identity.denied_pages
|
|
||||||
VALIDATE CONSTRAINT fk_identity_denied_user_tenant;
|
|
||||||
ALTER TABLE identity.denied_pages
|
|
||||||
VALIDATE CONSTRAINT fk_identity_denied_page;
|
|
||||||
ALTER TABLE identity.user_loginhistory
|
|
||||||
VALIDATE CONSTRAINT fk_identity_login_history_tenant;
|
|
||||||
|
|
||||||
COMMIT;
|
|
||||||
@@ -1,369 +0,0 @@
|
|||||||
BEGIN;
|
|
||||||
|
|
||||||
-- Client registration and controlled installation activation.
|
|
||||||
-- This migration is additive and preserves all existing tenant, license, and
|
|
||||||
-- installation identifiers. Plaintext license/activation keys must never be
|
|
||||||
-- stored in these tables.
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS identity.client_registration_details (
|
|
||||||
registration_id uuid PRIMARY KEY,
|
|
||||||
client_code character varying(40) NOT NULL,
|
|
||||||
legal_company_name character varying(240) NOT NULL,
|
|
||||||
trade_name character varying(240),
|
|
||||||
pan character varying(20),
|
|
||||||
cin character varying(30),
|
|
||||||
gst_number character varying(30),
|
|
||||||
billing_address_line1 character varying(300),
|
|
||||||
billing_address_line2 character varying(300),
|
|
||||||
billing_city character varying(120),
|
|
||||||
billing_state character varying(120),
|
|
||||||
billing_postal_code character varying(20),
|
|
||||||
billing_country character varying(2) NOT NULL DEFAULT 'IN',
|
|
||||||
billing_email character varying(254),
|
|
||||||
primary_contact_name character varying(160),
|
|
||||||
primary_contact_email character varying(254),
|
|
||||||
primary_contact_number character varying(30),
|
|
||||||
alternate_contact_name character varying(160),
|
|
||||||
alternate_contact_email character varying(254),
|
|
||||||
alternate_contact_number character varying(30),
|
|
||||||
contract_start_date date,
|
|
||||||
contract_end_date date,
|
|
||||||
status character varying(20) NOT NULL DEFAULT 'DRAFT',
|
|
||||||
created_at timestamp with time zone NOT NULL DEFAULT now(),
|
|
||||||
updated_at timestamp with time zone NOT NULL DEFAULT now(),
|
|
||||||
created_by character varying(120) NOT NULL,
|
|
||||||
version integer NOT NULL DEFAULT 1,
|
|
||||||
CONSTRAINT ck_identity_registration_code
|
|
||||||
CHECK (client_code ~ '^[A-Z0-9]+(?:-[A-Z0-9]+)*$'),
|
|
||||||
CONSTRAINT ck_identity_registration_country
|
|
||||||
CHECK (billing_country ~ '^[A-Z]{2}$'),
|
|
||||||
CONSTRAINT ck_identity_registration_period
|
|
||||||
CHECK (contract_end_date IS NULL
|
|
||||||
OR contract_start_date IS NULL
|
|
||||||
OR contract_end_date >= contract_start_date),
|
|
||||||
CONSTRAINT ck_identity_registration_status
|
|
||||||
CHECK (status IN ('DRAFT', 'ACTIVE', 'SUSPENDED', 'TERMINATED')),
|
|
||||||
CONSTRAINT ck_identity_registration_version
|
|
||||||
CHECK (version > 0)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE UNIQUE INDEX IF NOT EXISTS uq_identity_registration_client_code_ci
|
|
||||||
ON identity.client_registration_details (upper(client_code));
|
|
||||||
CREATE INDEX IF NOT EXISTS ix_identity_registration_status_contract
|
|
||||||
ON identity.client_registration_details (status, contract_end_date);
|
|
||||||
|
|
||||||
ALTER TABLE identity.client_account
|
|
||||||
ADD COLUMN IF NOT EXISTS registration_id uuid;
|
|
||||||
ALTER TABLE identity.client_account
|
|
||||||
ADD COLUMN IF NOT EXISTS security_version integer NOT NULL DEFAULT 1;
|
|
||||||
|
|
||||||
-- Stable bridge registration for the tenant introduced by migration 002.
|
|
||||||
INSERT INTO identity.client_registration_details (
|
|
||||||
registration_id, client_code, legal_company_name, trade_name,
|
|
||||||
status, contract_start_date, created_by)
|
|
||||||
VALUES ('00000000-0000-4000-8000-000000000010',
|
|
||||||
'MATRIX', 'Matrix', 'Matrix', 'ACTIVE', DATE '2020-01-01', 'migration-004')
|
|
||||||
ON CONFLICT (registration_id) DO UPDATE SET
|
|
||||||
legal_company_name = EXCLUDED.legal_company_name,
|
|
||||||
updated_at = now();
|
|
||||||
|
|
||||||
UPDATE identity.client_account
|
|
||||||
SET registration_id = '00000000-0000-4000-8000-000000000010'
|
|
||||||
WHERE registration_id IS NULL;
|
|
||||||
|
|
||||||
ALTER TABLE identity.client_account
|
|
||||||
ALTER COLUMN registration_id SET NOT NULL;
|
|
||||||
|
|
||||||
DO $migration$
|
|
||||||
BEGIN
|
|
||||||
IF NOT EXISTS (
|
|
||||||
SELECT 1 FROM pg_constraint
|
|
||||||
WHERE conname = 'fk_identity_client_account_registration'
|
|
||||||
AND conrelid = 'identity.client_account'::regclass) THEN
|
|
||||||
ALTER TABLE identity.client_account
|
|
||||||
ADD CONSTRAINT fk_identity_client_account_registration
|
|
||||||
FOREIGN KEY (registration_id)
|
|
||||||
REFERENCES identity.client_registration_details (registration_id)
|
|
||||||
NOT VALID;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT EXISTS (
|
|
||||||
SELECT 1 FROM pg_constraint
|
|
||||||
WHERE conname = 'ck_identity_client_account_security_version'
|
|
||||||
AND conrelid = 'identity.client_account'::regclass) THEN
|
|
||||||
ALTER TABLE identity.client_account
|
|
||||||
ADD CONSTRAINT ck_identity_client_account_security_version
|
|
||||||
CHECK (security_version > 0) NOT VALID;
|
|
||||||
END IF;
|
|
||||||
END
|
|
||||||
$migration$;
|
|
||||||
|
|
||||||
ALTER TABLE identity.client_account
|
|
||||||
VALIDATE CONSTRAINT fk_identity_client_account_registration;
|
|
||||||
ALTER TABLE identity.client_account
|
|
||||||
VALIDATE CONSTRAINT ck_identity_client_account_security_version;
|
|
||||||
|
|
||||||
CREATE INDEX IF NOT EXISTS ix_identity_client_account_registration
|
|
||||||
ON identity.client_account (registration_id, status);
|
|
||||||
CREATE UNIQUE INDEX IF NOT EXISTS uq_identity_client_account_registration_tenant
|
|
||||||
ON identity.client_account (registration_id, tenant_id);
|
|
||||||
|
|
||||||
UPDATE identity.client_license
|
|
||||||
SET max_installations = 1
|
|
||||||
WHERE max_installations IS NULL;
|
|
||||||
ALTER TABLE identity.client_license
|
|
||||||
ALTER COLUMN max_installations SET DEFAULT 1;
|
|
||||||
ALTER TABLE identity.client_license
|
|
||||||
ALTER COLUMN max_installations SET NOT NULL;
|
|
||||||
CREATE UNIQUE INDEX IF NOT EXISTS uq_identity_license_tenant_id
|
|
||||||
ON identity.client_license (tenant_id, license_id);
|
|
||||||
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
ADD COLUMN IF NOT EXISTS license_id uuid;
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
ADD COLUMN IF NOT EXISTS installation_uuid uuid;
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
ADD COLUMN IF NOT EXISTS installation_name character varying(160);
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
ADD COLUMN IF NOT EXISTS status character varying(24);
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
ADD COLUMN IF NOT EXISTS registered_at timestamp with time zone;
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
ADD COLUMN IF NOT EXISTS last_seen_at timestamp with time zone;
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
ADD COLUMN IF NOT EXISTS software_version character varying(40);
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
ADD COLUMN IF NOT EXISTS environment character varying(30);
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
ADD COLUMN IF NOT EXISTS retired_at timestamp with time zone;
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
ADD COLUMN IF NOT EXISTS retired_by character varying(120);
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
ADD COLUMN IF NOT EXISTS retirement_reason character varying(500);
|
|
||||||
|
|
||||||
UPDATE identity.client_installation installation
|
|
||||||
SET license_id = (
|
|
||||||
SELECT license.license_id
|
|
||||||
FROM identity.client_license license
|
|
||||||
WHERE license.tenant_id = installation.tenant_id
|
|
||||||
ORDER BY CASE license.status WHEN 'ACTIVE' THEN 0 ELSE 1 END,
|
|
||||||
license.valid_until DESC
|
|
||||||
LIMIT 1)
|
|
||||||
WHERE installation.license_id IS NULL;
|
|
||||||
|
|
||||||
DO $migration$
|
|
||||||
BEGIN
|
|
||||||
IF EXISTS (
|
|
||||||
SELECT 1
|
|
||||||
FROM identity.client_installation
|
|
||||||
WHERE license_id IS NULL) THEN
|
|
||||||
RAISE EXCEPTION
|
|
||||||
'Migration 004 cannot associate every existing installation with a license';
|
|
||||||
END IF;
|
|
||||||
END
|
|
||||||
$migration$;
|
|
||||||
|
|
||||||
UPDATE identity.client_installation
|
|
||||||
SET installation_uuid = installation_id
|
|
||||||
WHERE installation_uuid IS NULL;
|
|
||||||
UPDATE identity.client_installation
|
|
||||||
SET installation_name = installation_code
|
|
||||||
WHERE installation_name IS NULL;
|
|
||||||
UPDATE identity.client_installation
|
|
||||||
SET status = CASE WHEN enabled THEN 'ACTIVE' ELSE 'SUSPENDED' END
|
|
||||||
WHERE status IS NULL;
|
|
||||||
UPDATE identity.client_installation
|
|
||||||
SET registered_at = created_at
|
|
||||||
WHERE registered_at IS NULL;
|
|
||||||
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
ALTER COLUMN license_id SET NOT NULL;
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
ALTER COLUMN installation_uuid SET NOT NULL;
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
ALTER COLUMN installation_name SET NOT NULL;
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
ALTER COLUMN status SET NOT NULL;
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
ALTER COLUMN status SET DEFAULT 'PENDING';
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
ALTER COLUMN registered_at SET NOT NULL;
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
ALTER COLUMN registered_at SET DEFAULT now();
|
|
||||||
|
|
||||||
DO $migration$
|
|
||||||
BEGIN
|
|
||||||
IF NOT EXISTS (
|
|
||||||
SELECT 1 FROM pg_constraint
|
|
||||||
WHERE conname = 'fk_identity_installation_tenant_license'
|
|
||||||
AND conrelid = 'identity.client_installation'::regclass) THEN
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
ADD CONSTRAINT fk_identity_installation_tenant_license
|
|
||||||
FOREIGN KEY (tenant_id, license_id)
|
|
||||||
REFERENCES identity.client_license (tenant_id, license_id)
|
|
||||||
NOT VALID;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT EXISTS (
|
|
||||||
SELECT 1 FROM pg_constraint
|
|
||||||
WHERE conname = 'ck_identity_installation_status'
|
|
||||||
AND conrelid = 'identity.client_installation'::regclass) THEN
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
ADD CONSTRAINT ck_identity_installation_status
|
|
||||||
CHECK (status IN (
|
|
||||||
'PENDING', 'ACTIVE', 'SUSPENDED', 'DECOMMISSIONED', 'REVOKED', 'FAILED'
|
|
||||||
)) NOT VALID;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT EXISTS (
|
|
||||||
SELECT 1 FROM pg_constraint
|
|
||||||
WHERE conname = 'ck_identity_installation_retirement'
|
|
||||||
AND conrelid = 'identity.client_installation'::regclass) THEN
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
ADD CONSTRAINT ck_identity_installation_retirement
|
|
||||||
CHECK (
|
|
||||||
(status NOT IN ('DECOMMISSIONED', 'REVOKED')
|
|
||||||
AND retired_at IS NULL)
|
|
||||||
OR
|
|
||||||
(status IN ('DECOMMISSIONED', 'REVOKED')
|
|
||||||
AND retired_at IS NOT NULL
|
|
||||||
AND retirement_reason IS NOT NULL)
|
|
||||||
) NOT VALID;
|
|
||||||
END IF;
|
|
||||||
END
|
|
||||||
$migration$;
|
|
||||||
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
VALIDATE CONSTRAINT fk_identity_installation_tenant_license;
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
VALIDATE CONSTRAINT ck_identity_installation_status;
|
|
||||||
ALTER TABLE identity.client_installation
|
|
||||||
VALIDATE CONSTRAINT ck_identity_installation_retirement;
|
|
||||||
|
|
||||||
CREATE UNIQUE INDEX IF NOT EXISTS uq_identity_installation_uuid
|
|
||||||
ON identity.client_installation (installation_uuid);
|
|
||||||
CREATE INDEX IF NOT EXISTS ix_identity_installation_capacity
|
|
||||||
ON identity.client_installation (tenant_id, license_id, status)
|
|
||||||
WHERE status IN ('PENDING', 'ACTIVE', 'SUSPENDED');
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS identity.license_activation_key (
|
|
||||||
activation_key_id uuid PRIMARY KEY,
|
|
||||||
registration_id uuid NOT NULL,
|
|
||||||
tenant_id uuid NOT NULL,
|
|
||||||
license_id uuid NOT NULL,
|
|
||||||
key_hash character varying(255) NOT NULL,
|
|
||||||
key_hint character varying(16) NOT NULL,
|
|
||||||
status character varying(20) NOT NULL DEFAULT 'ACTIVE',
|
|
||||||
expires_at timestamp with time zone,
|
|
||||||
failed_attempts integer NOT NULL DEFAULT 0,
|
|
||||||
maximum_attempts integer NOT NULL DEFAULT 10,
|
|
||||||
locked_until timestamp with time zone,
|
|
||||||
created_at timestamp with time zone NOT NULL DEFAULT now(),
|
|
||||||
last_used_at timestamp with time zone,
|
|
||||||
created_by character varying(120) NOT NULL,
|
|
||||||
revoked_at timestamp with time zone,
|
|
||||||
revoked_by character varying(120),
|
|
||||||
revocation_reason character varying(500),
|
|
||||||
CONSTRAINT fk_identity_activation_key_registration
|
|
||||||
FOREIGN KEY (registration_id)
|
|
||||||
REFERENCES identity.client_registration_details (registration_id),
|
|
||||||
CONSTRAINT fk_identity_activation_key_registration_tenant
|
|
||||||
FOREIGN KEY (registration_id, tenant_id)
|
|
||||||
REFERENCES identity.client_account (registration_id, tenant_id),
|
|
||||||
CONSTRAINT fk_identity_activation_key_tenant_license
|
|
||||||
FOREIGN KEY (tenant_id, license_id)
|
|
||||||
REFERENCES identity.client_license (tenant_id, license_id),
|
|
||||||
CONSTRAINT uq_identity_activation_key_hash UNIQUE (key_hash),
|
|
||||||
CONSTRAINT ck_identity_activation_key_status
|
|
||||||
CHECK (status IN ('ACTIVE', 'LOCKED', 'REVOKED', 'EXPIRED')),
|
|
||||||
CONSTRAINT ck_identity_activation_key_attempts
|
|
||||||
CHECK (failed_attempts >= 0
|
|
||||||
AND maximum_attempts > 0
|
|
||||||
AND failed_attempts <= maximum_attempts),
|
|
||||||
CONSTRAINT ck_identity_activation_key_revocation
|
|
||||||
CHECK ((status <> 'REVOKED' AND revoked_at IS NULL)
|
|
||||||
OR (status = 'REVOKED'
|
|
||||||
AND revoked_at IS NOT NULL
|
|
||||||
AND revocation_reason IS NOT NULL))
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX IF NOT EXISTS ix_identity_activation_key_validation
|
|
||||||
ON identity.license_activation_key
|
|
||||||
(registration_id, tenant_id, license_id, status, expires_at);
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS identity.installation_activation_session (
|
|
||||||
activation_session_id uuid PRIMARY KEY,
|
|
||||||
activation_key_id uuid NOT NULL,
|
|
||||||
registration_id uuid NOT NULL,
|
|
||||||
tenant_id uuid NOT NULL,
|
|
||||||
license_id uuid NOT NULL,
|
|
||||||
installation_uuid uuid NOT NULL,
|
|
||||||
token_hash character varying(255) NOT NULL,
|
|
||||||
status character varying(20) NOT NULL DEFAULT 'PENDING',
|
|
||||||
expires_at timestamp with time zone NOT NULL,
|
|
||||||
created_at timestamp with time zone NOT NULL DEFAULT now(),
|
|
||||||
consumed_at timestamp with time zone,
|
|
||||||
source_ip inet,
|
|
||||||
installer_version character varying(40),
|
|
||||||
CONSTRAINT fk_identity_activation_session_key
|
|
||||||
FOREIGN KEY (activation_key_id)
|
|
||||||
REFERENCES identity.license_activation_key (activation_key_id),
|
|
||||||
CONSTRAINT fk_identity_activation_session_registration
|
|
||||||
FOREIGN KEY (registration_id)
|
|
||||||
REFERENCES identity.client_registration_details (registration_id),
|
|
||||||
CONSTRAINT fk_identity_activation_session_registration_tenant
|
|
||||||
FOREIGN KEY (registration_id, tenant_id)
|
|
||||||
REFERENCES identity.client_account (registration_id, tenant_id),
|
|
||||||
CONSTRAINT fk_identity_activation_session_tenant_license
|
|
||||||
FOREIGN KEY (tenant_id, license_id)
|
|
||||||
REFERENCES identity.client_license (tenant_id, license_id),
|
|
||||||
CONSTRAINT uq_identity_activation_session_token UNIQUE (token_hash),
|
|
||||||
CONSTRAINT uq_identity_activation_session_uuid UNIQUE (installation_uuid),
|
|
||||||
CONSTRAINT ck_identity_activation_session_status
|
|
||||||
CHECK (status IN ('PENDING', 'CONSUMED', 'EXPIRED', 'REVOKED')),
|
|
||||||
CONSTRAINT ck_identity_activation_session_period
|
|
||||||
CHECK (expires_at > created_at),
|
|
||||||
CONSTRAINT ck_identity_activation_session_consumed
|
|
||||||
CHECK ((status <> 'CONSUMED' AND consumed_at IS NULL)
|
|
||||||
OR (status = 'CONSUMED' AND consumed_at IS NOT NULL))
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX IF NOT EXISTS ix_identity_activation_session_pending
|
|
||||||
ON identity.installation_activation_session (tenant_id, expires_at)
|
|
||||||
WHERE status = 'PENDING';
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS identity.installation_audit_event (
|
|
||||||
audit_event_id uuid PRIMARY KEY,
|
|
||||||
registration_id uuid NOT NULL,
|
|
||||||
tenant_id uuid NOT NULL,
|
|
||||||
license_id uuid,
|
|
||||||
installation_id uuid,
|
|
||||||
event_type character varying(50) NOT NULL,
|
|
||||||
actor_type character varying(30) NOT NULL,
|
|
||||||
actor_id character varying(160) NOT NULL,
|
|
||||||
reason character varying(500),
|
|
||||||
event_data jsonb NOT NULL DEFAULT '{}'::jsonb,
|
|
||||||
occurred_at timestamp with time zone NOT NULL DEFAULT now(),
|
|
||||||
CONSTRAINT fk_identity_installation_audit_registration
|
|
||||||
FOREIGN KEY (registration_id)
|
|
||||||
REFERENCES identity.client_registration_details (registration_id),
|
|
||||||
CONSTRAINT fk_identity_installation_audit_registration_tenant
|
|
||||||
FOREIGN KEY (registration_id, tenant_id)
|
|
||||||
REFERENCES identity.client_account (registration_id, tenant_id),
|
|
||||||
CONSTRAINT fk_identity_installation_audit_tenant_license
|
|
||||||
FOREIGN KEY (tenant_id, license_id)
|
|
||||||
REFERENCES identity.client_license (tenant_id, license_id),
|
|
||||||
CONSTRAINT fk_identity_installation_audit_installation
|
|
||||||
FOREIGN KEY (installation_id)
|
|
||||||
REFERENCES identity.client_installation (installation_id),
|
|
||||||
CONSTRAINT ck_identity_installation_audit_actor
|
|
||||||
CHECK (actor_type IN ('ADMIN', 'INSTALLER', 'SYSTEM', 'CLIENT'))
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE INDEX IF NOT EXISTS ix_identity_installation_audit_tenant_time
|
|
||||||
ON identity.installation_audit_event (tenant_id, occurred_at DESC);
|
|
||||||
CREATE INDEX IF NOT EXISTS ix_identity_installation_audit_installation_time
|
|
||||||
ON identity.installation_audit_event (installation_id, occurred_at DESC)
|
|
||||||
WHERE installation_id IS NOT NULL;
|
|
||||||
|
|
||||||
COMMIT;
|
|
||||||
Binary file not shown.
Binary file not shown.
@@ -1,3 +0,0 @@
|
|||||||
artifactId=cygnus-cloud-service
|
|
||||||
groupId=com.cygnus
|
|
||||||
version=1.0.0-SNAPSHOT
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
com/cygnus/cloud/tenant/repository/InstallationActivationRepository.class
|
|
||||||
com/cygnus/cloud/security/JwtReplayProtectionService.class
|
|
||||||
com/cygnus/cloud/tenant/service/LicenseKeyException.class
|
|
||||||
com/cygnus/cloud/security/TokenResponse.class
|
|
||||||
com/cygnus/cloud/identity/api/IdentityErrorHandler.class
|
|
||||||
com/cygnus/cloud/security/MachineTokenController.class
|
|
||||||
com/cygnus/cloud/tenant/api/InstallationRegistrationRequest.class
|
|
||||||
com/cygnus/cloud/database/ReactiveDatabaseClient.class
|
|
||||||
com/cygnus/cloud/tenant/repository/TenantRegistrationRepository.class
|
|
||||||
com/cygnus/cloud/tenant/service/InstallationActivationException.class
|
|
||||||
com/cygnus/cloud/tenant/api/IssueLicenseKeyRequest.class
|
|
||||||
com/cygnus/cloud/tenant/repository/InstallationLifecycleRepository.class
|
|
||||||
com/cygnus/cloud/identity/api/EncryptedLoginRequest.class
|
|
||||||
com/cygnus/cloud/security/AccessTokenIssuer.class
|
|
||||||
com/cygnus/cloud/tenant/model/IssuedLicenseKey.class
|
|
||||||
com/cygnus/cloud/tenant/api/ActivationValidationRequest.class
|
|
||||||
com/cygnus/cloud/security/MachineTokenErrorHandler.class
|
|
||||||
com/cygnus/cloud/tenant/api/InstallationActivationController.class
|
|
||||||
com/cygnus/cloud/tenant/service/ActivationRateLimiter.class
|
|
||||||
com/cygnus/cloud/security/MachineClientPrincipal.class
|
|
||||||
com/cygnus/cloud/security/CommunicationSecurityProperties.class
|
|
||||||
com/cygnus/cloud/tenant/api/RetireInstallationRequest.class
|
|
||||||
com/cygnus/cloud/tenant/model/ClientStatus.class
|
|
||||||
com/cygnus/cloud/system/SystemConfiguration.class
|
|
||||||
com/cygnus/cloud/tenant/service/InstallationActivationService.class
|
|
||||||
com/cygnus/cloud/security/MachineAuthenticationException.class
|
|
||||||
com/cygnus/cloud/tenant/service/ActivationRateLimitException.class
|
|
||||||
com/cygnus/cloud/tenant/model/RegisteredInstallation.class
|
|
||||||
com/cygnus/cloud/tenant/repository/ClientAdministrationRepository.class
|
|
||||||
com/cygnus/cloud/database/VertxDatabaseConfiguration.class
|
|
||||||
com/cygnus/cloud/identity/repository/IdentityRepository.class
|
|
||||||
com/cygnus/cloud/tenant/model/ActivationKeyStatus.class
|
|
||||||
com/cygnus/cloud/identity/service/LegacyPasswordVerifier.class
|
|
||||||
com/cygnus/cloud/tenant/api/CreateTenantRequest.class
|
|
||||||
com/cygnus/cloud/tenant/repository/InstallationActivationRepository$RegistrationContext.class
|
|
||||||
com/cygnus/cloud/tenant/model/LicenseActivationContext.class
|
|
||||||
com/cygnus/cloud/identity/model/MenuItem.class
|
|
||||||
com/cygnus/cloud/identity/model/AuthenticatedIdentity.class
|
|
||||||
com/cygnus/cloud/identity/api/CloudLoginController.class
|
|
||||||
com/cygnus/cloud/security/ClientAssertionValidator.class
|
|
||||||
com/cygnus/cloud/tenant/api/ClientAdministrationController.class
|
|
||||||
com/cygnus/cloud/identity/model/IdentityUser.class
|
|
||||||
com/cygnus/cloud/identity/repository/IdentityRowMapper.class
|
|
||||||
com/cygnus/cloud/tenant/repository/LicenseActivationRepository.class
|
|
||||||
com/cygnus/cloud/cache/CacheProperties.class
|
|
||||||
com/cygnus/cloud/tenant/api/InstallationActivationErrorHandler.class
|
|
||||||
com/cygnus/cloud/identity/service/AuthenticationException.class
|
|
||||||
com/cygnus/cloud/security/AudienceValidator.class
|
|
||||||
com/cygnus/cloud/tenant/model/LicenseStatus.class
|
|
||||||
com/cygnus/cloud/security/MachineSecurityConfigurationValidator.class
|
|
||||||
com/cygnus/cloud/tenant/service/LicenseKeyService.class
|
|
||||||
com/cygnus/cloud/tenant/model/ClientAccount.class
|
|
||||||
com/cygnus/cloud/tenant/service/RegistrationEmailService.class
|
|
||||||
com/cygnus/cloud/identity/api/LoginEncryptionProperties.class
|
|
||||||
com/cygnus/cloud/identity/service/LoginRequestReplayService.class
|
|
||||||
com/cygnus/cloud/tenant/service/TenantRegistrationService.class
|
|
||||||
com/cygnus/cloud/identity/service/IdentityAuthenticationService.class
|
|
||||||
com/cygnus/cloud/tenant/model/ClientInstallation.class
|
|
||||||
com/cygnus/cloud/tenant/api/ActivationValidationResponse.class
|
|
||||||
com/cygnus/cloud/tenant/model/ClientLicense.class
|
|
||||||
com/cygnus/cloud/tenant/model/ClientRegistration.class
|
|
||||||
com/cygnus/cloud/system/SystemInfoResponse.class
|
|
||||||
com/cygnus/cloud/tenant/api/CreateLicenseRequest.class
|
|
||||||
com/cygnus/cloud/identity/api/LoginPayload.class
|
|
||||||
com/cygnus/cloud/tenant/service/InstallationCodeConflictException.class
|
|
||||||
com/cygnus/cloud/tenant/model/LicenseDeliveryDetails.class
|
|
||||||
com/cygnus/cloud/security/PemKeyLoader.class
|
|
||||||
com/cygnus/cloud/tenant/model/LicenseActivationKey.class
|
|
||||||
com/cygnus/cloud/security/CloudSecurityConfiguration.class
|
|
||||||
com/cygnus/cloud/tenant/model/ActivationSession.class
|
|
||||||
com/cygnus/cloud/tenant/model/RegistrationStatus.class
|
|
||||||
com/cygnus/cloud/system/SystemInfoController.class
|
|
||||||
com/cygnus/cloud/CygnusCloudServiceApplication.class
|
|
||||||
com/cygnus/cloud/cache/ReactiveCacheService.class
|
|
||||||
com/cygnus/cloud/tenant/model/InstallationLifecycleResult.class
|
|
||||||
com/cygnus/cloud/tenant/service/InstallationLifecycleService.class
|
|
||||||
com/cygnus/cloud/tenant/api/CreateClientRegistrationRequest.class
|
|
||||||
com/cygnus/cloud/identity/api/RsaLoginPayloadDecryptor.class
|
|
||||||
com/cygnus/cloud/database/DatabaseProperties.class
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/CygnusCloudServiceApplication.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/cache/CacheProperties.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/cache/ReactiveCacheService.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/database/DatabaseProperties.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/database/ReactiveDatabaseClient.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/database/VertxDatabaseConfiguration.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/identity/api/CloudLoginController.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/identity/api/EncryptedLoginRequest.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/identity/api/IdentityErrorHandler.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/identity/api/LoginEncryptionProperties.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/identity/api/LoginPayload.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/identity/api/RsaLoginPayloadDecryptor.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/identity/model/AuthenticatedIdentity.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/identity/model/IdentityUser.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/identity/model/MenuItem.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/identity/repository/IdentityRepository.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/identity/repository/IdentityRowMapper.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/identity/service/AuthenticationException.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/identity/service/IdentityAuthenticationService.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/identity/service/LegacyPasswordVerifier.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/identity/service/LoginRequestReplayService.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/security/AccessTokenIssuer.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/security/AudienceValidator.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/security/ClientAssertionValidator.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/security/CloudSecurityConfiguration.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/security/CommunicationSecurityProperties.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/security/JwtReplayProtectionService.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/security/MachineAuthenticationException.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/security/MachineClientPrincipal.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/security/MachineSecurityConfigurationValidator.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/security/MachineTokenController.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/security/MachineTokenErrorHandler.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/security/PemKeyLoader.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/security/TokenResponse.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/system/SystemConfiguration.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/system/SystemInfoController.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/system/SystemInfoResponse.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/api/ActivationValidationRequest.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/api/ActivationValidationResponse.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/api/ClientAdministrationController.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/api/CreateClientRegistrationRequest.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/api/CreateLicenseRequest.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/api/CreateTenantRequest.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/api/InstallationActivationController.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/api/InstallationActivationErrorHandler.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/api/InstallationRegistrationRequest.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/api/IssueLicenseKeyRequest.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/api/RetireInstallationRequest.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/model/ActivationKeyStatus.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/model/ActivationSession.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/model/ClientAccount.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/model/ClientInstallation.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/model/ClientLicense.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/model/ClientRegistration.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/model/ClientStatus.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/model/InstallationLifecycleResult.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/model/IssuedLicenseKey.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/model/LicenseActivationContext.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/model/LicenseActivationKey.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/model/LicenseDeliveryDetails.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/model/LicenseStatus.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/model/RegisteredInstallation.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/model/RegistrationStatus.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/repository/ClientAdministrationRepository.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/repository/InstallationActivationRepository.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/repository/InstallationLifecycleRepository.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/repository/LicenseActivationRepository.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/repository/TenantRegistrationRepository.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/service/ActivationRateLimitException.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/service/ActivationRateLimiter.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/service/InstallationActivationException.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/service/InstallationActivationService.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/service/InstallationCodeConflictException.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/service/InstallationLifecycleService.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/service/LicenseKeyException.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/service/LicenseKeyService.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/service/RegistrationEmailService.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/main/java/com/cygnus/cloud/tenant/service/TenantRegistrationService.java
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
com/cygnus/cloud/tenant/repository/InstallationActivationRepositoryTest.class
|
|
||||||
com/cygnus/cloud/tenant/service/TenantRegistrationServiceTest.class
|
|
||||||
com/cygnus/cloud/tenant/repository/LicenseActivationRepositoryTest.class
|
|
||||||
com/cygnus/cloud/tenant/service/RegistrationEmailServiceTest.class
|
|
||||||
com/cygnus/cloud/tenant/service/LicenseKeyServiceTest.class
|
|
||||||
com/cygnus/cloud/InfrastructureConfigurationTest.class
|
|
||||||
com/cygnus/cloud/tenant/model/ClientLicenseTest.class
|
|
||||||
com/cygnus/cloud/system/SystemInfoControllerTest$FixedClockConfiguration.class
|
|
||||||
com/cygnus/cloud/tenant/service/ActivationRateLimiterTest.class
|
|
||||||
com/cygnus/cloud/identity/service/IdentityAuthenticationServiceTest.class
|
|
||||||
com/cygnus/cloud/system/SystemInfoControllerTest.class
|
|
||||||
com/cygnus/cloud/identity/service/LegacyPasswordVerifierTest.class
|
|
||||||
com/cygnus/cloud/security/MachineTokenFlowTest.class
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/test/java/com/cygnus/cloud/InfrastructureConfigurationTest.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/test/java/com/cygnus/cloud/identity/service/IdentityAuthenticationServiceTest.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/test/java/com/cygnus/cloud/identity/service/LegacyPasswordVerifierTest.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/test/java/com/cygnus/cloud/security/MachineTokenFlowTest.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/test/java/com/cygnus/cloud/system/SystemInfoControllerTest.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/test/java/com/cygnus/cloud/tenant/model/ClientLicenseTest.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/test/java/com/cygnus/cloud/tenant/repository/InstallationActivationRepositoryTest.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/test/java/com/cygnus/cloud/tenant/repository/LicenseActivationRepositoryTest.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/test/java/com/cygnus/cloud/tenant/service/ActivationRateLimiterTest.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/test/java/com/cygnus/cloud/tenant/service/LicenseKeyServiceTest.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/test/java/com/cygnus/cloud/tenant/service/RegistrationEmailServiceTest.java
|
|
||||||
/Users/maddy/Projects/cygnus/matrix/cygnus-cloud-service/src/test/java/com/cygnus/cloud/tenant/service/TenantRegistrationServiceTest.java
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user