<p><b>@freimair</b> requested changes on this pull request.</p>

<p>Sorry for letting you wait so long.</p>
<p>Please use the correct file header (featuring "Bisq" instead of "Bitsquare") and add it to any source file.</p>
<p>IMHO, we do not need the docker config yet. That is a thing we can feature once the API is completed and hardened. Or does that affect the really nice test setup?</p><hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/3001#discussion_r310217107">api/src/main/java/bisq/api/http/service/HttpApiServer.java</a>:</p>
<pre style='color:#555'>> +    private void setupAuth(ServletContextHandler appContextHandler) {
+        AuthFilter authFilter = new AuthFilter(apiPasswordManager, tokenRegistry);
+        appContextHandler.addFilter(new FilterHolder(authFilter), "/*", EnumSet.allOf(DispatcherType.class));
+    }
+
+    /**
+     * If Bisq is configured to use start Tor then the default Tor instance should be available
+     * by the time this method is executed.
+     */
+    private void startTorIfNeeded() throws IOException, TorCtlException {
+        Tor tor = Tor.getDefault();
+        if (null == tor) {
+            log.info("Tor not started so API will be available only locally");
+            return;
+        }
+        // TODO how to log that service has been published?
</pre>
⬇️ Suggested change
<pre style="color: #555">-        // TODO how to log that service has been published?
</pre>


<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/3001#discussion_r310217555">api/src/main/java/bisq/api/http/service/HttpApiServer.java</a>:</p>
<pre style='color:#555'>> +        AuthFilter authFilter = new AuthFilter(apiPasswordManager, tokenRegistry);
+        appContextHandler.addFilter(new FilterHolder(authFilter), "/*", EnumSet.allOf(DispatcherType.class));
+    }
+
+    /**
+     * If Bisq is configured to use start Tor then the default Tor instance should be available
+     * by the time this method is executed.
+     */
+    private void startTorIfNeeded() throws IOException, TorCtlException {
+        Tor tor = Tor.getDefault();
+        if (null == tor) {
+            log.info("Tor not started so API will be available only locally");
+            return;
+        }
+        // TODO how to log that service has been published?
+        final HsContainer hsContainer = tor.publishHiddenService("api", 80, bisqEnvironment.getHttpApiPort());
</pre>
⬇️ Suggested change
<pre style="color: #555">-        final HsContainer hsContainer = tor.publishHiddenService("api", 80, bisqEnvironment.getHttpApiPort());
+        final HsContainer hsContainer = tor.publishHiddenService("api", 80, bisqEnvironment.getHttpApiPort());
+                hsContainer.getHandler().attachHSReadyListener(hsContainer.getHostname(), () -> {
+            log.info("API hidden service is published and ready");
+            return null;
+        });
</pre>


<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/3001?email_source=notifications&email_token=AJFFTNU55WFITYNLM7RUMULQCRSO5A5CNFSM4IGTEHD2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCAOEZQY#pullrequestreview-270290115">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNSCCTDQPEUYLUAJUVTQCRSO5ANCNFSM4IGTEHDQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/AJFFTNUCYAWDJ4QA45OEY5LQCRSO5A5CNFSM4IGTEHD2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCAOEZQY.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/3001?email_source=notifications\u0026email_token=AJFFTNU55WFITYNLM7RUMULQCRSO5A5CNFSM4IGTEHD2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCAOEZQY#pullrequestreview-270290115",
"url": "https://github.com/bisq-network/bisq/pull/3001?email_source=notifications\u0026email_token=AJFFTNU55WFITYNLM7RUMULQCRSO5A5CNFSM4IGTEHD2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCAOEZQY#pullrequestreview-270290115",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>