FatFractal customer forums



Author Topic: EngineSecurityManager Error  (Read 462 times)

julio.bradford

  • Newbie
  • *
  • Posts: 5
    • View Profile
EngineSecurityManager Error
« on: March 04, 2016, 07:17:53 PM »
Getting the following error when call httpclient.request(); server side is nodejs and express with no require authetication.  I get about 10 error before the call succeed.

Regards

INFO | com.fatfractal.noserver.serverside.FF_JS_API$ScriptLogger | 2016.03.04 10 at 04:34:05.893 PM MST | ScheduledTask_ProcessAutoDataLoad | system | ymubO_-3GP-Af-evWSqTs6 | *** PMIRestfulWebService.getRequest.Request is [{"url":"http://pmi-coreos-bm04.dropsupplies.com:3000/companies","method":"GET","headers":{"Accept":"application/json","Content-Type":"application/json"}}]
ERROR | com.fatfractal.engine.security.EngineSecurityManager | 2016.03.04 10 at 04:34:06.222 PM MST | Security manager: Access denied for : checkPermission ([java.net.URLPermission http://pmi-coreos-bm04.dropsupplies.com:3000/companies GET:AcceptAccept-EncodingUser-Agent])
ERROR | STACK_TRACE | 2016.03.04 10 at 04:34:06.338 PM MST | java.lang.Exception
   at com.fatfractal.engine.security.EngineSecurityManager.checkPermission(EngineSecurityManager.java:295)
   at sun.net.www.protocol.http.HttpURLConnection.URLtoSocketPermission(HttpURLConnection.java:1034)
   at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1425)
   at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)

code
      var url     = "http://pmi-coreos-bm04.dropsupplies.com:3000/companies";
      var headers = {"Accept" : "application/json", "Content-Type" : "application/json" }
      var request = {
         url: url,
         method: "GET",
         headers: headers
      };

      try {
         ff.logger.forceInfo ("*** PMIRestfulWebService.getRequest.Request is [" + JSON.stringify(request) + "]");
   var httpResponse = hc.request(request);
   var ccStatusCode = httpResponse.status;
   var ccResponse   = JSON.parse(httpResponse.content);

Nodejs code

var http = require('http'),
    express = require('express'),
    compression = require('compression'),
    morgan = require('morgan'),
    favicon = require('serve-favicon'),
    company = require('./routes/companies');

var app    = express();
app.use(compression());
var web400 = require('./server-web400');
var pm400  = require('./server-pm400');
var qs400  = require('./server-qs400');

app.get('/companies', company.findAll);
app.get('/companies/:id', company.findById);

app.listen(3000);
console.log('Listening on port 3000...');

node code example

 

Copyright © FatFractal customer forums