Install Java agent¶ TL;DR¶ Installing Sqreen Java agent enables you to monitor your application security and block attacks in real-time. Installing Sqreen in your Java application takes less than a minute: Sign up to Sqreen to create your account Pick up your first application name and Java language. The application name can be a repository name, or anything that will help you identify app in your Sqreen dashboard Follow the procedure detailed below Standard Java Application¶ Java agent installation only requires to change JVM settings. Download¶ curl https://download.sqreen.io/java/sqreen.jar -o sqreen.jar Configure¶ Add those parameters to JVM startup command, may be stored in a configuration file. -javaagent:/path/to/sqreen.jar -Dsqreen.token=<your Sqreen token> Then start the application as usual. Install the agent on multiple environments¶ You will probably install the Sqreen Java agent on your production environment. You can also create several applications for each of your environment (development, staging, production). For each, a unique Sqreen token will be provided for each of your applications. Basic configuration¶ Instead of using a system property value (-D parameter), you can also use SQREEN_TOKEN environment variable to set up your token: export SQREEN_TOKEN=my_secret_token Sqreen Java agent provides additional configuration settings. Refer to Configuration of the Java agent for more detailed information. Uninstall Agent¶ To uninstall Sqreen Agent, simply remove -javaagent parameter from the JVM command. Installing behind a proxy¶ If your host requires a proxy to connect to Sqreen, install procedure is slightly different. Replace proxy and 3128 with your proxy hostname and port. Check connectivity¶ curl -I --proxy proxy:3128 https://back.sqreen.io/ Should output something similar to : HTTP/2 404 date: Tue, 04 Sep 2018 15:19:08 GMT content-type: application/json content-length: 37 server: nginx Download¶ curl --proxy proxy:3128 https://download.sqreen.io/java/sqreen.jar -o sqreen.jar Configure¶ Add those parameters to JVM startup command, may be stored in a configuration file. In addition to standard parameters, proxy configuration is required in JVM parameters. -javaagent:/path/to/sqreen.jar -Dsqreen.token=<your Sqreen token> -Dsqreen.proxy=http://proxy:3128/ Then start the application as usual. Notes¶ Use Sqreen throughout the development cycle Sqreen can protect your application from your local environment to your production through your staging. Simply create an application per environment in dashboard and setup the token accordingly.