Skip to content

New handshake: Java implementation #5461

Closed

Description

@danielmewes

Once we have the reference implementation in Python and the server code, we need to implement #5406 for the Java driver.

Activity

  1. added this to the 2.3 milestone on Feb 29, 2016
  2. danielmewes commented on Mar 29, 2016

    @danielmewes
    MemberAuthor

    @deontologician can you work on this please?

    The server-side implementation is currently available in branch vexocide/5406.

    There is a reference implementation for the Python driver in this file: https://github.com/rethinkdb/rethinkdb/blob/vexocide/5406/drivers/python/rethinkdb/handshake.py

    The handshake protocol is formally described here #5406 (comment) , with the authentication mechanism being described here http://tools.ietf.org/html/rfc5802 . It's probably going to be easiest to just follow the Python implementation.

    For testing, you'll need to create a user account. This can be done by inserting into the r.db('rethinkdb').table('users') table. The document should look like this:

    {
      id: "username",
      password: "secret"
    }

    The connect method will need to accept two new options "user" and "password", which need to be provided together (maybe for the Java driver, we could have a single .user(String user, String password) method ?). If these options are not specified, the driver should try to connect with the username "admin" and an empty password. If the authentication fails, a ReqlAuthError should be thrown.
    I think we should still support the authKey option for backwards compatibility with existing application code. If an authKey is specified, we assume a username of "admin" and use the authKey as the password for the "admin" user.

  3. deontologician commented on Mar 29, 2016

    @deontologician
    Contributor

    Ok, I'll start on this tomorrow

  4. deontologician commented on Apr 2, 2016

    @deontologician
    Contributor

    This is up in review 3569 by @VeXocide

  5. deontologician commented on Apr 2, 2016

    @deontologician
    Contributor

    The branch is josh/5406

  6. danielmewes commented on Apr 5, 2016

    @danielmewes
    MemberAuthor

    In next fbe2072

  7. deontologician commented on Apr 5, 2016

    @deontologician
    Contributor

    Thanks guys :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions