You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/06/22 13:05:44 UTC

[1/3] incubator-ignite git commit: #IGNITE-GG-10449 marshal credentials in client discovery.

Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-sprint-6 a4ce455bb -> de0930d3b


#IGNITE-GG-10449 marshal credentials in client discovery.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a3d8e603
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a3d8e603
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a3d8e603

Branch: refs/heads/ignite-sprint-6
Commit: a3d8e603a5c9a7fbf3f81a7dd2aded2a8139f578
Parents: 1cc0000
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Jun 22 11:33:53 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Jun 22 11:33:53 2015 +0300

----------------------------------------------------------------------
 .../ignite/spi/discovery/tcp/ClientImpl.java    | 23 ++++++++++++++++++++
 1 file changed, 23 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a3d8e603/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
index e255e08..68e5dbd 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
@@ -362,6 +362,9 @@ class ClientImpl extends TcpDiscoveryImpl {
 
         long startTime = U.currentTimeMillis();
 
+        // Marshal credentials for backward compatibility and security.
+        marshalCredentials(locNode);
+
         while (true) {
             if (Thread.currentThread().isInterrupted())
                 throw new InterruptedException();
@@ -541,6 +544,26 @@ class ClientImpl extends TcpDiscoveryImpl {
         return null;
     }
 
+    /**
+     * Marshalls credentials with discovery SPI marshaller (will replace attribute value).
+     *
+     * @param node Node to marshall credentials for.
+     * @throws IgniteSpiException If marshalling failed.
+     */
+    private void marshalCredentials(TcpDiscoveryNode node) throws IgniteSpiException {
+        try {
+            // Use security-unsafe getter.
+            Map<String, Object> attrs = new HashMap<>(node.getAttributes());
+
+            attrs.put(IgniteNodeAttributes.ATTR_SECURITY_CREDENTIALS,
+                spi.marsh.marshal(attrs.get(IgniteNodeAttributes.ATTR_SECURITY_CREDENTIALS)));
+
+            node.setAttributes(attrs);
+        }
+        catch (IgniteCheckedException e) {
+            throw new IgniteSpiException("Failed to marshal node security credentials: " + node.id(), e);
+        }
+    }
 
     /**
      * @param topVer New topology version.


[2/3] incubator-ignite git commit: #IGNITE-GG-10449 Fixed license.

Posted by sb...@apache.org.
#IGNITE-GG-10449 Fixed license.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7c1ecc3d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7c1ecc3d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7c1ecc3d

Branch: refs/heads/ignite-sprint-6
Commit: 7c1ecc3dd2e240e48958c8fb1fd812a6df7e92b5
Parents: a3d8e60
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Jun 22 13:15:55 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Jun 22 13:15:55 2015 +0300

----------------------------------------------------------------------
 .../cache/IgniteCacheOffheapEvictQueryTest.java    | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c1ecc3d/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
index 72bfcaa..45d744e 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
@@ -1,3 +1,20 @@
+/*
+ * 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 org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;


[3/3] incubator-ignite git commit: Merge branch 'ignite-gg-10449' into ignite-sprint-6

Posted by sb...@apache.org.
Merge branch 'ignite-gg-10449' into ignite-sprint-6


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/de0930d3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/de0930d3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/de0930d3

Branch: refs/heads/ignite-sprint-6
Commit: de0930d3b92141a360ea6a2cc346035158572dcf
Parents: a4ce455 7c1ecc3
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Jun 22 14:05:28 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Jun 22 14:05:28 2015 +0300

----------------------------------------------------------------------
 .../ignite/spi/discovery/tcp/ClientImpl.java    | 23 ++++++++++++++++++++
 .../cache/IgniteCacheOffheapEvictQueryTest.java | 17 +++++++++++++++
 2 files changed, 40 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de0930d3/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
----------------------------------------------------------------------