You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ignite TC Bot (Jira)" <ji...@apache.org> on 2021/08/25 09:01:00 UTC

[jira] [Commented] (IGNITE-15358) Client node can't reconnect to cluster with security enabled.

    [ https://issues.apache.org/jira/browse/IGNITE-15358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17404286#comment-17404286 ] 

Ignite TC Bot commented on IGNITE-15358:
----------------------------------------

{panel:title=Branch: [pull/9348/head] Base: [master] : No blockers found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
{panel:title=Branch: [pull/9348/head] Base: [master] : New Tests (1)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#00008b}Security{color} [[tests 1|https://ci.ignite.apache.org/viewLog.html?buildId=6151644]]
* {color:#013220}SecurityTestSuite: ClientReconnectTest.testClientNodeReconnected - PASSED{color}

{panel}
[TeamCity *--&gt; Run :: All* Results|https://ci.ignite.apache.org/viewLog.html?buildId=6151657&amp;buildTypeId=IgniteTests24Java8_RunAll]

> Client node can't reconnect to cluster with security enabled.
> -------------------------------------------------------------
>
>                 Key: IGNITE-15358
>                 URL: https://issues.apache.org/jira/browse/IGNITE-15358
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Nikolay Izhikov
>            Assignee: Nikolay Izhikov
>            Priority: Blocker
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> After IGNITE-15101 client node can't reconnect to the cluster because node id changed on the disconnect but security processor continues to use old node id.
> {code:java}
> public class ClientReconnectTest extends GridCommonAbstractTest {
>     /** {@inheritDoc} */
>     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
>         return super.getConfiguration(igniteInstanceName).setPluginProviders(new TestReconnectSecurityPluginProvider() {
>             /** {@inheritDoc} */
>             @Override protected GridSecurityProcessor securityProcessor(GridKernalContext ctx) {
>                 return new TestReconnectProcessor(ctx) {
>                     @Override public SecurityContext securityContext(UUID subjId) {
>                         if (ctx.localNodeId().equals(subjId))
>                             return ctx.security().securityContext();
>                         throw new IgniteException(
>                             "Unexpected subjId[subjId=" + subjId + ",localNodeId=" + ctx.localNodeId() + ']'
>                         );
>                     }
>                     @Override public SecurityContext authenticateNode(ClusterNode node, SecurityCredentials cred) {
>                         return new TestSecurityContext(new TestSecuritySubject(node.id()));
>                     }
>                 };
>             }
>         });
>     }
>     /** {@inheritDoc} */
>     @Override protected void beforeTest() throws Exception {
>         super.beforeTest();
>         cleanPersistenceDir();
>     }
>     /** */
>     @Test
>     public void testClientNodeReconnected() throws Exception {
>         IgniteEx ignite = startGrids(2);
>         ignite.cluster().state(ClusterState.ACTIVE);
>         int clientIdx = 2;
>         IgniteEx ex = startClientGrid(clientIdx);
>         CountDownLatch latch = new CountDownLatch(1);
>         ex.events().localListen(evt -> {
>             latch.countDown();
>             return true;
>         }, EVT_CLIENT_NODE_RECONNECTED);
>         DiscoverySpi discoverySpi = ignite(0).configuration().getDiscoverySpi();
>         discoverySpi.failNode(nodeId(clientIdx), null);
>         assertTrue(latch.await(getTestTimeout(), TimeUnit.MILLISECONDS));
>     }
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)