bmpcardoso
New Member
Dear Terasology community,
First of all, congratulations on the Terasology project. From what I've seen so far, it's an awesome project with a lot of potential!
Now, I'll start my SOS request with a disclaimer: I've been away from the world of Java development for some time now so forgive me if I didn't fully get the docs regarding Terasology's sandboxing and security... I'm currently trying to request my server for aditional info when generating the world in my module's BaseFacetedWorldGenerator subclass. I'm using OkHttp library, imported through gradle. However, I'm getting an access denied exception.
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder().url(URL).build();
try {
Response response = client.newCall(request).execute();
}
catch (Exception e) {
logger.info(e.toString());
}
>>> java.security.AccessControlException: access denied ("java.net.NetPermission" "getProxySelector")
Though this works by adding entries in the engine's whitelist, I wonder if there is a way to add request permissions from the code of a Terasology module?
Thanks!
First of all, congratulations on the Terasology project. From what I've seen so far, it's an awesome project with a lot of potential!
Now, I'll start my SOS request with a disclaimer: I've been away from the world of Java development for some time now so forgive me if I didn't fully get the docs regarding Terasology's sandboxing and security... I'm currently trying to request my server for aditional info when generating the world in my module's BaseFacetedWorldGenerator subclass. I'm using OkHttp library, imported through gradle. However, I'm getting an access denied exception.
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder().url(URL).build();
try {
Response response = client.newCall(request).execute();
}
catch (Exception e) {
logger.info(e.toString());
}
>>> java.security.AccessControlException: access denied ("java.net.NetPermission" "getProxySelector")
Though this works by adding entries in the engine's whitelist, I wonder if there is a way to add request permissions from the code of a Terasology module?
Thanks!
Last edited: