@@ -329,6 +329,7 @@ export class NodeCommand extends BaseCommand {
329
329
* @return a list of subtasks
330
330
* @private
331
331
*/
332
+ // TODO: move to KeyManager and remove List2 functionality
332
333
_nodeGossipKeysTaskList ( keyFormat , nodeIds , keysDir , curDate = new Date ( ) , allNodeIds = null ) {
333
334
allNodeIds = allNodeIds || nodeIds
334
335
if ( ! Array . isArray ( nodeIds ) || ! nodeIds . every ( ( nodeId ) => typeof nodeId === 'string' ) ) {
@@ -358,6 +359,7 @@ export class NodeCommand extends BaseCommand {
358
359
title : `Generate ${ Templates . renderGossipPfxPrivateKeyFile ( nodeId ) } for node: ${ chalk . yellow ( nodeId ) } ` ,
359
360
task : async ( ) => {
360
361
const privatePfxFile = await self . keyManager . generatePrivatePfxKeys ( keytool , nodeId , keysDir , tmpDir )
362
+ // TODO: move this validation logic into keyManager.generatePrivatePfxKeys
361
363
const output = await keytool . list ( `-storetype pkcs12 -storepass password -keystore ${ privatePfxFile } ` )
362
364
if ( ! output . includes ( 'Your keystore contains 3 entries' ) ) {
363
365
throw new FullstackTestingError ( `malformed private pfx file: ${ privatePfxFile } ` )
@@ -370,6 +372,7 @@ export class NodeCommand extends BaseCommand {
370
372
title : `Generate ${ constants . PUBLIC_PFX } file` ,
371
373
task : async ( ) => {
372
374
const publicPfxFile = await self . keyManager . updatePublicPfxKey ( self . keytoolDepManager . getKeytool ( ) , allNodeIds , keysDir , tmpDir )
375
+ // TODO: move this validation into the keyManager.updatePublicPfxKey function
373
376
const output = await keytool . list ( `-storetype pkcs12 -storepass password -keystore ${ publicPfxFile } ` )
374
377
if ( ! output . includes ( `Your keystore contains ${ allNodeIds . length * 3 } entries` ) ) {
375
378
throw new FullstackTestingError ( `malformed public.pfx file: ${ publicPfxFile } ` )
@@ -431,6 +434,7 @@ export class NodeCommand extends BaseCommand {
431
434
* @return return a list of subtasks
432
435
* @private
433
436
*/
437
+ // TODO move to KeyManager and remove List2 functionality
434
438
_nodeTlsKeyTaskList ( nodeIds , keysDir , curDate = new Date ( ) ) {
435
439
// check if nodeIds is an array of strings
436
440
if ( ! Array . isArray ( nodeIds ) || ! nodeIds . every ( ( nodeId ) => typeof nodeId === 'string' ) ) {
@@ -462,6 +466,7 @@ export class NodeCommand extends BaseCommand {
462
466
return subTasks
463
467
}
464
468
469
+ // TODO: move to KeyManager, rename copyNodeKeysToStaging
465
470
async _copyNodeKeys ( nodeKey , destDir ) {
466
471
for ( const keyFile of [ nodeKey . privateKeyFile , nodeKey . certificateFile ] ) {
467
472
if ( ! fs . existsSync ( keyFile ) ) {
@@ -788,6 +793,7 @@ export class NodeCommand extends BaseCommand {
788
793
} ,
789
794
skip : ( ctx , _ ) => ! ctx . config . generateTlsKeys
790
795
} ,
796
+ // TODO: moves to `network deploy`
791
797
{
792
798
title : 'Prepare staging directory' ,
793
799
task : async ( ctx , parentTask ) => {
@@ -1825,6 +1831,7 @@ export class NodeCommand extends BaseCommand {
1825
1831
valuesArg += this . prepareValuesFiles ( this . profileValuesFile )
1826
1832
}
1827
1833
1834
+ // TODO: update the secrets with the new/updated key(s)
1828
1835
await self . chartManager . upgrade (
1829
1836
config . namespace ,
1830
1837
constants . FULLSTACK_DEPLOYMENT_CHART ,
@@ -2147,6 +2154,7 @@ export class NodeCommand extends BaseCommand {
2147
2154
}
2148
2155
}
2149
2156
2157
+ // TODO: move to KeyManager
2150
2158
async copyGossipKeysToStaging ( keyFormat , keysDir , stagingKeysDir , nodeIds ) {
2151
2159
// copy gossip keys to the staging
2152
2160
for ( const nodeId of nodeIds ) {
0 commit comments