오프라인 게시를 사용하면 클라이언트가 권한 관리 서비스에 처음 연결한 후 서비스 호출 없이 새로 보호된 콘텐츠에 대한 게시 라이선스 를 생성할 수 있습니다. 이는 오프라인 모드에서 작동해야 하거나 서비스 호출을 피하려는 애플리케이션에 유용합니다.
요구 사항
오프라인 게시 기능에는 다음과 같은 요구 사항이 있습니다.
- 지원되는 MIP SDK 버전입니다.
- Microsoft Purview Information Protection에 대한 라이선스가 부여된 사용자입니다. 라이선스 요구 사항
- 애플리케이션이 오프라인으로 데이터를 초기화하고 캐시하기 위한 인터넷 연결입니다.
지원되지 않음
다음 항목은 오프라인 게시 기능의 일부로 지원되지 않습니다.
- AD RMS(Active Directory Rights Management Services)는 지원되지 않습니다.
- DKE(이중 키 암호화): DKE 기능은 게시 시 공개 키를 가져오기 위해 서비스를 호출해야 합니다.
보호 SDK와 함께 오프라인 게시 사용
오프라인 게시에는 서비스를 호출하지 않고 애플리케이션을 게시할 수 있도록 3단계가 필요합니다.
- 프로필 설정(해당 SDK의 경우)에서 오프라인 게시 설정을 사용하도록 설정합니다.
- 템플릿 새로 고침 속도를 설정합니다. 이 API는 캐시된 템플릿의 유효 기간을 설정합니다.
- 템플릿 검색 API를 호출하여 캐시(
GetTemplatesAsync()또는GetTemplates())를 채웁니다.
파일 SDK에서 오프라인 게시 사용
파일 SDK는 기본적으로 오프라인 게시를 사용하며 추가 설정 또는 구성이 필요하지 않습니다.
캐싱 (Caching) 동작
애플리케이션은 새로 고침 기간이 만료되거나 호출될 때까지 GetTemplatesAsync()GetTemplates() 서비스에 연락하여 템플릿을 가져올 수 없습니다. 애플리케이션이 오프라인 상태이고 캐시가 만료된 경우 게시가 실패합니다. 새로 고침 간격은 최종 사용자의 오프라인 사용량과 템플릿이 새로 고쳐지도록 하는 것 사이의 균형을 유지해야 합니다. 대부분의 애플리케이션에서 24시간 이하가 이상적입니다.
예시
다음 코드 조각은 이러한 샘플 애플리케이션에서 가져옵니다.
다음 단계를 완료한 후에는 템플릿 캐시가 만료되지 않은 경우 서비스 호출을 수행하지 않고 게시 라이선스를 만듭니다.
C++ 예제
C++에서 ProtectionProfileSettings 구성
// Initialize ProtectionProfileSettings using MipContext
ProtectionProfile::Settings profileSettings(mMipContext,
mip::CacheStorageType::OnDiskEncrypted,
::make_shared<sample::consent::ConsentDelegateImpl>(),
std::make_shared<ProtectionProfileObserverImpl>()
);
// Enable Offline Publishing
profileSettings.SetOfflinePublishing(true);
템플릿 새로 고침 기간 설정(C++)
// Set the template refresh interval
engineSettings.SetTemplateRefreshArgs(std::chrono::hours(24));
캐시를 초기화하는 템플릿 가져오기(C++)
auto loadPromise = std::make_shared<std::promise<vector<shared_ptr<mip::TemplateDescriptor>>>>();
std::future<vector<shared_ptr<mip::TemplateDescriptor>>> loadFuture = loadPromise->get_future();
mEngine->GetTemplatesAsync(engineObserver, loadPromise);
auto templates = loadFuture.get();
.NET 예제
ProtectionProfileSettings(.NET) 구성하기
// Initialize ProtectionProfileSettings
var profileSettings = new ProtectionProfileSettings(mipContext,
CacheStorageType.OnDisk,
new ConsentDelegateImplementation());
// Enable Offline Publishing
profileSettings.OfflinePublishing = true;
템플릿 새로 고침 기간 설정(.NET)
// Initialize ProtectionEngineSettings
var engineSettings = new ProtectionEngineSettings(identity.Email, authDelegate, "", "")
{
Identity = identity
};
// Set the template refresh interval
engineSettings.TemplateRefreshRate = new TimeSpan(24, 0, 0);
var engine = profile.AddEngine(engineSettings);
캐시를 초기화하는 템플릿 가져오기(.NET)
List<TemplateDescriptor> templates = engine.GetTemplates();
Java 예제
ProtectionProfileSettings를 구성하기 (Java)
ProtectionProfileSettings profileSettings = new ProtectionProfileSettings();
profileSettings.setMipContext(mipContext);
profileSettings.setCacheStorageType(CacheStorageType.ON_DISK);
profileSettings.setConsentDelegate(new ConsentDelegateImplementation());
// Enable Offline Publishing
profileSettings.setOfflinePublishing(true);
템플릿 새로 고침 기간 설정(Java)
ProtectionEngineSettings engineSettings = new ProtectionEngineSettings(identity.getEmail(), authDelegate, "", "");
engineSettings.setIdentity(identity);
// Set the template refresh interval in hours
engineSettings.setTemplateRefreshRate(Duration.ofHours(24));
캐시를 초기화하는 템플릿 가져오기(Java)
List<TemplateDescriptor> templates = engine.getTemplates();