Aracılığıyla paylaş


İstemci Bilgilerini Test Etme

Genel Bakış

PlayReady Test Sunucusu, istemci tarafından oluşturulan lisans isteği sınamasından lisans sunucusuna sağlanan bilgileri yansıtan özel clientinfo bir özellik içerir. Bu özellik, geliştiricilerin lisans sunucularına iletilen istemci bilgilerini kolayca incelemesine ve istemci özelliklerine göre uygun lisans oluşturma mantığı oluşturmasına olanak tanır.

İstemci Bilgisi Özelliği

Lisans isteklerinde clientinfo gönderilen istemci bilgilerini incelemek için parametresini kullanın:

Test Sunucusu URL'si:

http://test.playready.microsoft.com/service/rightsmanager.asmx?cfg=(msg:clientinfo)

SOAP Eylemi:

http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense

Örnek İstek Yapısı

İstemci bilgileri özelliği standart PlayReady lisans alma isteklerini işler ve lisans yerine istemci hakkında ayrıntılı bilgiler döndürür. Tipik bir isteğin yapısı şöyledir:

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <AcquireLicense xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols">
            <challenge>
                <Challenge xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols/messages">
                    <LA xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols"
                        Id="SignedData" xml:space="preserve">
                        <Version>1</Version>
                        <ContentHeader>
                            <WRMHEADER xmlns="http://schemas.microsoft.com/DRM/2007/03/PlayReadyHeader"
                                       version="4.0.0.0">
                                <DATA>
                                    <PROTECTINFO>
                                        <KEYLEN>16</KEYLEN>
                                        <ALGID>AESCTR</ALGID>
                                    </PROTECTINFO>
                                    <KID>JpbjtvscoUq8vU7xq6eEOg==</KID>
                                    <LA_URL>https://test.playready.microsoft.com/service/rightsmanager.asmx</LA_URL>
                                    <LUI_URL>https://test.playready.microsoft.com/service/getrights.html</LUI_URL>
                                </DATA>
                            </WRMHEADER>
                        </ContentHeader>
                        <CLIENTINFO>
                            <CLIENTVERSION>10.0.16384.10011</CLIENTVERSION>
                        </CLIENTINFO>
                        <RevocationLists>
                            <RevListInfo>
                                <ListID>ioydTlK2p0WXkWklprR5Hw==</ListID>
                                <Version>11</Version>
                            </RevListInfo>
                            <!-- Additional revocation lists... -->
                        </RevocationLists>
                        <LicenseNonce>YCBas7tAUmkjOcabdD4DuQ==</LicenseNonce>
                        <ClientTime>1488568844</ClientTime>
                        <EncryptedData xmlns="http://www.w3.org/2001/04/xmlenc#"
                                       Type="http://www.w3.org/2001/04/xmlenc#Element">
                            <!-- Encrypted client data... -->
                        </EncryptedData>
                    </LA>
                    <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
                        <!-- Digital signature... -->
                    </Signature>
                </Challenge>
            </challenge>
        </AcquireLicense>
    </soap:Body>
</soap:Envelope>

Örnek Yanıt: Windows 10 Edge Tarayıcısı

Windows 10'da Microsoft Edge tarafından verilen bir sınama için:

Client Info:
    Client Version: 10.0.16384.10011
    Client Time: 10/01/2017 2:00:00 PM

Supported Features:
    Receiver
    AntiRollbackClock
    RevocationLists
    PlayReady3Features

Device Certificate Info (Cert 0):
    Platform: WindowsOnX86
    Type: Device
    SecurityLevel: 2000
    RobustnessVersion: 100925543
    DigestValue: 04+2aK5sjv+m5/EUY9BIMFqe0ResBkL9wfuFepWDU9E=
    IssuerKey: h/k8EU71zsgAqa0niR1TnpKDC6dyOEgUGjybc3+s/EnUJWpkMtOwygoyCPp1nuRCFDvfoaaI78kb2fqGBI0tWg==
    Binding Key Type: 3

Certificate Chain:

↳ Cert 1:
    ManufacturerName: Microsoft
    ModelName: Windows
    ModelNumber: 6.4.0.103
    DigestValue: LLp1fynIs9tgDxDDU+8jFveBoQp+0x8fXnqyV9tk1Zc=
    Platform: WindowsOnX86

    ↳ Cert 2:
        ManufacturerName: Microsoft
        ModelName: PlayReady SL2000 Device Port- Windows Lib Codebase Version CA
        ModelNumber: 1.0.0.4
        DigestValue: Y3C0kjOxz3h/njYBKeApsvfPscwLcV1qAiTfAXXSLw4=

        ↳ Cert 3:
            ManufacturerName: Microsoft
            ModelName: PlayReady SL2000 Device Port - Windows Platform CA for x86/amd64
            ModelNumber: 1.0.0.3
            DigestValue: L62pDo9+gkd6LoLDbQwgxwtYldcuhSEog7GcJwtJ3CE=

            ↳ Cert 4:
                ManufacturerName: Microsoft
                ModelName: PlayReady SL2000 Device Port + Link CA
                ModelNumber: 1.0.0.1
                DigestValue: 7Q8z1rSr8I3AGkcf0BNoDgwS46nO0wD5m0WvYfFoTWQ=

Örnek Yanıt: PlayReady 3.2 SL3000 İstemcisi

PlayReady 3.2 tabanlı SL3000 istemcisi tarafından verilen bir sınama için:

Client Info:
    Client Version: 3.2.0.4242
    Client Time: 10/01/2017 2:00:00 PM

Supported Features:
    SecureClock
    RevocationLists
    Receiver
    Transmitter
    PlayReady3Features

Device Certificate Info (Cert 0):
    Platform: OEM
    Type: Device
    SecurityLevel: 3000
    RobustnessVersion: 0
    ManufacturerName: Contoso
    ModelName: Cool Device Name
    ModelNumber: Cool Device Name
    DigestValue: IOSxDmGiRlX+dUf62sohHj/IB0qRKSkV7wz7sbZ3HSo=
    IssuerKey: UlT6XXcgAMzaVAJN9JLJVomCFwppjoqgMMcT748yX27D053iiEP69pjEBnTxWiSEVXj76/e2wDImTgQDtbLTVg==
    Binding Key Type: 3

Certificate Chain:

↳ Cert 1:
    ManufacturerName: Contoso
    ModelName: Cool Device Name
    ModelNumber: ABC-XYZ-123
    DigestValue: rmnxSlpuh9WTlXa6ACLcSJDnPVtoS5/2P1wa/kEgs1M=

    ↳ Cert 2:
        ManufacturerName: Contoso
        DigestValue: 5H3YVzR9EhHVnsseOJmO/ZCrX10Z8bOx9PDhKOhrxe4=

        ↳ Cert 3:
            ManufacturerName: Microsoft
            ModelName: PlayReady SL3000 Device Port + Link CA
            ModelNumber: 1.0.0.1
            DigestValue: bk7YOJRioSgnzjpZgLasowaL96LFIBHDx6B0z+JoDPE=

İstemci Bilgileri Öğeleri

Temel İstemci Bilgileri

Alan Açıklama Örnek Değerler
İstemci Sürümü PlayReady istemci sürümü 10.0.16384.10011, 3.2.0.4242
İstemci Zamanı İstemci sistem zamanı 10/01/2017 2:00:00 PM
Peron İstemci platformu tanımlayıcısı WindowsOnX86, OEM

Desteklenen Özellikler

Özellik Açıklama
Alıcı İstemci içeriği alabilir ve şifresini çözebilir
Verici İstemci diğer cihazlara içerik aktarabilir
AntiRollbackClock İstemci geri alma saati önleme işlevini destekler
İptal Listeleri İstemci iptal listesi işlemeyi destekler
PlayReady3Features İstemci, PlayReady 3.0+ özelliklerini destekler
SecureClock İstemci güvenli saat işlevselliğini destekler

Güvenlik Düzeyi Bilgileri

Güvenlik Düzeyi Açıklama Kullanım Örnekleri
SL150 Yazılım tabanlı koruma Temel içerik koruması
SL2000 Donanım tabanlı koruma Standart premium içerik
SL3000 Donanım güvenlik modülü Ultra premium içerik

Sertifika Zinciri Bilgileri

Zincirdeki her sertifika aşağıdakileri sağlar:

  • ManufacturerName - Cihaz üreticisi
  • ModelName - Cihaz modeli tanımlayıcısı
  • ModelNumber - Belirli model sürümü
  • DigestValue - Sertifika parmak izi
  • Platform - Donanım platformu türü

Test Senaryoları

İstemci Yeteneği Algılama

async function detectClientCapabilities() {
    const clientInfoUrl = 'http://test.playready.microsoft.com/service/rightsmanager.asmx?cfg=(msg:clientinfo)';
    
    try {
        const response = await sendLicenseRequest(clientInfoUrl);
        const clientInfo = parseClientInfoResponse(response);
        
        return {
            version: clientInfo.clientVersion,
            securityLevel: clientInfo.deviceCert.securityLevel,
            features: clientInfo.supportedFeatures,
            platform: clientInfo.deviceCert.platform,
            manufacturer: clientInfo.certificateChain[0].manufacturerName
        };
    } catch (error) {
        console.error('Failed to detect client capabilities:', error);
        return null;
    }
}

Güvenlik Düzeyi Doğrulama

async function validateSecurityLevel(requiredLevel) {
    const clientInfo = await detectClientCapabilities();
    
    if (!clientInfo) {
        return { valid: false, reason: 'Could not detect client capabilities' };
    }
    
    const clientLevel = parseInt(clientInfo.securityLevel);
    const required = parseInt(requiredLevel);
    
    return {
        valid: clientLevel >= required,
        clientLevel: clientLevel,
        requiredLevel: required,
        reason: clientLevel >= required ? 'Security level sufficient' : 'Security level insufficient'
    };
}

Özellik Uyumluluğu Testi

async function testFeatureCompatibility(requiredFeatures) {
    const clientInfo = await detectClientCapabilities();
    
    if (!clientInfo) {
        return { compatible: false, reason: 'Could not detect client features' };
    }
    
    const missingFeatures = requiredFeatures.filter(
        feature => !clientInfo.features.includes(feature)
    );
    
    return {
        compatible: missingFeatures.length === 0,
        supportedFeatures: clientInfo.features,
        missingFeatures: missingFeatures,
        requiredFeatures: requiredFeatures
    };
}

Lisans Sunucusu Uygulaması

Lisans Kararları için İstemci Bilgilerini Kullanma

public class ClientInfoBasedLicenseHandler
{
    public LicenseResponse GenerateLicense(LicenseRequest request)
    {
        var clientInfo = ExtractClientInfo(request.Challenge);
        
        // Determine security level
        var securityLevel = GetSecurityLevel(clientInfo);
        
        // Check feature support
        var supportedFeatures = GetSupportedFeatures(clientInfo);
        
        // Build license based on client capabilities
        var license = new LicenseBuilder()
            .WithSecurityLevel(securityLevel)
            .WithFeatures(supportedFeatures)
            .WithOutputProtections(GetOutputProtections(securityLevel))
            .Build();
            
        return new LicenseResponse(license);
    }
    
    private SecurityLevel GetSecurityLevel(ClientInfo clientInfo)
    {
        switch (clientInfo.DeviceCertificate.SecurityLevel)
        {
            case 3000:
                return SecurityLevel.SL3000;
            case 2000:
                return SecurityLevel.SL2000;
            default:
                return SecurityLevel.SL150;
        }
    }
    
    private List<string> GetSupportedFeatures(ClientInfo clientInfo)
    {
        var features = new List<string>();
        
        if (clientInfo.SupportedFeatures.Contains("PlayReady3Features"))
        {
            features.Add("AdvancedOutputProtection");
            features.Add("SecureStop");
        }
        
        if (clientInfo.SupportedFeatures.Contains("SecureClock"))
        {
            features.Add("AntiRollback");
        }
        
        return features;
    }
}

lisans mantığını Platform-Specific

public OutputProtectionLevels DetermineOutputProtections(ClientInfo clientInfo)
{
    var protections = new OutputProtectionLevels();
    
    // Adjust based on platform
    switch (clientInfo.Platform.ToLower())
    {
        case "windowsonx86":
        case "windowsonx64":
            protections.CompressedDigitalVideo = 270;
            protections.UncompressedDigitalVideo = 270;
            break;
            
        case "oem":
            // Custom OEM device - check manufacturer
            if (IsHighSecurityOEM(clientInfo.ManufacturerName))
            {
                protections.CompressedDigitalVideo = 270;
                protections.UncompressedDigitalVideo = 270;
            }
            else
            {
                protections.CompressedDigitalVideo = 200;
                protections.UncompressedDigitalVideo = 200;
            }
            break;
            
        default:
            // Conservative defaults for unknown platforms
            protections.CompressedDigitalVideo = 150;
            protections.UncompressedDigitalVideo = 150;
            break;
    }
    
    return protections;
}

İstemci Bilgileri Analizi

Windows Platform Analizi

Windows 10 Edge İstemci Özellikleri:

  • Peron: WindowsOnX86
  • Güvenlik Düzeyi: 2000 (SL2000)
  • Sağlamlık Sürümü: Donanıma özgü değer
  • Sertifika Zinciri: Microsoft tarafından verilen sertifikalar
  • Özellikler: Standart PlayReady 3.0 özellik kümesi

OEM Cihaz Analizi

Özel OEM İstemci Özellikleri:

  • Peron: OEM
  • Güvenlik Düzeyi: 3000 (SL3000)
  • Üretici: Özel OEM adı
  • Sertifika Zinciri: OEM + Microsoft sertifikaları
  • Özellikler: Gelişmiş PlayReady 3.0+ özellikleri

En İyi Yöntemler

İstemci Bilgileri Kullanımı

  1. Güvenlik Düzeyi Doğrulama - İstemcinin içerik güvenlik gereksinimlerini karşıladığını doğrulama
  2. Özellik Algılama - Desteklenen özelliklere göre lisansı ayarlama
  3. Platform İyileştirme - Belirli platformlar için ayarları iyileştirme
  4. Sertifika Doğrulama - Sertifika zinciri bütünlüğünü doğrulama
  5. Özellik Eşleştirme - İçerik gereksinimlerini istemci özellikleriyle eşleştirme

Lisans Oluşturma Stratejisi

  1. Muhafazakar Varsayılanlar - Bilinmeyen istemciler için güvenli varsayılanları kullanın
  2. Aşamalı Geliştirme - İstemci özelliklerine göre özellikler ekleme
  3. Önce Güvenlik - İşlevsellik yerine güvenliğin önceliğini belirleme
  4. Platform Farkındalığı - Platforma özgü sınırlamaları göz önünde bulundurun
  5. Gelecekteki Uyumluluk - İleriye dönük uyumluluk için tasarım