"Allow incoming device control over the insecure legacy admin channel",
"The primary public key authorized to send admin messages to this node",
validationText: hasFieldError("adminKey0")
?getErrorMessage("adminKey0")
:"",
inputChange:(e)=>adminKeyInputChangeEvent(e,0),
selectChange:()=>{},
bits:[{text:"256 bit",value:"32",key:"bit256"}],
devicePSKBitCount: state.privateKeyBitCount,
hide:!state.adminKeyVisible[0],
actionButtons:[],
disabledBy:[
{fieldName:"adminChannelEnabled",invert: true},
],
properties:{
value: state.adminKey[0],
showCopyButton: true,
showPasswordToggle: true,
},
},
{
type:"toggle",
name:"isManaged",
label:"Managed",
type:"passwordGenerator",
name:"adminKey.1",
id:"adminKey1Input",
label:"Secondary Admin Key",
description:
"If true, device configuration options are only able to be changed remotely by a Remote Admin node via admin messages. Do not enable this option unless a suitable Remote Admin node has been setup, and the public key stored in the field below.",
"The secondary public key authorized to send admin messages to this node",
validationText: hasFieldError("adminKey1")
?getErrorMessage("adminKey1")
:"",
inputChange:(e)=>adminKeyInputChangeEvent(e,1),
selectChange:()=>{},
bits:[{text:"256 bit",value:"32",key:"bit256"}],
devicePSKBitCount: state.privateKeyBitCount,
hide:!state.adminKeyVisible[1],
actionButtons:[],
disabledBy:[
{fieldName:"adminChannelEnabled",invert: true},
],
properties:{
value: state.adminKey[1],
showCopyButton: true,
showPasswordToggle: true,
},
},
{
type:"passwordGenerator",
name:"adminKey",
id:"adminKeyInput",
label:"Admin Key",
name:"adminKey.2",
id:"adminKey2Input",
label:"Tertiary Admin Key",
description:
"The public key authorized to send admin messages to this node",
validationText: hasFieldError("adminKey")
?getErrorMessage("adminKey")
"The tertiary public key authorized to send admin messages to this node",
validationText: hasFieldError("adminKey2")
?getErrorMessage("adminKey2")
:"",
inputChange: adminKeyInputChangeEvent,
inputChange:(e)=>adminKeyInputChangeEvent(e,2),
selectChange:()=>{},
bits:[{text:"256 bit",value:"32",key:"bit256"}],
devicePSKBitCount: state.privateKeyBitCount,
hide:!state.adminKeyVisible,
actionButtons:[
{
text:"Generate",
variant:"success",
onClick:()=>{
constadminKey=getX25519PrivateKey();
dispatch({
type:"REGENERATE_ADMIN_KEY",
payload:{adminKey: fromByteArray(adminKey)},
});
validateKey(
fromByteArray(adminKey),
state.adminKeyBitCount,
"adminKey",
);
},
},
],
hide:!state.adminKeyVisible[2],
actionButtons:[],
disabledBy:[
{fieldName:"adminChannelEnabled",invert: true},
],
properties:{
value: state.adminKey,
value: state.adminKey[2],
showCopyButton: true,
showPasswordToggle: true,
},
},
{
type:"toggle",
name:"isManaged",
label:"Managed",
description:
"If enabled, device configuration options are only able to be changed remotely by a Remote Admin node via admin messages. Do not enable this option unless at least one suitable Remote Admin node has been setup, and the public key is stored in one of the fields above.",