GAE : javax.security.auth.Subject.getSubject() cannot be invoked on local dev server

244 Views Asked by At

If I start my local google app engine dev server by using the App Engine maven plugin :

mvn appengine:devserver

and I try to launch a mapreduce job (using the appengine-mapreduce library), I get a java.security.AccessControlException: access denied ("javax.security.auth.AuthPermission" "getSubject") because the code try to invoke javax.security.auth.Subject.getSubject() method (see below for the full stack trace)

It's very weird because :

1) the javax.security.auth.Subject.getSubject() is in the white list of gae and can be invoked

2) If I start the server from intellij, I don't get this exception and the map reduce job is launched successfully

I tried with GAE 1.8.1, 1.8.2 and the latest 1.8.3 and respectively the same version for the maven google appengine plugin.

What is going wrong ?

The full stack trace : [INFO] java.security.AccessControlException: access denied ("javax.security.auth.AuthPermission" "getSubject") [INFO] at java.security.AccessControlContext.checkPermission(AccessControlContext.java:366) [INFO] at java.security.AccessController.checkPermission(AccessController.java:560) [INFO] at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) [INFO] at com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:383) [INFO] at javax.security.auth.Subject.getSubject(Subject.java:287) [INFO] at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:467) [INFO] at org.apache.hadoop.mapreduce.JobContext.(JobContext.java:80) [INFO] at com.google.appengine.tools.mapreduce.AppEngineJobContext.(AppEngineJobContext.java:123) [INFO] at com.google.appengine.tools.mapreduce.AppEngineJobContext.createContextForNewJob(AppEngineJobContext.java:132) [INFO] at com.google.appengine.tools.mapreduce.v2.impl.handlers.Controller.handleStart(Controller.java:85) [INFO] at com.google.appengine.tools.mapreduce.v2.impl.handlers.Status.handleStartJob(Status.java:81) [INFO] at com.google.appengine.tools.mapreduce.v2.impl.handlers.Status.handleCommand(Status.java:182) [INFO] at com.google.appengine.tools.mapreduce.MapReduceServlet.doPost(MapReduceServlet.java:203) [INFO] at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) [INFO] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) [INFO] at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)

0

There are 0 best solutions below