Discussion:
[arangodb-google] Class ArangoDBAsync can access databases without autentication
Jefferson
2018-04-18 09:50:07 UTC
Permalink
I see a big problem here, i create a cluster with 3 nodes, and i used the
Java Client normaly (with problem of offline...), but when i test the Async
version of Java Client i don't need pass user and password, the
class ArangoDBAsync can acess the databases and collections wihout
autentication, and if i pass a wrong password, this object can access the
databases too, what could be?
--
You received this message because you are subscribed to the Google Groups "ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to arangodb+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jefferson
2018-04-18 10:12:18 UTC
Permalink
in the Con Class:

public static ArangoDBAsync arangoDB = new
ArangoDBAsync.Builder().host("arangodb01.xxxxxxx.com",
8529).host("arangodb02.xxxxxxx.com", 8529).host("arangodb03.xxxxxxx.com",
8529).user("thisUserNoExist").password("WrongPassword").timeout(1000).build();

in other class on a event of a button:

Collection<MyObject> documents = new ArrayList<>();
documents.add(new MyObject());

arangoDB.db("testedatabase").collection("myCollection").insertDocuments(documents);

other think is; when i have internet connection, the insert work well, when
the internet is off, the timeout wont work, and when i use the
ArangoDBAsync, the methods
like:"arangoDB.db("testedatabase").collection("myCollection").insertDocuments(documents);"
dont need a try catch, but if i use the Java Client wihout Async, and use
the Sync version, the Netbeans alert to catch errors.
What are the starting parameters of your ArangoDB instances in your
cluster?
Post by Jefferson
I see a big problem here, i create a cluster with 3 nodes, and i used the
Java Client normaly (with problem of offline...), but when i test the Async
version of Java Client i don't need pass user and password, the
class ArangoDBAsync can acess the databases and collections wihout
autentication, and if i pass a wrong password, this object can access the
databases too, what could be?
--
You received this message because you are subscribed to the Google Groups "ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to arangodb+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jefferson
2018-04-18 17:28:23 UTC
Permalink
Ok, i will test your sugestion, but why the Async Driver can access
databases with wrong autentication (user and passwd) and the Sync Driver
need a valid autentication (expected)?
Ok. I meant with start parameters the start parameters of the servers.
It is correct that you can catch the sync api because every method can
throw ArangoDBException. In the async api you get `CompleteableFuture` back
from each method. This does not throw any exception because the future does
not have to be processed at this time. If you want to react on exceptions
of this operation you can call e.g. `whenComplete()` on this future.
public static ArangoDBAsync arangoDB = new ArangoDBAsync.Builder().host("
arangodb01.xxxxxxx.com", 8529).host("arangodb02.xxxxxxx.com",
8529).host("arangodb03.xxxxxxx.com",
8529).user("thisUserNoExist").password("WrongPassword").timeout(1000).build();
Collection<MyObject> documents = new ArrayList<>();
documents.add(new MyObject());
arangoDB.db("testedatabase").collection("myCollection").insertDocuments(documents);
other think is; when i have internet connection, the insert work well,
when the internet is off, the timeout wont work, and when i use the
ArangoDBAsync, the methods
like:"arangoDB.db("testedatabase").collection("myCollection").insertDocuments(documents);"
dont need a try catch, but if i use the Java Client wihout Async, and use
the Sync version, the Netbeans alert to catch errors.
What are the starting parameters of your ArangoDB instances in your
cluster?
Post by Jefferson
I see a big problem here, i create a cluster with 3 nodes, and i used
the Java Client normaly (with problem of offline...), but when i test the
Async version of Java Client i don't need pass user and password, the
class ArangoDBAsync can acess the databases and collections wihout
autentication, and if i pass a wrong password, this object can access the
databases too, what could be?
--
You received this message because you are subscribed to the Google Groups "ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to arangodb+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...