use of org.hyperledger.besu.tests.acceptance.dsl.node.cluster.ClusterConfiguration in project besu by hyperledger.
the class MultiTenancyValidationFailAcceptanceTest method setUp.
@Before
public void setUp() throws Exception {
final ClusterConfiguration clusterConfiguration = new ClusterConfigurationBuilder().awaitPeerDiscovery(false).build();
multiTenancyCluster = new Cluster(clusterConfiguration, net);
node = besu.createNodeWithMultiTenantedPrivacy("node1", "http://127.0.0.1:" + wireMockRule.port(), "authentication/auth_priv.toml", "authentication/auth_priv_key", false);
multiTenancyCluster.start(node);
final String token = node.execute(permissioningTransactions.createSuccessfulLogin("failUser", "pegasys"));
node.useAuthenticationTokenInHeaderForJsonRpc(token);
}
use of org.hyperledger.besu.tests.acceptance.dsl.node.cluster.ClusterConfiguration in project besu by hyperledger.
the class SECP256R1AcceptanceTest method setUp.
@Before
public void setUp() throws Exception {
KeyPair minerNodeKeyPair = createKeyPair(MINER_NODE_PRIVATE_KEY);
KeyPair otherNodeKeyPair = createKeyPair(OTHER_NODE_PRIVATE_KEY);
final ClusterConfiguration clusterConfiguration = new ClusterConfigurationBuilder().awaitPeerDiscovery(false).build();
noDiscoveryCluster = new Cluster(clusterConfiguration, net);
minerNode = besu.createNodeWithNonDefaultSignatureAlgorithm("minerNode", GENESIS_FILE, minerNodeKeyPair);
noDiscoveryCluster.start(minerNode);
otherNode = besu.createNodeWithNonDefaultSignatureAlgorithm("otherNode", GENESIS_FILE, otherNodeKeyPair, List.of(minerNode));
noDiscoveryCluster.addNode(otherNode);
}
use of org.hyperledger.besu.tests.acceptance.dsl.node.cluster.ClusterConfiguration in project besu by hyperledger.
the class NodeLocalConfigPermissioningAcceptanceTest method setUp.
@Before
public void setUp() throws Exception {
final ClusterConfiguration clusterConfiguration = new ClusterConfigurationBuilder().awaitPeerDiscovery(false).build();
permissionedCluster = new Cluster(clusterConfiguration, net);
bootnode = besu.createArchiveNode("bootnode");
forbiddenNode = besu.createArchiveNodeThatMustNotBeTheBootnode("forbidden-node");
allowedNode = besu.createArchiveNode("allowed-node");
permissionedCluster.start(bootnode, allowedNode, forbiddenNode);
permissionedNode = permissionedNodeBuilder.nodesPermittedInConfig(bootnode, allowedNode).build();
permissionedCluster.addNode(permissionedNode);
}
use of org.hyperledger.besu.tests.acceptance.dsl.node.cluster.ClusterConfiguration in project besu by hyperledger.
the class JsonRpcHttpAuthenticationAcceptanceTest method setUp.
@Before
public void setUp() throws IOException, URISyntaxException {
final ClusterConfiguration clusterConfiguration = new ClusterConfigurationBuilder().awaitPeerDiscovery(false).build();
authenticatedCluster = new Cluster(clusterConfiguration, net);
nodeUsingAuthFile = besu.createNodeWithAuthentication("node1", AUTH_FILE);
nodeUsingRsaJwtPublicKey = besu.createNodeWithAuthenticationUsingRsaJwtPublicKey("node2");
nodeUsingEcdsaJwtPublicKey = besu.createNodeWithAuthenticationUsingEcdsaJwtPublicKey("node3");
nodeUsingAuthFileWithNoAuthApi = besu.createNodeWithAuthFileAndNoAuthApi("node4", AUTH_FILE, NO_AUTH_API_METHODS);
authenticatedCluster.start(nodeUsingAuthFile, nodeUsingRsaJwtPublicKey, nodeUsingEcdsaJwtPublicKey, nodeUsingAuthFileWithNoAuthApi);
nodeUsingAuthFile.verify(login.awaitResponse("user", "badpassword"));
nodeUsingRsaJwtPublicKey.verify(login.awaitResponse("user", "badpassword"));
nodeUsingEcdsaJwtPublicKey.verify(login.awaitResponse("user", "badpassword"));
nodeUsingAuthFileWithNoAuthApi.verify(login.awaitResponse("user", "badpassword"));
}
use of org.hyperledger.besu.tests.acceptance.dsl.node.cluster.ClusterConfiguration in project besu by hyperledger.
the class JsonRpcWebsocketAuthenticationAcceptanceTest method setUp.
@Before
public void setUp() throws IOException, URISyntaxException {
final ClusterConfiguration clusterConfiguration = new ClusterConfigurationBuilder().awaitPeerDiscovery(false).build();
authenticatedCluster = new Cluster(clusterConfiguration, net);
nodeUsingAuthFile = besu.createNodeWithAuthentication("node1", AUTH_FILE);
nodeUsingRsaJwtPublicKey = besu.createNodeWithAuthenticationUsingRsaJwtPublicKey("node2");
nodeUsingEcdsaJwtPublicKey = besu.createNodeWithAuthenticationUsingEcdsaJwtPublicKey("node3");
nodeUsingAuthFileWithNoAuthApi = besu.createWsNodeWithAuthFileAndNoAuthApi("node4", AUTH_FILE, NO_AUTH_API_METHODS);
authenticatedCluster.start(nodeUsingAuthFile, nodeUsingRsaJwtPublicKey, nodeUsingEcdsaJwtPublicKey, nodeUsingAuthFileWithNoAuthApi);
nodeUsingAuthFile.useWebSocketsForJsonRpc();
nodeUsingRsaJwtPublicKey.useWebSocketsForJsonRpc();
nodeUsingEcdsaJwtPublicKey.useWebSocketsForJsonRpc();
nodeUsingAuthFileWithNoAuthApi.useWebSocketsForJsonRpc();
nodeUsingAuthFile.verify(login.awaitResponse("user", "badpassword"));
nodeUsingRsaJwtPublicKey.verify(login.awaitResponse("user", "badpassword"));
nodeUsingEcdsaJwtPublicKey.verify(login.awaitResponse("user", "badpassword"));
nodeUsingAuthFileWithNoAuthApi.verify(login.awaitResponse("user", "badpassword"));
}
Aggregations