Bug 564094

Summary: mac os: SWT browser & http: disable app transport security documentation
Product: [Eclipse Project] Platform Reporter: Wolfgang Löffler <wolfgang.loeffler>
Component: WebsiteAssignee: Platform-Doc-Inbox <platform-doc-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: 4.17   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:

Description Wolfgang Löffler CLA 2020-06-08 13:39:16 EDT
Hi, I proposed to add it to the wiki but I was told to make a bug report: where could this go, FAQ or wiki, or possibly even into the browser source code as an option to disable ATS?

Mac OS has "App Transport Security" that prevents opening http pages, and this happens with the swt browser even on the local network if server names are used (ip works). During development there is no Info.plist where this can be disabled in principle, but also this didn't work here, possibly an issue with java launcher scripts. In any case, one might want to disable ATS dynamically, this works but it was a bit hard to figure out, possibly it's useful for SWT FAQ or wiki? Note that this issue might only appear if building standalong maven/gradle projects, I guess that eclipse disables ATS at another place, otherwise many more would report this.

The code below is in kotlin:

<code>
    val ats = org.eclipse.swt.internal.cocoa.NSDictionary.dictionaryWithObject(
            org.eclipse.swt.internal.cocoa.NSNumber.numberWithBool(true),
            org.eclipse.swt.internal.cocoa.NSString.stringWith("NSAllowsArbitraryLoads"))
    org.eclipse.swt.internal.cocoa.NSBundle.mainBundle().infoDictionary().setValue(
            ats, org.eclipse.swt.internal.cocoa.NSString.stringWith("NSAppTransportSecurity"))
</code>