이 문서에서는 MIP SDK API를 사용하여 애플리케이션이 보호를 적용하기 전에 동작 및 UI 결정을 내릴 수 있도록 레이블에 구성된 보호 유형을 식별하는 방법을 설명합니다. 또한 각 보호 유형에 대한 주요 API 및 예상 동작을 요약합니다.
개요
MIP SDK 1.18부터 클래스는 Label 레이블이 적용되는 보호 종류를 결정하는 메서드를 노출합니다. 이전에는 애플리케이션이 레이블이 보호를 적용했는지 여부만 확인할 HasRightsManagementPolicy() 수 있었습니다. 새 메서드를 사용하면 애플리케이션에서 다음 보호 유형을 구분할 수 있습니다.
- 전달 안 함 받는 사람이 콘텐츠를 전달, 인쇄 또는 복사하지 못하도록 하는 보호입니다.
- 암호화 전용 콘텐츠를 암호화하지만 암호 해독을 넘어 받는 사람의 작업을 제한하지 않는 보호입니다.
- 임시 사용자가 애플리케이션 시 사용자 지정 권한(사용자 정의 권한)을 정의하는 보호입니다.
이러한 방법을 통해 애플리케이션은 레이블을 처리하는 방법에 대해 보다 지능적인 결정을 내릴 수 있습니다. 예를 들어 전자 메일 애플리케이션은 레이블이 전달 안 함 및 암호화 전용 보호를 적용하는지 여부에 따라 다른 UI 옵션을 표시할 수 있습니다.
레이블 보호 형식 쿼리
C++
클래스는 mip::Label 다음 메서드를 제공합니다.
// Returns true if the label applies any protection.
bool HasRightsManagementPolicy() const;
// Returns true if the label applies Do Not Forward protection.
bool HasDoNotForwardProtection() const;
// Returns true if the label applies Encrypt Only protection.
bool HasEncryptOnlyProtection() const;
// Returns true if the label applies ad-hoc (user-defined) protection.
bool HasAdhocProtection() const;
예: 레이블 보호 유형 검사
for (const auto& label : engine->ListSensitivityLabels()) {
std::cout << "Label: " << label->GetName() << std::endl;
if (label->HasRightsManagementPolicy()) {
if (label->HasDoNotForwardProtection()) {
std::cout << " Protection type: Do Not Forward" << std::endl;
} else if (label->HasEncryptOnlyProtection()) {
std::cout << " Protection type: Encrypt Only" << std::endl;
} else if (label->HasAdhocProtection()) {
std::cout << " Protection type: Ad-hoc (user-defined permissions)" << std::endl;
} else {
std::cout << " Protection type: Template-based" << std::endl;
}
} else {
std::cout << " No protection" << std::endl;
}
}
C#(.NET)
.NET 래퍼에서 클래스는 Label 일치하는 속성을 노출합니다.
label.HasRightsManagementPolicy // bool
label.HasDoNotForwardProtection // bool
label.HasEncryptOnlyProtection // bool
label.HasAdhocProtection // bool
예: 레이블 보호 유형 검사
foreach (var label in engine.SensitivityLabels)
{
Console.WriteLine($"Label: {label.Name}");
if (label.HasRightsManagementPolicy)
{
if (label.HasDoNotForwardProtection)
Console.WriteLine(" Protection type: Do Not Forward");
else if (label.HasEncryptOnlyProtection)
Console.WriteLine(" Protection type: Encrypt Only");
else if (label.HasAdhocProtection)
Console.WriteLine(" Protection type: Ad-hoc (user-defined permissions)");
else
Console.WriteLine(" Protection type: Template-based");
}
else
{
Console.WriteLine(" No protection");
}
}
기존 API와의 관계
이러한 새 메서드는 기존 메서드를 보완합니다 HasRightsManagementPolicy() . 관계는 다음과 같습니다.
-
HasRightsManagementPolicy()이false을 반환하면 세 가지 새로운 메서드 모두false을 반환합니다. -
HasRightsManagementPolicy()가 반환되거나 새 메서드 중 하나 이상이true를 반환하는 경우, 또는 레이블에서 템플릿 기반 보호를 사용하는 경우에는true를 반환하지 않습니다. - 레이블은 임시(사용자 정의 권한)를 전달 안 함 또는 암호화 전용과 결합할 수 있습니다. 이러한 결합된 상황에서:
-
HasDoNotForwardProtection()는 레이블이 전달 안 함 보호를 적용할 때, 임시 동작의 포함 여부에 상관없이true를 반환합니다. -
HasEncryptOnlyProtection()는 레이블이 암호화 전용 보호를 적용할 때 임시 동작도 포함되는지 여부를 반환true합니다. -
HasAdhocProtection()는 레이블이 단독으로 임시 보호(전달 안 함 또는 암호화만 제외)를 적용할 때만true반환됩니다.
-