Database 如何在Corda community edition中使用数据源类型DB建立rpc属性?

Database 如何在Corda community edition中使用数据源类型DB建立rpc属性?,database,rpc,corda,Database,Rpc,Corda,要在community edition中建立RPC连接,我们需要指定RPC用户名、密码和权限,但当我们集成外部数据库(如MySQL)并将数据源类型从INMEMORY更改为“DB”时,不允许提供用户属性 这些是我在node.conf中使用的设置 security = { authService = { dataSource = { type = "DB" passwordEncryption = "SHIRO_1_CRYPT" conne

要在community edition中建立RPC连接,我们需要指定RPC用户名、密码和权限,但当我们集成外部数据库(如MySQL)并将数据源类型从INMEMORY更改为“DB”时,不允许提供用户属性

这些是我在node.conf中使用的设置

security = {
  authService = {
    dataSource = {
        type = "DB"
        passwordEncryption = "SHIRO_1_CRYPT"
        connection = {
            jdbcUrl = "jdbc:mysql://localhost:3306"
            username = "root"
            password = "password"
            driverClassName = "com.mysql.jdbc.Driver"
        }
    }
    options = {
        cache = {
            expireAfterSecs = 120
            maxEntries = 10000
        }
    }
}

也许我不理解你的问题,但是
node.conf
中的数据库设置与
node.conf
中的RPC用户设置是分开的:
数据库(就我而言是PostGres)

RPC用户

rpcUsers = [[ user: "rpc_user", "password": "rpc_user_password", "permissions": ["ALL"]]]
好的,我正在添加我的节点的
node.config
(它是Corda TestNet的一部分,部署在Google云上):


嗨,Adel,这正是我要问的,但我试图使用rpcUsers属性运行节点,结果出现错误“未知属性:rpcUsers”。你能粘贴你的
node.conf
文件吗?我也更新了我的答案,并添加了一个示例
node.conf
rpcUsers = [[ user: "rpc_user", "password": "rpc_user_password", "permissions": ["ALL"]]]
baseDirectory = "."
compatibilityZoneURL = "https://netmap.testnet.r3.com"
emailAddress = "xxx"
jarDirs = [ "plugins", "cordapps" ]
sshd { port = 2222 }
myLegalName = "OU=xxx, O=TESTNET_xxx, L=London, C=GB"
keyStorePassword = "xxx"
trustStorePassword = "xxx"
crlCheckSoftFail = true
database = {
    transactionIsolationLevel = "READ_COMMITTED"
    initialiseSchema = "true"
}
dataSourceProperties {
    dataSourceClassName = "org.postgresql.ds.PGSimpleDataSource"
    dataSource.url = "jdbc:postgresql://xxx:xxx/postgres"
    dataSource.user = xxx
    dataSource.password = xxx
}
p2pAddress = "xxx:xxx"
rpcSettings {
    useSsl = false
    standAloneBroker = false
    address = "0.0.0.0:xxx"
    adminAddress = "0.0.0.0:xxx"
}
rpcUsers = [
    { username=cordazoneservice, password=xxx, permissions=[ ALL ] }
]
devMode = false
cordappSignerKeyFingerprintBlacklist = []
useTestClock = false