<div dir="ltr"><div>Hi, <br>I hope it is okay if I provide another </div><div>example/use case & view here.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 13 May 2021 at 07:49, Ron Pressler <<a href="mailto:ron.pressler@oracle.com">ron.pressler@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> On 12 May 2021, at 22:41, Peter Tribble <<a href="mailto:peter.tribble@gmail.com" target="_blank">peter.tribble@gmail.com</a>> wrote:<br>
> <br>
> <br>
> Let me give a concrete example:<br>
> <br>
> Parsing and rendering a PDF file that may contain references to fonts or other resources.<br>
> We know exactly where the files are installed, so wish to allow the rendering routine access<br>
> to the fonts it will need. But not to any other files, and not (normally) to network resources at<br>
> all. Note that we trust the code, but not necessarily the document it's parsing. (Although the<br>
> document itself may be perfectly well formed - document formats often allow embedding<br>
> references to 3rd-party objects, undesirable as that may be.)<br>
> <br>
<br>
Thank you. Let me ask you this, then:<br>
<br>
1. Would allowing access to certain files and no network for the *entire* application be<br>
sufficient? Consider that you can run some code in a separate Java process with OS protections.<br>
If not, why not?<br></blockquote><div><br><div>It wouldn't be ideal but that is theoretically possible, but that will likely come at a performance cost & require re-architecting applications.<br></div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
2. Would turning such access on and off for the entire application through some Java process<br>
be sufficient?<br></blockquote><div><br></div><div>No as this is similar to 1.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
3. Would controlling such access on a per-thread basis be sufficient?<br>
<br>
Please don’t read 2 or 3 as some concrete proposals; I’m just trying to understand the requirements.<br>
<br>
</blockquote></div><div><br></div><div>This seems somewhat more useful than 1 & 2 but imho it would be better to be able to perform checks/grant access on a call stack basis. Atlassian currently makes use of a security manager to prevent access to cloud metadata services that do not have an amazon sdk related class on the call stack. This helps to mitigate the impact of SSRF in applications running in a cloud environment (<a href="https://github.com/asecurityteam/ssrf-protection-example-manas-security-manager">https://github.com/asecurityteam/ssrf-protection-example-manas-security-manager</a>).</div></div>