logo

English

이곳의 프로그래밍관련 정보와 소스는 마음대로 활용하셔도 좋습니다. 다만 쓰시기 전에 통보 정도는 해주시는 것이 예의 일것 같습니다. 질문이나 오류 수정은 siseong@gmail.com 으로 주세요. 감사합니다.

[iOS, MacOS] ATS 보안 정책 가이드

by digipine posted Nov 02, 2017
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print

ATS(App Transport Security)
OSX 10.9, iOS9 이상의 버전에는 ATS 기술이 기본적으로 적용되었다. ATS는 앱과 웹 서비스 간 연결보안을 강화하는 기술로 이 기술이 적용되면 기존에 앱에서 사용하던 암호화되지 않은 HTTP 통신은 OS 내부에서 강제적으로 차단된다. 따라서, 여러분이 작성해 놓은 앱에 포함된 HTTP 통신은 모두 무용지물이 되어 버릴 것이다. 실제로 필자가 OSX 10.11에서 확인해 본 결과 HTTP 통신을 사용하여 plain text 데이터를 요청하는 시점에 다음과 같은 메시지가 로그 창에 출력되며, 통신이 되지 않는 상황이 재현되었다.

 

 

 App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's info.plist file.

 

특히 WebKit으로 웹 페이지를 로드하는 경우도 HTTPS 주소가 아니면 모두 차단된다. 무척 당황스러운 상황이 될 수 있으나 다행히도 개발자가 ATS기능을 OFF 할 수 있는 여지를 만들어 놓았다. 방법은 다음과 같다.

Xcode 7.0 이상에서만 가능한 방법이다.

 

info.plist를 테스트 에디터로 열고 적당한 위치에 아래 항목을 추가한다.

 

<key>NSAppTransportSecurity</key>

<dict>

<key>NSAllowsArbitraryLoads</key>

<true/>

 

</dict>

 

성공적으로 설정 되었다면 프로젝트가 다시 정상적으로 실행된다.

그런데 이렇게하면 ATS가 완전히 OFF 되어서 위험해진다.

 

<key>NSAppTransportSecurity</key>

<dict>

  <key>NSExceptionDomains</key>

  <dict>

    <key>yourserver.com</key>

    <dict>

      <!--Include to allow subdomains-->

      <key>NSIncludesSubdomains</key>

      <true/>

      <!--Include to allow HTTP requests-->

      <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>

      <true/>

      <!--Include to specify minimum TLS version-->

      <key>NSTemporaryExceptionMinimumTLSVersion</key>

      <string>TLSv1.1</string>

    </dict>

  </dict>

 

</dict>

 

이렇게 원하는 도메인을 지정해서 열어 줄 수 있는데 이런 방법이 더 안전하겠다.

다음 항목을 참조 하자.

 

NSTemporaryExceptionAllowsInsecureHTTPLoads

NSRequiresCertificateTransparency

NSTemporaryExceptionRequiresForwardSecrecy

NSTemporaryThirdPartyExceptionAllowsInsecureHTTPLoads

NSTemporaryThirdPartyExceptionMinimumTLSVersion

 

 

NSTemporaryThirdPartyExceptionRequiresForwardSecrecy

 
TAG •

List of Articles
No. Subject Author Date Views
55 macOS Daemon 관련 시스템 폴더 목록 lizard2019 2024.03.08 23
54 [macOS, iOS] 개발자 정보 확인하는 명령어 digipine 2023.03.23 161
53 iOS - Socket Nagle 알고리듬 OFF digipine 2017.11.01 208
52 Firebase 'GoogleUtilities/GULURLSessionDataResponse.h' file not found Error Fix lizard2019 2023.07.04 210
51 iOS - Thread Loop 내에서 UI 업데이트 방법 digipine 2017.11.01 211
50 iOS - Objective-C 남아있는 메모리 공간 확인 방법 digipine 2017.11.01 215
49 iOS - NSString 와 NSData 간의 데이터 상호 변환 digipine 2017.11.01 249
48 iOS - Objective-C Callback for C++ digipine 2017.11.01 266
47 [macOS] 현재 사용 중인(열려있는) 포트 확인하고 Close 하기 digipine 2022.10.24 269
46 iOS - Query string을 Decode 하는 소스 digipine 2017.11.01 327
45 iOS - NSURLConnection로 다중 다운로드 구현 digipine 2017.11.01 333
44 iOS , MacOS, iPhone용 GZipStream class 구현하기 digipine 2017.11.01 358
43 Concurrent vs Serial DispatchQueue: Concurrency in Swift explained lizard2019 2021.04.16 415
42 iOS,OSX - CFSocket 사용법 digipine 2017.11.01 444
41 Apple AppStore App Review 시 Reject 피하기 위한 방법 digipine 2017.11.02 447
40 iOS - Objective - C 정규식 사용하기 digipine 2017.11.01 470
39 [iOS] 개발자를 위한 iOS 15의 새로운 기능 file digipine 2021.11.04 498
38 iOS - View 이동 전환 하기 총정리 digipine 2017.11.01 537
37 [iOS] Audio Session Setting digipine 2021.11.26 548
36 [macOS] Xcode 디버깅 시 Could not attach pid 오류 해결 file lizard2019 2023.06.05 561
Board Pagination Prev 1 2 3 Next
/ 3