tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [1/5] tinkerpop git commit: TINKERPOP-1603 Removed support for byte array sasl argument
Date Tue, 27 Jun 2017 01:23:09 GMT
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1603 [created] 5b53e7014


TINKERPOP-1603 Removed support for byte array sasl argument


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

Branch: refs/heads/TINKERPOP-1603
Commit: fdbb462dd933855c93b1b28402266e2fdfccb0f3
Parents: 1ba875b
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Mon Jun 26 14:28:09 2017 -0400
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Mon Jun 26 14:31:27 2017 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                       |  1 +
 docs/src/upgrade/release-3.3.x.asciidoc                  | 11 +++++++++++
 .../server/handler/SaslAuthenticationHandler.java        |  6 ++----
 3 files changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fdbb462d/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index c34b3ff..0eba1f1 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.3.0 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Removed support for passing a byte array on the `sasl` parameter.
 * Graphite and Ganglia are no longer packaged with the Gremlin Server distribution.
 * `TransactionException` is no longer a class of `AbstractTransaction` and it extends `RuntimeException`.
 * Included an ellipse on long property names that are truncated.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fdbb462d/docs/src/upgrade/release-3.3.x.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.3.x.asciidoc b/docs/src/upgrade/release-3.3.x.asciidoc
index 6fefe28..0170381 100644
--- a/docs/src/upgrade/release-3.3.x.asciidoc
+++ b/docs/src/upgrade/release-3.3.x.asciidoc
@@ -351,3 +351,14 @@ rather than `Exception`. Providers should consider using this exception
to wrap
 to transaction problems and it allows for more common, generalized error handling for users.
 
 See: link:https://issues.apache.org/jira/browse/TINKERPOP-1004[TINKERPOP-1004]
+
+Driver Providers
+^^^^^^^^^^^^^^^^
+
+SASL Byte Array
++++++++++++++++
+
+Gremlin Server no longer supports accepting a byte array for the value passed to the "sasl"
parameter in
+authentication messages. It only accepts a Base64 encoded string.
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1603[TINKERPOP-1603]

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fdbb462d/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/SaslAuthenticationHandler.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/SaslAuthenticationHandler.java
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/SaslAuthenticationHandler.java
index 76af7db..778a003 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/SaslAuthenticationHandler.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/SaslAuthenticationHandler.java
@@ -87,13 +87,11 @@ public class SaslAuthenticationHandler extends AbstractAuthenticationHandler
{
                     final Object saslObject = requestMessage.getArgs().get(Tokens.ARGS_SASL);
                     final byte[] saslResponse;
                     
-                    if (saslObject instanceof byte[]) {
-                        saslResponse = (byte[]) saslObject;
-                    } else if(saslObject instanceof String) {
+                    if(saslObject instanceof String) {
                         saslResponse = BASE64_DECODER.decode((String) saslObject);
                     } else {
                         final ResponseMessage error = ResponseMessage.build(request.get())
-                                .statusMessage("Incorrect type for : " + Tokens.ARGS_SASL
+ " - byte[] or base64 encoded String is expected")
+                                .statusMessage("Incorrect type for : " + Tokens.ARGS_SASL
+ " - base64 encoded String is expected")
                                 .code(ResponseStatusCode.REQUEST_ERROR_MALFORMED_REQUEST).create();
                         ctx.writeAndFlush(error);
                         return;


Mime
View raw message