Add mtls to blueprint, policy, and oss getTraefikConfig

This commit is contained in:
Owen
2026-10-20 10:02:44 -04:00
parent 6aaaae3819
commit f4140fd6f6
34 changed files with 1607 additions and 516 deletions
+28
View File
@@ -36,6 +36,24 @@ export default async function migration() {
);
`
).run();
db.prepare(
`
CREATE TABLE 'resourcePolicyMtlsCertificates' (
'mtlsCertificateId' integer PRIMARY KEY AUTOINCREMENT NOT NULL,
'resourcePolicyId' integer NOT NULL,
'name' text,
'certificate' text NOT NULL,
'subject' text,
'issuer' text,
'serialNumber' text,
'fingerprint' text,
'notBefore' integer,
'notAfter' integer,
'createdAt' integer NOT NULL,
FOREIGN KEY ('resourcePolicyId') REFERENCES 'resourcePolicies'('resourcePolicyId') ON UPDATE no action ON DELETE cascade
);
`
).run();
db.prepare(
`
CREATE TABLE 'clientOrgRoles' (
@@ -98,6 +116,16 @@ export default async function migration() {
ALTER TABLE 'resources' ADD 'mtlsEnabled' integer DEFAULT false NOT NULL;
`
).run();
db.prepare(
`
ALTER TABLE 'resources' ADD 'forwardIdentityHeaders' integer DEFAULT true NOT NULL;
`
).run();
db.prepare(
`
ALTER TABLE 'resourcePolicies' ADD 'mtlsEnabled' integer DEFAULT false NOT NULL;
`
).run();
})();
db.pragma("foreign_keys = ON");