GithubHelp home page GithubHelp logo

isabella232 / mongosql-auth-java Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mongodb/mongosql-auth-java

0.0 0.0 0.0 97 KB

A MySQL authentication plugin for Java that implements the client-side of MongoDB authentication mechanisms supported by mongosqld

Home Page: https://www.mongodb.com/products/bi-connector

License: Apache License 2.0

Java 100.00%

mongosql-auth-java's Introduction

mongosql-java-auth

A MySQL authentication plugin that implements the client-side of MongoDB-supported authentication mechanisms, including

  • SCRAM-SHA-1
  • SCRAM-SHA-256
  • PLAIN
  • GSSAPI (Kerberos)

Usage

Include this library in the classpath. The Maven coordinates are:

<dependency>
    <groupId>org.mongodb</groupId>
    <artifactId>mongosql-auth</artifactId>
    <version>1.2.0</version>
</dependency>

Next, add a reference to the authentication plugin via the MySQL connection string:

jdbc:mysql://127.0.0.1:3307?useSSL=false&authenticationPlugins=org.mongodb.mongosql.auth.plugin.MongoSqlAuthenticationPlugin

Optionally, specify the authentication mechanism via a query parameter on the user name. The default mechanism is SCRAM-SHA-1.
For example:

username?mechanism=PLAIN   

Optionally, specify the authentication source via a query parameter on the user name. The default source is "admin" for SCRAM-SHA-1 and MONGODB-CR, and "$external" for PLAIN and GSSAPI. For example:

username?source=somedb

Optionally, if using GSSAPI, specify the service name via a query parameter on the user name. The default service name is "mongosql". For example:

username?mechanism=GSSAPI&serviceName=myservicename

Notes

  • The SCRAM-SHA-1 and SCRAM-SHA-256 mechanisms hash the passwords in the client plugin, so it can be used on an unencrypted connection without exposing the password (however, subsequent communication over that channel will be unencrypted).
  • The PLAIN mechanism sends the password in cleartext, so should only be used on an encrypted connection.
  • The GSSAPI mechanism sends the end-user's credentials to the mongosqld - allowing mongosqld to reuse those credentials to access MongoDB.

mongosql-auth-java's People

Contributors

10genola avatar craiggwilson avatar deafgoat avatar jstewart148 avatar jyemin avatar martyzhang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.