1

I do not need the adminConnectors. Is there a way I can turn it off in my config file? If I comment out the lines, it uses a default port number and fails (because something else is using the default port: 8081), I do not want that to happen.

spark_user
  • 97
  • 2
  • 10

1 Answers1

1

Edit: This answer is not longer accurate. If you just want to disable the admin connectors, see the linked question down in the comments. If you need more subtle changes in the behaviour you will need to implement your own ServerFactory. Use the SimpleServerFactory of DefaultServerFactory as a template/guideline.

In dropwizard source there is: SimpleServerFactory. You can switch to this implementation by setting the following in the .yml file:

server:
  type: simple

The documentation is available here. If this doesn't suit your needs you will have to implement your own ServerFactory.

zloster
  • 1,149
  • 11
  • 26
  • This does not disable the admin endpoint. It is available on the same port under context `/admin`. I'm searching how to disable that because Dropwizard does not provide any security by default. – Weltraumschaf Jun 10 '18 at 19:32
  • @Weltraumschaf See this question/answer: https://stackoverflow.com/questions/38894164/how-to-disable-admin-port-in-dropwizard-while-using-gzip-server-mode-type With the described configuration and the current version of Dropwizard (1.3.4) I don't see in the logs any trace of enabling the admin functionality. – zloster Jun 18 '18 at 10:39
  • 1
    The important part is ˋadminConnectors: []ˋ. This disables the admin console. – Weltraumschaf Jun 19 '18 at 05:57