@Test public void testExternalAuthenticationMultinode() throws Throwable { VerificationHost host1 = createAndStartHost(true, false, new TestAuthenticationService()); VerificationHost host2 = createAndStartHost(true, false, new TestAuthenticationService()); VerificationHost host3 = createAndStartHost(true, false, new TestAuthenticationService()); TestNodeGroupManager nodeGroup = new TestNodeGroupManager(); nodeGroup.addHost(host1); nodeGroup.addHost(host2); nodeGroup.addHost(host3); // perform lambda under system auth context AuthTestUtils.executeWithSystemAuthContext(nodeGroup, () -> { nodeGroup.joinNodeGroupAndWaitForConvergence(); // wait the service to be available in cluster nodeGroup.waitForFactoryServiceAvailable("/core/examples"); }); ServiceHost host = nodeGroup.getHost(); // test external auth redirect host1.log("Testing auth service redirect in multi-node"); testExternalAuthRedirectMultinode(host); host1.log("Auth service redirect in multi-node working as expected"); // test external auth token request host1.log("Testing auth service token request in multi-node"); testExternalAuthTokenRequestMultinode(host); host1.log("AuthenticationService token request is working in multi-node"); // test replication with external auth host1.log("Testing replication with external auth in multi-node"); testExternalAuthReplicationMultinode(host); host1.log("Replication with external auth in multi-node is working"); }
@Test public void testExternalAuthenticationMultinode() throws Throwable { VerificationHost host1 = createAndStartHost(true, false, new TestAuthenticationService()); VerificationHost host2 = createAndStartHost(true, false, new TestAuthenticationService()); VerificationHost host3 = createAndStartHost(true, false, new TestAuthenticationService()); TestNodeGroupManager nodeGroup = new TestNodeGroupManager(); nodeGroup.addHost(host1); nodeGroup.addHost(host2); nodeGroup.addHost(host3); // perform lambda under system auth context AuthTestUtils.executeWithSystemAuthContext(nodeGroup, () -> { nodeGroup.joinNodeGroupAndWaitForConvergence(); // wait the service to be available in cluster nodeGroup.waitForFactoryServiceAvailable("/core/examples"); }); ServiceHost host = nodeGroup.getHost(); // test external auth redirect host1.log("Testing auth service redirect in multi-node"); testExternalAuthRedirectMultinode(host); host1.log("Auth service redirect in multi-node working as expected"); // test external auth token request host1.log("Testing auth service token request in multi-node"); testExternalAuthTokenRequestMultinode(host); host1.log("AuthenticationService token request is working in multi-node"); // test replication with external auth host1.log("Testing replication with external auth in multi-node"); testExternalAuthReplicationMultinode(host); host1.log("Replication with external auth in multi-node is working"); }
nodeGroup.addHost(host);
nodeGroup.addHost(host);