Pivotal Knowledge Base

Follow

How To Specify networkaddress.* Security Properties When Pushing Java Applications

Environment

 Product  Version
 Java Buildpack  All

Purpose

This document describes how to specify Java Security Properties when pushing Java applications.

Cause 

If you are developing for non-PCF Java applications, setting security properties can be done by following either one of these methods:

  • Editing $JAVA_HOME/jre/lib/security/java.security and adding the following lines:

  • networkaddress.cache.ttl=60
  • networkaddress.cache.negative.ttl=20
  • Or using application’s initialization code, sample below:

    java.security.Security.setProperty("networkaddress.cache.ttl" , "60");

Procedure

Here are the steps on how to add Java Security Properties when pushing Java applications:

  1. Edit your application manifest file
  2. Locate env and add the security properties in your JAVA_OPTS. Please note that you need to append java.security prefix 
    1. env:
        JAVA_OPTS: -Djava.security.networkaddress.cache.ttl=60 -Djava.security.networkaddress.cache.negative.ttl=20

Additional Information 

 

 

 

Comments

Powered by Zendesk