feat(federation): add secret rotation columns to federation_peers (FED-011)
This commit is contained in:
@@ -215,6 +215,15 @@ export function runMigrations(db: Database.Database): void {
|
|||||||
{ name: 'federation_relay_ttl_days', type: 'INTEGER NOT NULL DEFAULT 30' },
|
{ name: 'federation_relay_ttl_days', type: 'INTEGER NOT NULL DEFAULT 30' },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'federation_peers',
|
||||||
|
columns: [
|
||||||
|
{ name: 'pending_hmac_secret', type: 'TEXT' },
|
||||||
|
{ name: 'secret_rotation_at', type: 'INTEGER' },
|
||||||
|
{ name: 'secret_rotated_at', type: 'INTEGER' },
|
||||||
|
{ name: 'auto_rotate_interval_days', type: 'INTEGER NOT NULL DEFAULT 90' },
|
||||||
|
]
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const table of tables) {
|
for (const table of tables) {
|
||||||
|
|||||||
@@ -320,6 +320,10 @@ export const federationPeers = sqliteTable('federation_peers', {
|
|||||||
lastSyncedAt: integer('last_synced_at').default(0),
|
lastSyncedAt: integer('last_synced_at').default(0),
|
||||||
remoteMaxUploadSize: integer('remote_max_upload_size'),
|
remoteMaxUploadSize: integer('remote_max_upload_size'),
|
||||||
nonceSupported: integer('nonce_supported').notNull().default(0),
|
nonceSupported: integer('nonce_supported').notNull().default(0),
|
||||||
|
pendingHmacSecret: text('pending_hmac_secret'),
|
||||||
|
secretRotationAt: integer('secret_rotation_at'),
|
||||||
|
secretRotatedAt: integer('secret_rotated_at'),
|
||||||
|
autoRotateIntervalDays: integer('auto_rotate_interval_days').notNull().default(90),
|
||||||
createdAt: integer('created_at').notNull(),
|
createdAt: integer('created_at').notNull(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user