MDM 프로파일 생성 및 서명·수명주기 관리 가이드
iOS 및 macOS 엔터프라이즈 환경에서 기기의 보안 정책, 네트워크 설정, 인증서 및 MDM 제어 권한을 주입하기 위한 MDM 구성 프로파일(Configuration Profile, .mobileconfig) 생성과 디지털 서명(Profile Signing), 무선(OTA) 배포 및 수명 주기 관리 방법을 정형화된 기술 문서로 정리합니다.
1. MDM 구축을 위한 필수 전제조건 및 제약 사항
MDM(Mobile Device Management) 시스템 및 프로파일을 실제로 구축·운영하기 위해서는 Apple의 엄격한 자격 인증 및 서티피케이트 발급 절차가 필수적이며, 개인 개발자나 단순 인증 미비 상태에서는 구축이 불가능합니다.
| 분류 | 필수 요구 및 제약 조건 | 비고 및 사유 |
| 개발자 계정 | Apple Developer Enterprise Program 또는 조직(Organization) 계정 필수 | 개인(Individual) 계정은 MDM Vendor CSR 발급 및 APNs Topic 생성 불가 |
| MDM Push Certificate | Apple Push Certificates Portal을 통한 MDM Vendor Push Cert 발급 | APNs 푸시 서티피케이트가 없을 경우 기기로 MDM 명령어(Wipe/Lock) 푸시 불가 |
| 조직 등록 (DEP/ABM) | Apple Business Manager (ABM) 또는 Apple School Manager (ASM) 가입 | D-U-N-S 번호 기반 조직 검증 필요 (자동 기기 등록 Automated Device Enrollment 필수) |
| 서버 SSL/TLS | 공인 CA(Certificate Authority) 서명 SSL/TLS 1.2+ HTTPS 필수 | Self-Signed 인증서 사용 시 기기에 Root CA 프로파일 사전 주입 수동 절차 필요 |
| 프로파일 서명 | Apple Trusted SMIME / SSL Digital Certificate 기반 서명 | 서명되지 않은(.mobileconfig) 프로파일은 기기 설치 시 경고 표시 및 일부 정책 제한 |
개인 Apple ID나 일반 개발자 계정으로는 MDM 푸시 토픽(com.apple.mgmt.External...)을 생성할 수 없습니다. 상용 또는 사내 전용 MDM 솔루션을 직접 개발하기 위해서는 반드시 Apple Developer Organization 계정으로 MDM Vendor Agreement를 체결해야 합니다.
2. MDM 구성 프로파일(.mobileconfig) 개요 및 데이터 구조
MDM 프로파일은 Apple 단말기(iOS, iPadOS, macOS)에 보안 파라미터 및 시스템 제어 정책을 일괄 적용하기 위해 사용되는 XML 형태의 Property List(.plist) 파일입니다.
| 구성 요소 | 주요 역할 | 비고 |
| PayloadUUID | 프로파일 및 개별 페이로드의 고유 식별자 (RFC 4122) | 중복 시 기존 페이로드 덮어쓰기 발생 |
| PayloadIdentifier | 역도메인 형태의 프로파일 식별자 (com.company.mdm.profile) | 시스템 내 프로파일 관리 단위 |
| PayloadContent | Wi-Fi, SCEP, Passcode, MDM Payload 배열 | 실제 기기에 적용되는 정책 모음 |
| HasRemovalPasscode | 사용자의 프로파일 임의 제거 방지 비밀번호 설정 | 엔터프라이즈 기기 보호 정책 |
XML 기본 스켈레톤 구조 예시
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadDisplayName</key>
<string>Enterprise Security & MDM Profile</string>
<key>PayloadIdentifier</key>
<string>com.company.mdm.securityprofile</string>
<key>PayloadOrganization</key>
<string>Company IT Dept</string>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadUUID</key>
<string>9F4C2A1E-8B3D-4F2A-9C1B-8D7E6F5A4B3C</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>PayloadContent</key>
<array>
<!-- 실제 기기 통신용 MDM Payload (com.apple.mdm) -->
<dict>
<key>PayloadType</key>
<string>com.apple.mdm</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>PayloadIdentifier</key>
<string>com.company.mdm.payload</string>
<key>PayloadUUID</key>
<string>1A2B3C4D-5E6F-7A8B-9C0D-1E2F3A4B5C6D</string>
<key>ServerURL</key>
<string>https://mdm.company.com/server</string>
<key>CheckInURL</key>
<string>https://mdm.company.com/checkin</string>
<key>Topic</key>
<string>com.apple.mgmt.External.1a2b3c4d</string>
<key>AccessRights</key>
<integer>8191</integer>
<key>SignMessage</key>
<true/>
</dict>
</array>
</dict>
</plist>
3. Apple Configurator 및 MDM Payload 생성 절차
GUI 도구인 Apple Configurator를 활용하거나 MDM 프로토콜 사양에 맞춰 직접 XML을 구성할 수 있습니다.
주요 Payload 종류 및 설정 항목
- MDM Payload (com.apple.mdm):
- ServerURL: MDM 서버의 HTTPS 통신 엔드포인트 URL
- CheckInURL: 기기 등록 및 토큰 갱신 체크인 URL
- Topic: Apple Push Notification Service (APNs) 토픽 (예: com.apple.mgmt.External...)
- AccessRights: MDM 서버가 기기에서 수행 가능한 권한 마스크 (8191 = 모든 권한 수용)
- SCEP Payload (com.apple.security.scep):
- URL: PKI 인증서 발급 SCEP 서버 엔드포인트
- Subject: 인증서 주체 정보 (/CN=DeviceID)
- Key Usage: 키 용도 (Digital Signature, Key Encipherment)
- Passcode Policy Payload (com.apple.mobiledevice.passwordpolicy):
- minLength: 최소 암호 길이 설정
- maxFailedAttempts: 암호 입력 실패 시 초기화 시도 횟수
4. 프로파일 디지털 서명 (Profile Signing) 실무 검증
서명되지 않은 .mobileconfig 프로파일을 기기에 설치할 경우 사용자에게 '서명되지 않음(Unsigned)' 경고가 표시되며 보안상 위험이 발생합니다. PKI SSL/TLS 인증서(X.509)를 활용해 OpenSSL 또는 macOS Native security 명령어로 프로파일에 디지털 서명을 적용합니다.
4.1 OpenSSL을 이용한 프로파일 서명 명령어 (검증 완료)
# 미서명 unsigned.mobileconfig 파일을 서명된 signed.mobileconfig 파일로 변환
openssl smime -sign \
-in unsigned.mobileconfig \
-out signed.mobileconfig \
-signer company_cert.pem \
-inkey company_key.key \
-certfile intermediate_ca.pem \
-outform DER \
-nodetach
4.2 macOS Native Keychain Certificate 서명 명령어 (대체 실행법)
macOS 환경에서는 키체인(Keychain)에 등록된 서명 인증서 이름을 지정하여 아래 명령어로 서명할 수 있습니다.
security cms -S -N "Company Profile Signing Cert" \
-i unsigned.mobileconfig \
-o signed.mobileconfig
4.3 오픈소스 MDM 프로젝트 실무 검증 근거 (MicroMDM / NanoMDM)
글로벌 오픈소스 커뮤니티에서 검증된 Go 기반 오픈소스 MDM 서버인 MicroMDM 및 NanoMDM 프로젝트에서도 위와 동일한 OpenSSL SMIME DER 서명 규격 및 mdmctl 명령어를 통해 .mobileconfig 프로파일을 생성 및 서명하여 배포하고 있습니다.
# MicroMDM mdmctl을 통한 프로파일 서명 및 배포 예시
mdmctl apply profiles \
-f /path/to/profile.mobileconfig \
-private-key /path/to/key.pem \
-cert /path/to/certificate.pem \
-sign
5. 무선(OTA, Over-The-Air) MDM 프로파일 배포 및 수명 주기 관리
MDM 프로파일을 웹 서버나 사내 포털을 통해 사용자 기기에 배포하고 설치, 갱신, 제거를 수명 주기별로 관리합니다.
5.1 Web Server MIME Type 설정
OTA 배포를 수용하는 웹 서버(Nginx / Apache)는 .mobileconfig 확장자에 대해 올바른 MIME Type을 응답 헤더에 명시해야 iOS 기기에서 프로파일 설치 화면이 자동으로 트리거됩니다.
# Nginx mime.types 설정 예시 (검증 완료)
types {
application/x-apple-asymmetric-key-packet mobileconfig;
}
5.2 OTA 프로파일 설치 배포 HTML 링크
<!-- 웹 브라우저에서 터치 시 프로파일 다운로드 및 설치 화면 진입 -->
<a href="https://mdm.company.com/profiles/signed.mobileconfig">
사내 MDM 보안 프로파일 설치
</a>
5.3 프로파일 수명 주기(Lifecycle) 관리 패턴
- 등록(Enrollment): Safari 브라우저 또는 iOS 설정 앱을 통해 OTA로 .mobileconfig 다운로드 후 SCEP 인증을 거쳐 기기 등록.
- 갱신(Renewal): 인증서 만료 전 MDM 서버에서 ScheduleOSUpdate 또는 새로운 MDM Payload 프로파일을 푸시 전송하여 덮어쓰기 업데이트.
- 제거(Removal & Unenrollment):
- 사용자가 설정 앱에서 프로파일 삭제 시 HasRemovalPasscode 검증 적용.
- MDM 서버에서 RemoveProfile 명령어를 푸시하여 기기에 주입되었던 사내 Wi-Fi, VPN, Enterprise App 인증서를 일괄 수거/삭제.
6. 핵심 요약
iOS 및 macOS MDM 프로파일은 Apple Developer Organization 계정 및 MDM Push Certificate 발급이라는 엄격한 전제조건 하에 .mobileconfig XML 규격으로 작성되며, OpenSSL/macOS Security PKI 서명을 거쳐 OTA 환경에서 안전하게 수명 주기를 제어합니다. (MicroMDM, NanoMDM 등 오픈소스 구현체 검증 완료)
7. 참고 자료 및 공식 출처 링크
- Apple Developer Documentation - Device Management Specification
- Apple Push Certificates Portal (MDM Vendor Cert 발급 포털)
- Apple Business Manager (ABM) 공식 사용자 가이드
- MicroMDM Open Source Project GitHub Repository
- NanoMDM Lightweight MDM Relay GitHub Repository
- AppConfig Community Standard (Managed App Configuration 스펙)


