Condividi tramite


Test delle informazioni client

Informazioni generali

Il server di test PlayReady include una funzionalità speciale clientinfo che riflette le informazioni disponibili per il server licenze dalla richiesta di licenza generata dal client. Questa funzionalità consente agli sviluppatori di esaminare facilmente le informazioni client trasmesse ai server licenze e di creare logica di generazione delle licenze appropriata in base alle funzionalità client.

Funzionalità informazioni client

Usare il parametro per controllare le clientinfo informazioni client inviate nelle richieste di licenza:

URL del server di test:

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

Azione SOAP:

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

Struttura di richiesta di esempio

La funzionalità informazioni client elabora le richieste di acquisizione delle licenze PlayReady standard e restituisce informazioni dettagliate sul client invece di una licenza. Ecco la struttura di una richiesta tipica:

<?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>http://test.playready.microsoft.com/service/rightsmanager.asmx</LA_URL>
                                    <LUI_URL>http://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>

Risposta di esempio: Browser Windows 10 Edge

Per una sfida rilasciata da Microsoft Edge in Windows 10:

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=

Risposta di esempio: PlayReady 3.2 SL3000 Client

Per una sfida rilasciata da un client SL3000 basato su PlayReady 3.2:

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=

Elementi di informazioni client

Informazioni di base sul client

Campo Descrizione Valori di esempio
Versione client Versione del client PlayReady 10.0.16384.10011, 3.2.0.4242
Ora client Ora del sistema client 10/01/2017 2:00:00 PM
Piattaforma Identificatore della piattaforma client WindowsOnX86, OEM

Funzionalità supportate

Caratteristica / Funzionalità Descrizione
ricevitore Il client può ricevere e decrittografare il contenuto
Trasmittente Il client può trasmettere contenuto ad altri dispositivi
AntiRollbackClock Il client supporta la funzionalità anti-rollback clock
Revoche di revoche Il client supporta l'elaborazione dell'elenco di revoche
PlayReady3Features Il client supporta le funzionalità PlayReady 3.0+
SecureClock Il client supporta funzionalità di clock sicure

Informazioni sul livello di sicurezza

Livello di sicurezza Descrizione Casi d'uso
SL150 Protezione basata su software Protezione del contenuto di base
SL2000 Protezione basata su hardware Contenuto Premium Standard
SL3000 Modulo di protezione hardware Contenuto Ultra-Premium

Informazioni sulla catena di certificati

Ogni certificato nella catena fornisce:

  • ManufacturerName - Produttore del dispositivo
  • ModelName - Identificatore del modello di dispositivo
  • ModelNumber - Versione specifica del modello
  • DigestValue - Impronta digitale del certificato
  • Piattaforma - Tipo di piattaforma hardware

Scenari di test

Rilevamento delle funzionalità client

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;
    }
}

Convalida a livello di sicurezza

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'
    };
}

Test di compatibilità delle funzionalità

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
    };
}

Implementazione del server licenze

Uso delle informazioni client per le decisioni relative alle licenze

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;
    }
}

Platform-Specific logica di licenza

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;
}

Analisi delle informazioni client

Analisi della piattaforma Windows

Caratteristiche del client Windows 10 Edge:

  • Piattaforma: WindowsOnX86
  • Livello di sicurezza: 2000 (SL2000)
  • Versione affidabilità: valore specifico dell'hardware
  • Catena di certificati: certificati rilasciati da Microsoft
  • Funzionalità: set di funzionalità PlayReady 3.0 standard

Analisi dei dispositivi OEM

Caratteristiche client OEM personalizzate:

  • Piattaforma: OEM
  • Livello di sicurezza: 3000 (SL3000)
  • Produttore: nome OEM personalizzato
  • Catena di certificati: OEM e certificati Microsoft
  • Funzionalità: Funzionalità avanzate di PlayReady 3.0+

Migliori pratiche

Utilizzo delle informazioni client

  1. Convalida a livello di sicurezza - Verificare che il client soddisfi i requisiti di sicurezza del contenuto
  2. Rilevamento delle funzionalità - Regolare la licenza in base alle funzionalità supportate
  3. Ottimizzazione della piattaforma - Ottimizzare le impostazioni per piattaforme specifiche
  4. Convalida dei certificati - Verificare l'integrità della catena di certificati
  5. Corrispondenza delle funzionalità : corrisponde ai requisiti del contenuto alle funzionalità client

Strategia di generazione delle licenze

  1. Impostazioni predefinite conservatrici : usare impostazioni predefinite sicure per i client sconosciuti
  2. Miglioramento progressivo - Aggiungere funzionalità basate sulle funzionalità client
  3. Security First - Classificare in ordine di priorità la sicurezza rispetto alle funzionalità
  4. Consapevolezza della piattaforma- Prendere in considerazione le limitazioni specifiche della piattaforma
  5. Compatibilità futura - Progettare per la compatibilità con l'inoltro

Risorse di supporto

Query aziendali

Query sulle operazioni

Supporto tecnico

Informazioni di formazione


© Microsoft Corporation. Tutti i diritti riservati. Marchi | Privacy