SecureRandomHash for internal shell password (#5638)

This commit is contained in:
Nick Dunstone
2019-10-28 15:56:11 +00:00
committed by Rick Parker
parent bcba66f95d
commit 4c7fbbc31b
3 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,6 @@
package net.corda.nodeapi.internal
import net.corda.core.crypto.SecureHash
import net.corda.core.crypto.toStringShort
import net.corda.core.identity.Party
import net.corda.core.messaging.MessageRecipientGroup
@ -25,7 +26,9 @@ class ArtemisMessagingComponent {
const val NODE_RPC_USER = "SystemUsers/NodeRPC"
const val PEER_USER = "SystemUsers/Peer"
// User used only in devMode when nodes have a shell attached by default.
const val INTERNAL_SHELL_USER = "internalShell"
val internalShellPassword: String by lazy { SecureHash.randomSHA256().toString() }
const val INTERNAL_PREFIX = "internal."
const val PEERS_PREFIX = "${INTERNAL_PREFIX}peers." //TODO Come up with better name for common peers/services queue