mirror of
https://github.com/corda/corda.git
synced 2024-12-24 23:26:48 +00:00
Set adequate permissions for the nodes such that NodeExplorer can connect
This commit is contained in:
parent
eac43e3967
commit
ae88242cc1
@ -2,7 +2,7 @@
|
|||||||
<configuration default="false" name="BankOfCordaDriverKt - Run Stack" type="JetRunConfigurationType" factoryName="Kotlin">
|
<configuration default="false" name="BankOfCordaDriverKt - Run Stack" type="JetRunConfigurationType" factoryName="Kotlin">
|
||||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||||
<option name="MAIN_CLASS_NAME" value="net.corda.bank.BankOfCordaDriverKt" />
|
<option name="MAIN_CLASS_NAME" value="net.corda.bank.BankOfCordaDriverKt" />
|
||||||
<option name="VM_PARAMETERS" value="-Dnet.corda.node.cordapp.scan.packages=net.corda.finance.contracts.asset" />
|
<option name="VM_PARAMETERS" value="" />
|
||||||
<option name="PROGRAM_PARAMETERS" value="--role ISSUER --quantity 100 --currency USD" />
|
<option name="PROGRAM_PARAMETERS" value="--role ISSUER --quantity 100 --currency USD" />
|
||||||
<option name="WORKING_DIRECTORY" value="" />
|
<option name="WORKING_DIRECTORY" value="" />
|
||||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||||
|
@ -5,6 +5,7 @@ import net.corda.bank.api.BankOfCordaClientApi
|
|||||||
import net.corda.bank.api.BankOfCordaWebApi.IssueRequestParams
|
import net.corda.bank.api.BankOfCordaWebApi.IssueRequestParams
|
||||||
import net.corda.core.identity.CordaX500Name
|
import net.corda.core.identity.CordaX500Name
|
||||||
import net.corda.core.utilities.NetworkHostAndPort
|
import net.corda.core.utilities.NetworkHostAndPort
|
||||||
|
import net.corda.finance.flows.CashConfigDataFlow
|
||||||
import net.corda.finance.flows.CashExitFlow
|
import net.corda.finance.flows.CashExitFlow
|
||||||
import net.corda.finance.flows.CashIssueAndPaymentFlow
|
import net.corda.finance.flows.CashIssueAndPaymentFlow
|
||||||
import net.corda.finance.flows.CashPaymentFlow
|
import net.corda.finance.flows.CashPaymentFlow
|
||||||
@ -61,20 +62,25 @@ private class BankOfCordaDriver {
|
|||||||
when (role) {
|
when (role) {
|
||||||
Role.ISSUER -> {
|
Role.ISSUER -> {
|
||||||
driver(dsl = {
|
driver(dsl = {
|
||||||
|
startNode(providedName = DUMMY_NOTARY.name,
|
||||||
|
advertisedServices = setOf(ServiceInfo(SimpleNotaryService.type)))
|
||||||
val bankUser = User(
|
val bankUser = User(
|
||||||
BANK_USERNAME,
|
BANK_USERNAME,
|
||||||
"test",
|
"test",
|
||||||
permissions = setOf(
|
permissions = setOf(
|
||||||
|
startFlowPermission<CashPaymentFlow>(),
|
||||||
|
startFlowPermission<CashConfigDataFlow>(),
|
||||||
|
startFlowPermission<CashExitFlow>(),
|
||||||
startFlowPermission<CashIssueAndPaymentFlow>(),
|
startFlowPermission<CashIssueAndPaymentFlow>(),
|
||||||
startFlowPermission<CashExitFlow>()))
|
startFlowPermission<CashConfigDataFlow>()
|
||||||
val bigCorpUser = User(BIGCORP_USERNAME, "test",
|
))
|
||||||
permissions = setOf(
|
|
||||||
startFlowPermission<CashPaymentFlow>()))
|
|
||||||
startNode(providedName = DUMMY_NOTARY.name,
|
|
||||||
advertisedServices = setOf(ServiceInfo(SimpleNotaryService.type)))
|
|
||||||
val bankOfCorda = startNode(
|
val bankOfCorda = startNode(
|
||||||
providedName = BOC.name,
|
providedName = BOC.name,
|
||||||
rpcUsers = listOf(bankUser))
|
rpcUsers = listOf(bankUser))
|
||||||
|
val bigCorpUser = User(BIGCORP_USERNAME, "test",
|
||||||
|
permissions = setOf(
|
||||||
|
startFlowPermission<CashPaymentFlow>(),
|
||||||
|
startFlowPermission<CashConfigDataFlow>()))
|
||||||
startNode(providedName = BIGCORP_LEGAL_NAME, rpcUsers = listOf(bigCorpUser))
|
startNode(providedName = BIGCORP_LEGAL_NAME, rpcUsers = listOf(bigCorpUser))
|
||||||
startWebserver(bankOfCorda.get())
|
startWebserver(bankOfCorda.get())
|
||||||
waitForAllNodesToFinish()
|
waitForAllNodesToFinish()
|
||||||
|
Loading…
Reference in New Issue
Block a user