[bisq-network/bisq] Implement simple cleartext gRPC authentication (#4189)

Stan notifications at github.com
Wed Apr 22 21:30:00 UTC 2020

A 2nd attempt at gRPC authentication after finding out TLS + Macaroons is too much overhead for :cli.  Most of the changes not related to refactoring :cli are listed below.

 * Renamed CliCommand to RpcCommand, differentiating it from cmd
   string token(s)

 * Added new CliConfig, based on :common Config

 * Injected Config into CoreApi to make bisq.properties and cmd line
   args available to server

 * Added cleartext username:password BisqCallCredentials to :cli, and
   an AuthenticationInterceptor to :core (server)

 * Moved :daemon resources folder to expected location under src/main

 * Duplicated CompositeOptionSet, ConfigException and BisqException
   in :cli because they are not visible from :common.  (TODO refactor?)
   CompositeOptionSet will be used to let command line parameters
   override params set in config file.

 * Removed outdated references to :cli in a couple of comments in
   :common Config

 * gRPC parameters & command names are lowercase to mimic bitcoind/rpc

TODO:  Decide what rpc auth param names to use, to differentiate them from bitcoind rpc user/password param names.  Until that decision is made, the existing bitcoind rpcUser/rpcPassword param names are used for gRPC authentication.  As you know, you can define rpcUser/rpcPassword creds in bisq.properties and/or pass rpc login creds on command line:

    ./bisq-daemon --rpcUser=somebody --rpcPassword=password  getversion

You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * Implement simple cleartext gRPC authentication

-- File Changes --

    A cli/src/main/java/bisq/cli/app/BisqCallCredentials.java (55)
    M cli/src/main/java/bisq/cli/app/BisqCliMain.java (87)
    A cli/src/main/java/bisq/cli/app/BisqException.java (16)
    A cli/src/main/java/bisq/cli/app/CliConfig.java (74)
    M cli/src/main/java/bisq/cli/app/CommandParser.java (62)
    A cli/src/main/java/bisq/cli/app/CompositeOptionSet.java (56)
    A cli/src/main/java/bisq/cli/app/ConfigException.java (9)
    R cli/src/main/java/bisq/cli/app/RpcCommand.java (12)
    M common/src/main/java/bisq/common/config/Config.java (4)
    A core/src/main/java/bisq/core/grpc/AuthenticationInterceptor.java (62)
    M core/src/main/java/bisq/core/grpc/BisqGrpcServer.java (7)
    M core/src/main/java/bisq/core/grpc/CoreApi.java (10)
    R daemon/src/main/resources/logback.xml (0)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200422/b3dae56d/attachment.html>

More information about the bisq-github mailing list