          containerId = containerTokenIdentifier.getContainerID();
          startContainerInternal(nmTokenIdentifier, containerTokenIdentifier,
            request);
-@@ -414,6 +432,8 @@ protected void authorizeStartRequest(NMTokenIdentifier nmTokenIdentifier,
+@@ -414,6 +439,8 @@ protected void authorizeStartRequest(NMTokenIdentifier nmTokenIdentifier,
        succeededContainers, failedContainers);
    }
  

   public ContainerManagerImpl(Context context, ContainerExecutor exec,
       DeletionService deletionContext, NodeStatusUpdater nodeStatusUpdater,
       NodeManagerMetrics metrics, ApplicationACLsManager aclsManager,
@@ -189,6 +191,11 @@ public void serviceInit(Configuration conf) throws Exception {
     addIfService(logHandler);
     dispatcher.register(LogHandlerEventType.class, logHandler);
     
+    this.rpcAuth = 
+        conf.getBoolean(
+            YarnConfiguration.YARN_RPC_AM_AUTH, 
+            YarnConfiguration.DEFAULT_YARN_RPC_AM_AUTH);
+
     super.serviceInit(conf);
   }
 
@@ -392,10 +399,21 @@ protected void authorizeStartRequest(NMTokenIdentifier nmTokenIdentifier,
     for (StartContainerRequest request : requests.getStartContainerRequests()) {
       ContainerId containerId = null;
       try {

   @SuppressWarnings("unchecked")
   private void startContainerInternal(NMTokenIdentifier nmTokenIdentifier,
       ContainerTokenIdentifier containerTokenIdentifier,
@@ -430,39 +457,42 @@ private void startContainerInternal(NMTokenIdentifier nmTokenIdentifier,
      * belongs to correct Node Manager (part of retrieve password). c) It has
      * correct RMIdentifier. d) It is not expired.
      */
