Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24516] Android N: Implement support for Network security configs

GitHub Issuen/a
TypeNew Feature
PriorityCritical
StatusClosed
ResolutionDone
Resolution Date2018-07-16T22:52:16.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterEric Merriman
AssigneeJoshua Quick
Created2017-03-20T20:26:13.000+0000
Updated2018-07-16T22:52:43.000+0000

Description

Specifies level of security and response/behaviour for corresponding level.

Comments

  1. Frankie Merzadyan 2017-05-31

    We already have capability to do this via a our custom AndroidManifest.xml write ability. Note that feature is dependent on: https://github.com/appcelerator/titanium_mobile/pull/8961 due to introduction of new attribute. Demo:
       <android 
           xmlns:android="http://schemas.android.com/apk/res/android">
       		<uses-sdk android:targetSdkVersion="24"/>
       		<manifest>
       			<application android:networkSecurityConfig="@xml/network_security_config">
       			</application>
       		</manifest>
         </android>
       
    in platform/android/res/xml/network_security_config.xml:
       <network-security-config>
           <domain-config>
               <domain includeSubdomains="true">secure.example.com</domain>
               <domain includeSubdomains="true">cdn.example.com</domain>
               <trust-anchors>
                   <certificates src="@raw/trusted_roots"/>
               </trust-anchors>
           </domain-config>
       </network-security-config>
       
    and the certificate is placed in placed platform/android/res/raw. In this example, the file is called trusted_roots.

JSON Source