# Security

When you deploy molgenis to a server, the server's firewall will shield the services from unauthorized access.

When you're running on a development machine, you'll want to disallow access to the database and ElasticSearch index you are running to non-localhost clients.

## ElasticSearch

Provide the following configuration items as Runtime Properties when running from your IDE tomcat or when running integration tests in maven:

```
-Des.discovery.zen.ping.multicast.enabled=false -Des.network.host=localhost
```

## Firewall settings

If your firewall settings are based on the executables you run, instead on ports you open/close:

Disallow java, and postgres to open incoming connections in your firewall.

### macbook

On macbook, you can do this as follows

* Apple, System preferences, Security and privacy,
  * FileVault -> turn it on!
  * Firewall -> turn it on, go to Firewall options
    * Java processes, all of them -> Block incoming connections
    * postgres -> Block incoming connections
    * Automatically allow signed software to receive incoming connections -> uncheck


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://molgenis.gitbook.io/molgenis/10.0/for-developers/guide-security.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
