Return-Path: X-Original-To: apmail-geode-commits-archive@minotaur.apache.org Delivered-To: apmail-geode-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A0CC818EE1 for ; Thu, 17 Mar 2016 21:14:07 +0000 (UTC) Received: (qmail 32365 invoked by uid 500); 17 Mar 2016 21:14:07 -0000 Delivered-To: apmail-geode-commits-archive@geode.apache.org Received: (qmail 32332 invoked by uid 500); 17 Mar 2016 21:14:07 -0000 Mailing-List: contact commits-help@geode.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.incubator.apache.org Delivered-To: mailing list commits@geode.incubator.apache.org Received: (qmail 32323 invoked by uid 99); 17 Mar 2016 21:14:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Mar 2016 21:14:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 3489FC0741 for ; Thu, 17 Mar 2016 21:14:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.221 X-Spam-Level: X-Spam-Status: No, score=-3.221 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id N7t_P3WB5PKh for ; Thu, 17 Mar 2016 21:14:04 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id 7BF2B5F252 for ; Thu, 17 Mar 2016 21:14:01 +0000 (UTC) Received: (qmail 30391 invoked by uid 99); 17 Mar 2016 21:14:00 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Mar 2016 21:14:00 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6C933DFA0A; Thu, 17 Mar 2016 21:14:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: klund@apache.org To: commits@geode.incubator.apache.org Date: Thu, 17 Mar 2016 21:14:24 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [26/26] incubator-geode git commit: Merge remote-tracking branch 'origin/develop' into feature/GEODE-949-2 Merge remote-tracking branch 'origin/develop' into feature/GEODE-949-2 Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/2184de4d Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/2184de4d Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/2184de4d Branch: refs/heads/feature/GEODE-949-2 Commit: 2184de4dc872264b3adc2f0975488d06b13e143d Parents: 5dcd681 d72986b Author: Kirk Lund Authored: Thu Mar 17 14:13:49 2016 -0700 Committer: Kirk Lund Committed: Thu Mar 17 14:13:49 2016 -0700 ---------------------------------------------------------------------- .travis.yml | 7 +- .../rest/internal/web/RestFunctionTemplate.java | 23 + ...stAPIOnRegionFunctionExecutionDUnitTest.java | 479 ++++----------- .../web/controllers/RestAPITestBase.java | 209 +++++-- ...tAPIsOnGroupsFunctionExecutionDUnitTest.java | 310 +++------- ...APIsOnMembersFunctionExecutionDUnitTest.java | 299 ++-------- .../gemfire/internal/SocketCreator.java | 2 +- .../internal/cache/AbstractRegionEntry.java | 22 +- .../gemfire/internal/cache/BucketRegion.java | 6 +- .../gemfire/internal/cache/TXManagerImpl.java | 3 +- .../gemfire/internal/cache/UpdateOperation.java | 2 +- .../cache/control/HeapMemoryMonitor.java | 14 +- .../cache/tier/sockets/AcceptorImpl.java | 9 +- .../tier/sockets/ClientUpdateMessageImpl.java | 2 +- .../internal/cache/tier/sockets/Message.java | 2 +- .../AbstractGatewaySenderEventProcessor.java | 48 +- .../cache/wan/GatewaySenderEventImpl.java | 33 +- .../parallel/ParallelGatewaySenderQueue.java | 74 ++- .../gemfire/internal/i18n/LocalizedStrings.java | 6 +- .../gemfire/internal/offheap/Fragment.java | 4 +- .../internal/offheap/FreeListManager.java | 44 +- .../internal/offheap/LifecycleListener.java | 20 +- .../internal/offheap/MemoryAllocatorImpl.java | 507 ++++++++++++++++ .../internal/offheap/MemoryBlockNode.java | 4 +- .../internal/offheap/OffHeapMemoryStats.java | 8 +- .../internal/offheap/OffHeapStorage.java | 60 +- .../internal/offheap/OffHeapStoredObject.java | 26 +- .../OffHeapStoredObjectAddressStack.java | 4 +- .../internal/offheap/RefCountChangeInfo.java | 2 +- .../internal/offheap/ReferenceCountHelper.java | 4 +- .../offheap/SimpleMemoryAllocatorImpl.java | 507 ---------------- .../internal/beans/MemberMBeanBridge.java | 2 +- .../gemfire/cache30/CacheXml80DUnitTest.java | 2 + .../gemfire/cache30/MultiVMRegionTestCase.java | 22 +- .../disttx/DistTXManagerImplJUnitTest.java | 6 + .../cache/ClientServerGetAllDUnitTest.java | 4 +- .../gemfire/internal/cache/OffHeapTestUtil.java | 6 +- .../cache/OffHeapValueWrapperJUnitTest.java | 8 +- .../cache/OldValueImporterTestBase.java | 26 +- .../internal/cache/TXManagerImplJUnitTest.java | 11 + .../internal/offheap/FreeListManagerTest.java | 72 +-- .../offheap/LifecycleListenerJUnitTest.java | 36 +- ...moryAllocatorFillPatternIntegrationTest.java | 246 ++++++++ .../MemoryAllocatorFillPatternJUnitTest.java | 183 ++++++ .../offheap/MemoryAllocatorJUnitTest.java | 594 +++++++++++++++++++ .../offheap/MemoryBlockNodeJUnitTest.java | 6 +- .../offheap/NullOffHeapMemoryStats.java | 8 +- .../offheap/OffHeapHelperJUnitTest.java | 4 +- .../internal/offheap/OffHeapIndexJUnitTest.java | 2 +- .../internal/offheap/OffHeapRegionBase.java | 6 +- .../OffHeapRegionEntryHelperJUnitTest.java | 4 +- .../offheap/OffHeapStorageJUnitTest.java | 24 +- ...ffHeapStoredObjectAddressStackJUnitTest.java | 40 +- .../offheap/OffHeapStoredObjectJUnitTest.java | 4 +- .../offheap/OffHeapValidationJUnitTest.java | 2 +- .../OffHeapWriteObjectAsByteArrayJUnitTest.java | 8 +- .../offheap/OutOfOffHeapMemoryDUnitTest.java | 2 +- ...moryAllocatorFillPatternIntegrationTest.java | 246 -------- ...mpleMemoryAllocatorFillPatternJUnitTest.java | 183 ------ .../offheap/SimpleMemoryAllocatorJUnitTest.java | 594 ------------------- .../offheap/TinyMemoryBlockJUnitTest.java | 8 +- .../TxReleasesOffHeapOnCloseJUnitTest.java | 2 +- .../OffHeapByteBufferByteSourceJUnitTest.java | 4 +- .../gemfire/pdx/OffHeapByteSourceJUnitTest.java | 8 +- .../security/ClientAuthorizationTestBase.java | 49 +- .../generator/SSLCredentialGenerator.java | 2 +- .../com/gemstone/gemfire/test/dunit/VM.java | 2 +- .../test/dunit/tests/BasicDUnitTest.java | 42 ++ geode-site/website/README.md | 2 +- geode-site/website/Rules | 3 - geode-site/website/content/community/index.html | 2 +- geode-site/website/content/docs/index.html | 48 ++ geode-site/website/layouts/default.html | 32 - geode-site/website/layouts/footer.html | 2 +- geode-site/website/layouts/header.html | 2 +- .../wan/GatewaySenderEventRemoteDispatcher.java | 44 +- .../gemfire/internal/cache/wan/WANTestBase.java | 26 +- .../cache/wan/misc/WANSSLDUnitTest.java | 2 + ...arallelGatewaySenderOperationsDUnitTest.java | 35 ++ .../controllers/FunctionAccessController.java | 195 +++--- .../rest/internal/web/util/ArrayUtils.java | 12 +- gradle/dependency-versions.properties | 4 +- 82 files changed, 2686 insertions(+), 2931 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2184de4d/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java ---------------------------------------------------------------------- diff --cc geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java index d49c423,8476ae2..c7eed57 --- a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java @@@ -1,6 -1,6 +1,3 @@@ -- --package com.gemstone.gemfire.security; -- /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@@ -9,9 -9,9 +6,9 @@@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at -- * ++ * * http://www.apache.org/licenses/LICENSE-2.0 -- * ++ * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@@ -19,7 -19,7 +16,7 @@@ * specific language governing permissions and limitations * under the License. */ -- ++package com.gemstone.gemfire.security; import java.util.ArrayList; import java.util.HashMap; @@@ -58,12 -55,8 +52,13 @@@ import com.gemstone.gemfire.internal.Av import com.gemstone.gemfire.internal.cache.AbstractRegionEntry; import com.gemstone.gemfire.internal.cache.LocalRegion; import com.gemstone.gemfire.internal.util.Callable; ++import com.gemstone.gemfire.security.generator.AuthzCredentialGenerator; ++import com.gemstone.gemfire.security.generator.AuthzCredentialGenerator.ClassCode; +import com.gemstone.gemfire.security.generator.CredentialGenerator; +import com.gemstone.gemfire.security.generator.DummyCredentialGenerator; +import com.gemstone.gemfire.security.generator.XmlAuthzCredentialGenerator; import com.gemstone.gemfire.test.dunit.Assert; import com.gemstone.gemfire.test.dunit.DistributedTestCase; - import com.gemstone.gemfire.test.dunit.LogWriterUtils; import com.gemstone.gemfire.test.dunit.VM; import com.gemstone.gemfire.test.dunit.Wait; import com.gemstone.gemfire.test.dunit.WaitCriterion; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2184de4d/geode-core/src/test/java/com/gemstone/gemfire/security/generator/SSLCredentialGenerator.java ---------------------------------------------------------------------- diff --cc geode-core/src/test/java/com/gemstone/gemfire/security/generator/SSLCredentialGenerator.java index 10e2e18,0000000..ff23f78 mode 100755,000000..100755 --- a/geode-core/src/test/java/com/gemstone/gemfire/security/generator/SSLCredentialGenerator.java +++ b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/SSLCredentialGenerator.java @@@ -1,121 -1,0 +1,121 @@@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.gemstone.gemfire.security.generator; + +import com.gemstone.gemfire.internal.logging.LogService; +import com.gemstone.gemfire.security.AuthenticationFailedException; +import org.apache.logging.log4j.Logger; + +import java.io.File; +import java.io.IOException; +import java.security.Principal; +import java.util.Properties; + +public class SSLCredentialGenerator extends CredentialGenerator { + + private static final Logger logger = LogService.getLogger(); + + @Override + protected Properties initialize() throws IllegalArgumentException { + this.javaProperties = getValidJavaSSLProperties(); + return getSSLProperties(); + } + + @Override + public ClassCode classCode() { + return ClassCode.SSL; + } + + @Override + public String getAuthInit() { + return null; + } + + @Override + public String getAuthenticator() { + return null; + } + + @Override + public Properties getValidCredentials(int index) { + this.javaProperties = getValidJavaSSLProperties(); + return getSSLProperties(); + } + + @Override + public Properties getValidCredentials(final Principal principal) { + this.javaProperties = getValidJavaSSLProperties(); + return getSSLProperties(); + } + + @Override + public Properties getInvalidCredentials(final int index) { + this.javaProperties = getInvalidJavaSSLProperties(); + return getSSLProperties(); + } + + private File findTrustedJKS() { + final File ssldir = new File(System.getProperty("JTESTS") + "/ssl"); + return new File(ssldir, "trusted.keystore"); + } + + private File findUntrustedJKS() { + final File ssldir = new File(System.getProperty("JTESTS") + "/ssl"); + return new File(ssldir, "untrusted.keystore"); + } + + private Properties getValidJavaSSLProperties() { + final File jks = findTrustedJKS(); + + try { + final Properties props = new Properties(); + props.setProperty("javax.net.ssl.trustStore", jks.getCanonicalPath()); + props.setProperty("javax.net.ssl.trustStorePassword", "password"); + props.setProperty("javax.net.ssl.keyStore", jks.getCanonicalPath()); + props.setProperty("javax.net.ssl.keyStorePassword", "password"); + return props; + + } catch (IOException ex) { + throw new AuthenticationFailedException("SSL: Exception while opening the key store: " + ex.getMessage(), ex); + } + } + + private Properties getInvalidJavaSSLProperties() { + final File jks = findUntrustedJKS(); + + try { + final Properties props = new Properties(); + props.setProperty("javax.net.ssl.trustStore", jks.getCanonicalPath()); + props.setProperty("javax.net.ssl.trustStorePassword", "password"); + props.setProperty("javax.net.ssl.keyStore", jks.getCanonicalPath()); + props.setProperty("javax.net.ssl.keyStorePassword", "password"); + return props; + + } catch (IOException ex) { + throw new AuthenticationFailedException("SSL: Exception while opening the key store: " + ex.getMessage(), ex); + } + } + + private Properties getSSLProperties() { + Properties props = new Properties(); + props.setProperty("ssl-enabled", "true"); + props.setProperty("ssl-require-authentication", "true"); - props.setProperty("ssl-ciphers", "SSL_RSA_WITH_RC4_128_MD5"); ++ props.setProperty("ssl-ciphers", "SSL_RSA_WITH_3DES_EDE_CBC_SHA"); + props.setProperty("ssl-protocols", "TLSv1"); + return props; + } +}