You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2017/07/05 15:45:54 UTC
[04/11] tinkerpop git commit: TINKERPOP-1603 Removed support for byte
array sasl argument
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/7a29c6ba
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/7a29c6ba
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/7a29c6ba
Branch: refs/heads/master
Commit: 7a29c6ba1a73315c53b8002d41e7892963b3e8b5
Parents: 1d3e9a1
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Jun 26 14:28:09 2017 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Jun 29 14:51:11 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/7a29c6ba/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 7a93c45..3bb8347 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/7a29c6ba/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 0f71714..33ef7e0 100644
--- a/docs/src/upgrade/release-3.3.x.asciidoc
+++ b/docs/src/upgrade/release-3.3.x.asciidoc
@@ -352,3 +352,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/7a29c6ba/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;