Microsoft Information Protection SDK는 서비스 기반 애플리케이션이 다른 사용자를 대신하여 작동할 수 있는 두 가지 경로를 제공합니다. 서비스 ID와 다른 사용자 ID의 컨텍스트에서 파일에 레이블을 지정, 보호 또는 사용해야 하는 경우 위임이 필요할 수 있습니다. 이 위임된 ID는 엔진 또는 처리기 수준에서 설정할 수 있으며 설정되는 위치는 사용 사례에 따라 달라집니다.
엔진 설정 기반 위임
MIP SDK는 모든 SDK에 대한 설정 개체에 위임된 사용자 이메일 주소 제공을 지원합니다. 파일, 보호 및 정책. 이 작업은 설정 개체에서 DelegatedUserEmail 속성을 설정하여 수행됩니다. 그 결과, 해당 설정 객체로 초기화된 엔진은 사용자가 속성에 제공한 것처럼 DelegatedUserEmail을 수행합니다. 해당 특정 사용자에 대한 정책이 페치되고 보호되는 파일의 소유자를 포함하여 모든 보호 작업이 해당 사용자로 수행됩니다.
이 패턴은 서비스 기반 애플리케이션이 사용자로 완전히 작동해야 하는 경우에 유용합니다. 정책은 지정된 사용자에 대해서만 페치되어야 하며, 암호 해독 작업은 사용자 ID의 컨텍스트에서 수행해야 합니다. 이 엔진을 만들 때 애플리케이션이 해당 사용자에게 고유한 엔진 ID(종종 메일 주소)를 지정하는 것이 중요합니다. 이렇게 하면 캐싱의 이점이 실현됩니다. 고유한 엔진 ID가 제공되지 않으면 애플리케이션의 성능이 저하될 수 있습니다.
파일 SDK
다음 샘플에서는 C++ 및 C#에서 파일 SDK 애플리케이션의 위임된 ID를 설정하는 방법을 보여 줍니다. 정책 SDK에 동일한 패턴을 사용할 수 있습니다.
이 샘플에서는 .NET의 파일 SDK에서 대리자 엔진 을 만드는 방법을 보여줍니다.
// C# Example for creating a delegated file engine
string delegatedUserEmail = "alice@contoso.com";
var engineSettings = new PolicyEngineSettings(delegatedUserEmail, authDelegate, "", "en-US")
{
// Provide the identity for service discovery.
Identity = identity,
// Set the identity for which all MIP operations will be performed.
DelegatedUserEmail = delegatedUserEmail
};
var engine = Task.Run(async () => await profile.AddEngineAsync(engineSettings)).Result;
이 샘플에서는 C++의 파일 SDK에서 대리자 엔진 을 만드는 방법을 보여줍니다.
// C++ Example for creating a delegated file engine
std::string delegatedUserEmail = "alice@contoso.com";
FileEngine::Settings engineSettings(delegatedUserEmail, mAuthDelegate, "", "en-US", false);
// Set the identity for which all MIP operations will be performed.
engineSettings.SetDelegatedUserEmail(delegatedUserEmail);
auto enginePromise = std::make_shared<std::promise<std::shared_ptr<FileEngine>>>();
auto engineFuture = enginePromise->get_future();
mProfile->AddEngineAsync(engineSettings, enginePromise);
mEngine = engineFuture.get();
그 결과 지정된 사용자를 대신하여 모든 파일 엔진이 만들어집니다.
처리기 기반 위임
특정 사용자 ID 의 컨텍스트에서만 파일을 FileHandler해야 하는 시나리오에서는 개체를 통해 사용자 ID를 전달하는 메서드를 ProtectionSettings 제공합니다. 정책 및 암호 해독 작업은 인증된 서비스 ID로 수행됩니다. 보호 작업은 지정된 사용자를 대신하여 수행됩니다. 해당 사용자는 문서에서 MIP 보호의 소유자가 됩니다.
파일 SDK
사용자가 ProtectionSettings 개체에 직접 또는 레이블을 통해 제공하는 보호 작업만 수행됩니다. 이 개체는 File SDK의 SetLabel() 또는 SetProtection() 함수에 전달됩니다.
이 샘플에서는 .NET의 파일 SDK에서 대리자 보호 작업을 수행하는 방법을 보여줍니다.
string delegatedUserEmail = "bob@contoso.com";
ProtectionSettings protectionSettings = new ProtectionSettings()
{
// Set the delegated mail address
DelegatedUserEmail = delegatedUserEmail
};
handler.SetLabel(engine.GetLabelById(options.LabelId), labelingOptions, protectionSettings);
// Similar pattern for SetProtection()
// handler.SetProtection(protectionDescriptor, protectionSettings);
이 샘플에서는 C++의 파일 SDK에서 대리자 보호 작업을 수행하는 방법을 보여줍니다.
mip::ProtectionSettings protectionSettings;
// Set the delegated mail address
protectionSettings.SetDelegatedUserEmail(delegatedUserEmail);
handler->SetLabel(mEngine->GetLabelById(labelId), labelingOptions, protectionSettings);
그 결과 보호가 적용되는 모든 처리기 쓰기 작업이 위임된 사용자로 수행됩니다.
보호 SDK
보호 SDK는 파일 SDK와 다르게 작동합니다. 두 가지 유형의 처리기를 만들 수 있습니다. 하나는 게시용이고 다른 하나는 사용용입니다. 파일 SDK와 마찬가지로 위임된 메일 주소는 각 처리기 유형에 대한 설정 개체를 통해 설정됩니다.
.NET
이 샘플에서는 위임된 게시를 수행하는 방법을 보여 줍니다.
string delegatedUserEmail = "bob@contoso.com";
PublishingSettings publishingSettings = new PublishingSettings(protectionDescriptor)
{
// Set the delegated mail address
DelegatedUserEmail = delegatedUserEmail
};
var protectionHandler = engine.CreateProtectionHandlerForPublishing(publishingSettings);
이 샘플에서는 위임된 소비를 수행하는 방법을 보여 줍니다.
string delegatedUserEmail = "bob@contoso.com";
ConsumptionSettings consumptionSettings = new ConsumptionSettings(plInfo)
{
ContentName = "A few bytes.",
// Set the delegated mail address
DelegatedUserEmail = delegatedUserEmail
};
var protectionHandler = engine.CreateProtectionHandlerForConsumption(consumptionSettings);
C++
이 샘플에서는 위임된 게시를 수행하는 방법을 보여 줍니다.
string delegatedUserEmail = "bob@contoso.com";
mip::ProtectionHandler::PublishingSettings publishingSettings = mip::ProtectionHandler::PublishingSettings(descriptor);
// Set the delegated mail address
publishingSettings.SetDelegatedUserEmail(delegatedUserEmail);
mEngine->CreateProtectionHandlerForPublishingAsync(publishingSettings, handlerObserver, handlerPromise);
auto handler = handlerFuture.get();
이 샘플에서는 위임된 소비를 수행하는 방법을 보여 줍니다.
string delegatedUserEmail = "bob@contoso.com";
mip::ProtectionHandler::ConsumptionSettings consumptionSettings = mip::ProtectionHandler::ConsumptionSettings(serializedPublishingLicense);
// Set the delegated mail address
consumptionSettings.SetDelegatedUserEmail(delegatedUserEmail);
mEngine->CreateProtectionHandlerForConsumptionAsync(consumptionSettings, handlerObserver, handlerPromise);
auto handler = handlerFuture.get();
필요한 권한
위의 각 시나리오에는 다른 사용 권한 집합이 필요합니다.
| 시나리오 | 사용 권한 필요 |
|---|---|
| 파일 SDK 위임된 엔진 | UnifiedPolicy.Tenant.Read 콘텐츠.위임된리더 There are no proposed improvements as the term should remain as "Content.DelegatedWriter" for accuracy and clarity in a technical context. |
| 정책 SDK 위임된 엔진 | UnifiedPolicy.Tenant.Read |
| 파일 SDK 위임 처리기 | There are no proposed improvements as the term should remain as "Content.DelegatedWriter" for accuracy and clarity in a technical context. |
| 보호 SDK 위임 게시 | There are no proposed improvements as the term should remain as "Content.DelegatedWriter" for accuracy and clarity in a technical context. |
| 보호 SDK 위임 사용량 | 콘텐츠.위임된리더 |
사용 권한에 대한 전체 검토 및 설정 위치는 Microsoft Information Protection SDK에 대한 API 사용 권한을 검토하세요.