Skip to content

Commit

Permalink
Issue #272 - Verify and use the parameter <restApiKey>
Browse files Browse the repository at this point in the history
* The InstanceConfigurator was not using the key $restApiKey in
  appengine-web.vm
* We enable rest security by default
* We verify that the key is not 'test' nor empty string
  • Loading branch information
iperdomo committed Jul 3, 2013
1 parent 56242ba commit 48fe543
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.util.HashMap;
import java.util.Map.Entry;
import java.util.TreeMap;
import java.util.UUID;
import java.util.logging.Level;
import java.util.logging.Logger;

Expand Down Expand Up @@ -113,7 +114,7 @@ public static void main(String[] args) {
String localLocation = args[12];
ic.addAttribute("keystore", args[13]);
ic.addAttribute("mapsApiKey", args[14]);
ic.addAttribute("restApiKey",args[15]);
ic.addAttribute("restApiKey", args[15].equals("test") || args[15].equals("") ? UUID.randomUUID().toString() : args[15]);

localLocation = ic.createLocalDeployDir(localLocation, args[2]);

Expand Down
4 changes: 2 additions & 2 deletions GAE/war/appengine-web.vm
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
<property name="mergeNearbyLocales" value="false"/>
<property name="scoreAPDynamicFlag" value="false"/>
<property name="asyncTaskTimeout" value="16384"/>
<property name="enableRestSecurity" value="false"/>
<property name="restPrivateKey" value="test"/>
<property name="enableRestSecurity" value="true"/>
<property name="restPrivateKey" value="$restApiKey"/>
<property name="useTabRDRFlag" value="false"/>
</system-properties>
</appengine-web-app>

0 comments on commit 48fe543

Please sign in to comment.