mgm
This section lists the Corda CLI mgm
arguments. You can use these commands to execute membership operations, as described in the Onboarding Tutorials.
Running the groupPolicy
command without any arguments prints a sample GroupPolicy.json
file that you can manually tweak.
corda-cli.sh mgm groupPolicy
corda-cli.sh mgm groupPolicy
corda-cli.cmd mgm groupPolicy
Alternatively, use the following command line arguments to define the static network section of the GroupPolicy:
Argument | Description |
---|---|
--file, -f | The path to a JSON or YAML file that contains static network information; see Generating GroupPolicy Using File Input. |
--name | The X.500 name of the member; see Generating GroupPolicy Using String Parameters. |
--endpoint | The endpoint base URL; see Generating GroupPolicy Using String Parameters. |
--endpoint-protocol | The version of end-to-end authentication protocol; see Generating GroupPolicy Using String Parameters. |
Generating GroupPolicy Using File Input
To generate GroupPolicy using file input:
corda-cli.sh groupPolicy --file="app/build/resources/src.yaml"
corda-cli.sh groupPolicy --file="app/build/resources/src.yaml"
corda-cli.cmd groupPolicy --file="app/build/resources/src.yaml"
- Only
memberNames
ormembers
blocks may be present. - A single endpoint is assumed for all members when
memberNames
is used. - Endpoint information specified under
members
overrides endpoint information set at the root level. An error is thrown if no endpoint information is provided.
Sample Files
JSON with
memberNames
:{ "endpoint": "http://dummy-url", "endpointProtocol": 5, "memberNames": ["C=GB, L=London, O=Member1", "C=GB, L=London, O=Member2"] }
JSON with
members
:{ "members": [ { "name": "C=GB, L=London, O=Member1", "status": "PENDING", "endpoint": "http://dummy-url", "endpointProtocol": 5 }, { "name": "C=GB, L=London, O=Member2", "endpoint": "http://dummy-url2", "endpointProtocol": 5 } ] }
YAML with
memberNames
:endpoint: "http://dummy-url" endpointProtocol: 5 memberNames: ["C=GB, L=London, O=Member1", "C=GB, L=London, O=Member2"]
YAML with
members
which all use a common endpoint, and Member1 overrides the protocol version:endpoint: "http://dummy-url" endpointProtocol: 5 members: - name: "C=GB, L=London, O=Member1" status: "PENDING" endpointProtocol: 10 - name: "C=GB, L=London, O=Member2"
Generating GroupPolicy Using String Parameters
To generate GroupPolicy using parameters:
corda-cli.sh groupPolicy --name="C=GB, L=London, O=Member1" --name="C=GB, L=London, O=Member2" --endpoint-protocol=5 --endpoint="http://dummy-url"
corda-cli.sh groupPolicy --name="C=GB, L=London, O=Member1" --name="C=GB, L=London, O=Member2" --endpoint-protocol=5 --endpoint="http://dummy-url"
corda-cli.cmd groupPolicy --name="C=GB, L=London, O=Member1" --name="C=GB, L=London, O=Member2" --endpoint-protocol=5 --endpoint="http://dummy-url"
- Passing one or more
--name
arguments without specifying endpoint information throws an error. - Not passing any
--name
arguments returns a GroupPolicy with an empty list of static members. - A single endpoint is assumed for all members.
Was this page helpful?
Thanks for your feedback!
Chat with us
Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.
Propose documentation improvements directly
Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.
We're sorry this page wasn't helpful. Let us know how we can make it better!
Chat with us
Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.
Create an issue
Create a new GitHub issue in this repository - submit technical feedback, draw attention to a potential documentation bug, or share ideas for improvement and general feedback.
Propose documentation improvements directly
Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.