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

ASF subversion and git services commented on GEODE-5085:
--------------------------------------------------------

Commit 2c28e0a4b894611e0c61a742030e0eb1d377e462 in geode's branch 
refs/heads/feature/GEODE-5085 from [~bschuchardt]
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=2c28e0a ]

GEODE-5085 authentication failure when auto-reconnecting

Reverting getSecurityProps() to return the converted internal form of
property values.  The security service expects these to be in this form
and not the external form.  My change caused a handful of security tests
to fail.

Added toSecurityProperties() in Config.java and converted
InternalDistributedSystem.reconnect() to use this and toProperties()
to get the external form of properties in order to build the new
DistributionConfig to feed the reconnecting system.


> authentication failure when auto-reconnecting
> ---------------------------------------------
>
>                 Key: GEODE-5085
>                 URL: https://issues.apache.org/jira/browse/GEODE-5085
>             Project: Geode
>          Issue Type: Bug
>          Components: membership, security
>            Reporter: Bruce Schuchardt
>            Assignee: Bruce Schuchardt
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> I added a security manager to ReconnectDUnitTest.testReconnectWithQuorum() 
> and got a failure to authenticate during the reconnect attempt.
> {noformat}
> [vm3] [warn 2018/04/16 10:37:17.773 PDT <ReconnectThread> tid=92] Exception 
> occurred while trying to connect the system during reconnect
> [vm3] org.apache.geode.security.AuthenticationRequiredException: Failed to 
> find credentials from [10.118.20.59(16110:locator)<ec>:32770]
> [vm3]         at 
> org.apache.geode.distributed.internal.membership.gms.membership.GMSJoinLeave.attemptToJoin(GMSJoinLeave.java:452)
> [vm3]         at 
> org.apache.geode.distributed.internal.membership.gms.membership.GMSJoinLeave.join(GMSJoinLeave.java:338)
> [vm3]         at 
> org.apache.geode.distributed.internal.membership.gms.mgr.GMSMembershipManager.join(GMSMembershipManager.java:658)
> [vm3]         at 
> org.apache.geode.distributed.internal.membership.gms.mgr.GMSMembershipManager.joinDistributedSystem(GMSMembershipManager.java:747)
> [vm3]         at 
> org.apache.geode.distributed.internal.membership.gms.Services.start(Services.java:191)
> [vm3]         at 
> org.apache.geode.distributed.internal.membership.gms.GMSMemberFactory.newMembershipManager(GMSMemberFactory.java:106)
> [vm3]         at 
> org.apache.geode.distributed.internal.membership.MemberFactory.newMembershipManager(MemberFactory.java:90)
> [vm3]         at 
> org.apache.geode.distributed.internal.ClusterDistributionManager.<init>(ClusterDistributionManager.java:1027)
> [vm3]         at 
> org.apache.geode.distributed.internal.ClusterDistributionManager.<init>(ClusterDistributionManager.java:1061)
> [vm3]         at 
> org.apache.geode.distributed.internal.ClusterDistributionManager.create(ClusterDistributionManager.java:554)
> [vm3]         at 
> org.apache.geode.distributed.internal.InternalDistributedSystem.initialize(InternalDistributedSystem.java:762)
> [vm3]         at 
> org.apache.geode.distributed.internal.InternalDistributedSystem.newInstance(InternalDistributedSystem.java:354)
> [vm3]         at 
> org.apache.geode.distributed.internal.InternalDistributedSystem.newInstance(InternalDistributedSystem.java:340)
> [vm3]         at 
> org.apache.geode.distributed.internal.InternalDistributedSystem.newInstance(InternalDistributedSystem.java:334)
> [vm3]         at 
> org.apache.geode.distributed.DistributedSystem.connect(DistributedSystem.java:211)
> [vm3]         at 
> org.apache.geode.distributed.internal.InternalDistributedSystem.reconnect(InternalDistributedSystem.java:2732)
> [vm3]         at 
> org.apache.geode.distributed.internal.InternalDistributedSystem.tryReconnect(InternalDistributedSystem.java:2558)
> [vm3]         at 
> org.apache.geode.distributed.internal.InternalDistributedSystem.disconnect(InternalDistributedSystem.java:1040)
> [vm3]         at 
> org.apache.geode.distributed.internal.ClusterDistributionManager$DMListener.membershipFailure(ClusterDistributionManager.java:4030)
> [vm3]         at 
> org.apache.geode.distributed.internal.membership.gms.mgr.GMSMembershipManager.uncleanShutdown(GMSMembershipManager.java:1554)
> [vm3]         at 
> org.apache.geode.distributed.internal.membership.gms.mgr.GMSMembershipManager.lambda$forceDisconnect$1(GMSMembershipManager.java:2561)
> [vm3]         at java.lang.Thread.run(Thread.java:748)
> {noformat}
> The security manager settings were added to getDistributedSystemProperties():
> {code}
>   @Override
>   public Properties getDistributedSystemProperties() {
>     if (dsProperties == null) {
>       dsProperties = new Properties();
>       dsProperties.put(MAX_WAIT_TIME_RECONNECT, "20000");
>       dsProperties.put(ENABLE_NETWORK_PARTITION_DETECTION, "true");
>       dsProperties.put(DISABLE_AUTO_RECONNECT, "false");
>       dsProperties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
>       dsProperties.put(LOCATORS, "localHost[" + locatorPort + "]");
>       dsProperties.put(MCAST_PORT, "0");
>       dsProperties.put(MEMBER_TIMEOUT, "1000");
>       dsProperties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
>       dsProperties.put(SECURITY_MANAGER, 
> SimpleSecurityManager.class.getName());
>       dsProperties.put("security-username", "clusterManage");
>       dsProperties.put("security-password", "clusterManage");
>       addDSProps(dsProperties);
>     }
>     return dsProperties;
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to