<p>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.</p>
<ul>
<li>
<p>Renamed CliCommand to RpcCommand, differentiating it from cmd<br>
string token(s)</p>
</li>
<li>
<p>Added new CliConfig, based on :common Config</p>
</li>
<li>
<p>Injected Config into CoreApi to make bisq.properties and cmd line<br>
args available to server</p>
</li>
<li>
<p>Added cleartext username:password BisqCallCredentials to :cli, and<br>
an AuthenticationInterceptor to :core (server)</p>
</li>
<li>
<p>Moved :daemon resources folder to expected location under src/main</p>
</li>
<li>
<p>Duplicated CompositeOptionSet, ConfigException and BisqException<br>
in :cli because they are not visible from :common.  (TODO refactor?)<br>
CompositeOptionSet will be used to let command line parameters<br>
override params set in config file.</p>
</li>
<li>
<p>Removed outdated references to :cli in a couple of comments in<br>
:common Config</p>
</li>
<li>
<p>gRPC parameters & command names are lowercase to mimic bitcoind/rpc</p>
</li>
</ul>
<p>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:</p>
<pre><code>./bisq-daemon --rpcUser=somebody --rpcPassword=password  getversion
</code></pre>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/bisq-network/bisq/pull/4189'>https://github.com/bisq-network/bisq/pull/4189</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Implement simple cleartext gRPC authentication</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4189/files#diff-8bbff8f9f68047976bc591e0ef59d253">cli/src/main/java/bisq/cli/app/BisqCallCredentials.java</a>
    (55)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4189/files#diff-a8578edbbfb64f313f4df527913010c8">cli/src/main/java/bisq/cli/app/BisqCliMain.java</a>
    (87)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4189/files#diff-6998bd6fe5b582e261cdd4b8aaf71c9f">cli/src/main/java/bisq/cli/app/BisqException.java</a>
    (16)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4189/files#diff-f70a213cf246e13c77156f40ca7ac24e">cli/src/main/java/bisq/cli/app/CliConfig.java</a>
    (74)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4189/files#diff-146c13fe7dbf75f37148656f62dcde51">cli/src/main/java/bisq/cli/app/CommandParser.java</a>
    (62)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4189/files#diff-acaa1099fb932100a2a91f66604810d8">cli/src/main/java/bisq/cli/app/CompositeOptionSet.java</a>
    (56)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4189/files#diff-5a393c7d06280cf2b033193ef54856a6">cli/src/main/java/bisq/cli/app/ConfigException.java</a>
    (9)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4189/files#diff-4df55bd841e7e7d6975b65bd4b2c1a55">cli/src/main/java/bisq/cli/app/RpcCommand.java</a>
    (12)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4189/files#diff-9528e70f6dabc9e219b668e538aef00c">common/src/main/java/bisq/common/config/Config.java</a>
    (4)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4189/files#diff-b47329ea1e26f18da37b44f1777b8c99">core/src/main/java/bisq/core/grpc/AuthenticationInterceptor.java</a>
    (62)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4189/files#diff-1e668cbee2d15f677b1eef37b71ba74f">core/src/main/java/bisq/core/grpc/BisqGrpcServer.java</a>
    (7)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4189/files#diff-6fd3a1bb17b4e9d1355ef9a5afc364e9">core/src/main/java/bisq/core/grpc/CoreApi.java</a>
    (10)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4189/files#diff-02df959c4a3b8bca0e324fc4430dfb94">daemon/src/main/resources/logback.xml</a>
    (0)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/bisq-network/bisq/pull/4189.patch'>https://github.com/bisq-network/bisq/pull/4189.patch</a></li>
  <li><a href='https://github.com/bisq-network/bisq/pull/4189.diff'>https://github.com/bisq-network/bisq/pull/4189.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/4189">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNVUXGQ7XPOZEPVWUBLRN5OVRANCNFSM4MOQY5SQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNXIOFBITM2WZ5DD2QTRN5OVRA5CNFSM4MOQY5S2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4JAQ44MA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/4189",
"url": "https://github.com/bisq-network/bisq/pull/4189",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>