[ms-kpp]: key provisioning protocol... · 2017. 6. 8. · [ms-kpp]: key provisioning protocol ......

24
1 / 24 [MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017 [MS-KPP]: Key Provisioning Protocol Intellectual Property Rights Notice for Open Specifications Documentation Technical Documentation. Microsoft publishes Open Specifications documentation (“this documentation”) for protocols, file formats, data portability, computer languages, and standards support. Additionally, overview documents cover inter-protocol relationships and interactions. Copyrights. This documentation is covered by Microsoft copyrights. Regardless of any other terms that are contained in the terms of use for the Microsoft website that hosts this documentation, you can make copies of it in order to develop implementations of the technologies that are described in this documentation and can distribute portions of it in your implementations that use these technologies or in your documentation as necessary to properly document the implementation. You can also distribute in your implementation, with or without modification, any schemas, IDLs, or code samples that are included in the documentation. This permission also applies to any documents that are referenced in the Open Specifications documentation. No Trade Secrets. Microsoft does not claim any trade secret rights in this documentation. Patents. Microsoft has patents that might cover your implementations of the technologies described in the Open Specifications documentation. Neither this notice nor Microsoft's delivery of this documentation grants any licenses under those patents or any other Microsoft patents. However, a given Open Specifications document might be covered by the Microsoft Open Specifications Promise or the Microsoft Community Promise. If you would prefer a written license, or if the technologies described in this documentation are not covered by the Open Specifications Promise or Community Promise, as applicable, patent licenses are available by contacting [email protected]. License Programs. To see all of the protocols in scope under a specific license program and the associated patents, visit the Patent Map. Trademarks. The names of companies and products contained in this documentation might be covered by trademarks or similar intellectual property rights. This notice does not grant any licenses under those rights. For a list of Microsoft trademarks, visit www.microsoft.com/trademarks. Fictitious Names. The example companies, organizations, products, domain names, email addresses, logos, people, places, and events that are depicted in this documentation are fictitious. No association with any real company, organization, product, domain name, email address, logo, person, place, or event is intended or should be inferred. Reservation of Rights. All other rights are reserved, and this notice does not grant any rights other than as specifically described above, whether by implication, estoppel, or otherwise. Tools. The Open Specifications documentation does not require the use of Microsoft programming tools or programming environments in order for you to develop an implementation. If you have access to Microsoft programming tools and environments, you are free to take advantage of them. Certain Open Specifications documents are intended for use in conjunction with publicly available standards specifications and network programming art and, as such, assume that the reader either is familiar with the aforementioned material or has immediate access to it. Support. For questions and support, please contact [email protected].

Upload: others

Post on 24-Jan-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

1 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

[MS-KPP]:

Key Provisioning Protocol

Intellectual Property Rights Notice for Open Specifications Documentation

Technical Documentation. Microsoft publishes Open Specifications documentation (“this documentation”) for protocols, file formats, data portability, computer languages, and standards support. Additionally, overview documents cover inter-protocol relationships and interactions.

Copyrights. This documentation is covered by Microsoft copyrights. Regardless of any other terms that are contained in the terms of use for the Microsoft website that hosts this documentation, you can make copies of it in order to develop implementations of the technologies

that are described in this documentation and can distribute portions of it in your implementations that use these technologies or in your documentation as necessary to properly document the

implementation. You can also distribute in your implementation, with or without modification, any schemas, IDLs, or code samples that are included in the documentation. This permission also applies to any documents that are referenced in the Open Specifications documentation.

No Trade Secrets. Microsoft does not claim any trade secret rights in this documentation. Patents. Microsoft has patents that might cover your implementations of the technologies

described in the Open Specifications documentation. Neither this notice nor Microsoft's delivery of this documentation grants any licenses under those patents or any other Microsoft patents. However, a given Open Specifications document might be covered by the Microsoft Open Specifications Promise or the Microsoft Community Promise. If you would prefer a written license, or if the technologies described in this documentation are not covered by the Open Specifications Promise or Community Promise, as applicable, patent licenses are available by contacting [email protected].

License Programs. To see all of the protocols in scope under a specific license program and the associated patents, visit the Patent Map.

Trademarks. The names of companies and products contained in this documentation might be covered by trademarks or similar intellectual property rights. This notice does not grant any

licenses under those rights. For a list of Microsoft trademarks, visit www.microsoft.com/trademarks.

Fictitious Names. The example companies, organizations, products, domain names, email addresses, logos, people, places, and events that are depicted in this documentation are fictitious. No association with any real company, organization, product, domain name, email address, logo, person, place, or event is intended or should be inferred.

Reservation of Rights. All other rights are reserved, and this notice does not grant any rights other than as specifically described above, whether by implication, estoppel, or otherwise.

Tools. The Open Specifications documentation does not require the use of Microsoft programming

tools or programming environments in order for you to develop an implementation. If you have access to Microsoft programming tools and environments, you are free to take advantage of them. Certain Open Specifications documents are intended for use in conjunction with publicly available standards specifications and network programming art and, as such, assume that the reader either is familiar with the aforementioned material or has immediate access to it.

Support. For questions and support, please contact [email protected].

Page 2: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

2 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

Revision Summary

Date Revision History Revision Class Comments

7/14/2016 1.0 New Released new document.

6/1/2017 2.0 Major Significantly changed the technical content.

Page 3: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

3 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

Table of Contents

1 Introduction ............................................................................................................ 5 1.1 Glossary ........................................................................................................... 5 1.2 References ........................................................................................................ 6

1.2.1 Normative References ................................................................................... 6 1.2.2 Informative References ................................................................................. 7

1.3 Overview .......................................................................................................... 7 1.4 Relationship to Other Protocols ............................................................................ 7 1.5 Prerequisites/Preconditions ................................................................................. 7 1.6 Applicability Statement ....................................................................................... 8 1.7 Versioning and Capability Negotiation ................................................................... 8 1.8 Vendor-Extensible Fields ..................................................................................... 8 1.9 Standards Assignments ....................................................................................... 8

2 Messages ................................................................................................................. 9 2.1 Transport .......................................................................................................... 9 2.2 Common Data Types .......................................................................................... 9

2.2.1 HTTP Headers .............................................................................................. 9 2.2.1.1 client-request-id ..................................................................................... 9 2.2.1.2 return-client-request-id ......................................................................... 10 2.2.1.3 request-id ............................................................................................ 10 2.2.1.4 api-version ........................................................................................... 10 2.2.1.5 authorization ........................................................................................ 10 2.2.1.6 accept ................................................................................................. 11

2.2.2 URI Parameters .......................................................................................... 11 2.2.2.1 api-version ........................................................................................... 11

2.2.3 Complex Types ........................................................................................... 11 2.2.3.1 ErrorDetails .......................................................................................... 11

2.3 Directory Service Schema Elements ................................................................... 12 2.3.1 ms-DS-Key-Credential-Link .......................................................................... 12

3 Protocol Details ..................................................................................................... 14 3.1 Key Provisioning Server Details .......................................................................... 14

3.1.1 Abstract Data Model .................................................................................... 14 3.1.2 Timers ...................................................................................................... 14 3.1.3 Initialization ............................................................................................... 14 3.1.4 Higher-Layer Triggered Events ..................................................................... 14 3.1.5 Message Processing Events and Sequencing Rules .......................................... 14

3.1.5.1 Key ..................................................................................................... 14 3.1.5.1.1 POST ............................................................................................. 14

3.1.5.1.1.1 Request Body ............................................................................ 14 3.1.5.1.1.2 Response Body .......................................................................... 15 3.1.5.1.1.3 Processing Details ...................................................................... 15

3.1.6 Timer Events .............................................................................................. 16 3.1.7 Other Local Events ...................................................................................... 17

4 Protocol Examples ................................................................................................. 18 4.1 Provision a Key ................................................................................................ 18

5 Security ................................................................................................................. 19 5.1 Security Considerations for Implementers ........................................................... 19 5.2 Index of Security Parameters ............................................................................ 19

6 Appendix A: Full JSON Schema .............................................................................. 20

7 Appendix B: Product Behavior ............................................................................... 21

8 Change Tracking .................................................................................................... 22

Page 4: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

4 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

9 Index ..................................................................................................................... 23

Page 5: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

5 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

1 Introduction

The Key Provisioning Protocol provides a mechanism for registering a set of cryptographic keys on a user and device pair.

Sections 1.5, 1.8, 1.9, 2, and 3 of this specification are normative. All other sections and examples in this specification are informative.

1.1 Glossary

This document uses the following terms:

access control list (ACL): A list of access control entries (ACEs) that collectively describe the security rules for authorizing access to some resource; for example, an object or set of objects.

Active Directory: A general-purpose network directory service. Active Directory also refers to the Windows implementation of a directory service. Active Directory stores information about

a variety of objects in the network. Importantly, user accounts, computer accounts, groups, and all related credential information used by the Windows implementation of Kerberos are stored in Active Directory. Active Directory is either deployed as Active Directory Domain Services (AD DS) or Active Directory Lightweight Directory Services (AD LDS). [MS-ADTS] describes both forms. For more information, see [MS-AUTHSOD] section 1.1.1.5.2, Lightweight

Directory Access Protocol (LDAP) versions 2 and 3, Kerberos, and DNS.

application programming interface (API): A set of routines used by an application program to direct the performance of procedures used by the computer's operating system. Also called application program interface.

Augmented Backus-Naur Form (ABNF): A modified version of Backus-Naur Form (BNF), commonly used by Internet specifications. ABNF notation balances compactness and simplicity with reasonable representational power. ABNF differs from standard BNF in its definitions and

uses of naming rules, repetition, alternatives, order-independence, and value ranges. For more information, see [RFC5234].

base64 encoding: A binary-to-text encoding scheme whereby an arbitrary sequence of bytes is converted to a sequence of printable ASCII characters, as described in [RFC4648].

directory: The database that stores information about objects such as users, groups, computers, printers, and the directory service that makes this information available to users and

applications.

distinguished name (DN): A name that uniquely identifies an object by using the relative distinguished name (RDN) for the object, and the names of container objects and domains that contain the object. The distinguished name (DN) identifies the object and its location in a tree.

globally unique identifier (GUID): A term used interchangeably with universally unique identifier (UUID) in Microsoft protocol technical documents (TDs). Interchanging the usage of these terms does not imply or require a specific algorithm or mechanism to generate the value.

Specifically, the use of this term does not imply or require that the algorithms described in

[RFC4122] or [C706] must be used for generating the GUID. See also universally unique identifier (UUID).

JavaScript Object Notation (JSON): A text-based, data interchange format that is used to transmit structured data, typically in Asynchronous JavaScript + XML (AJAX) web applications, as described in [RFC7159]. The JSON format is based on the structure of ECMAScript (Jscript, JavaScript) objects.

JSON Web Token (JWT): A type of token that includes a set of claims encoded as a JSON object. For more information, see [IETFDRAFT-JWT].

Page 6: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

6 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

key: In cryptography, a generic term used to refer to cryptographic data that is used to initialize a cryptographic algorithm. Keys are also sometimes referred to as keying material.

object: A set of attributes, each with its associated values. For more information on objects, see [MS-ADTS] section 1 or [MS-DRSR] section 1.

Representational State Transfer (REST): A class of web services that is used to transfer domain-specific data by using HTTP, without additional messaging layers or session tracking, and returns textual data, such as XML.

Transport Layer Security (TLS): A security protocol that supports confidentiality and integrity of messages in client and server applications communicating over open networks. TLS supports server and, optionally, client authentication by using X.509 certificates (as specified in [X509]). TLS is standardized in the IETF TLS working group.

MAY, SHOULD, MUST, SHOULD NOT, MUST NOT: These terms (in all caps) are used as defined in [RFC2119]. All statements of optional behavior use either MAY, SHOULD, or SHOULD NOT.

1.2 References

Links to a document in the Microsoft Open Specifications library point to the correct section in the most recently published version of the referenced document. However, because individual documents in the library are not updated at the same time, the section numbers in the documents may not match. You can confirm the correct section numbering by checking the Errata.

1.2.1 Normative References

We conduct frequent surveys of the normative references to assure their continued availability. If you have any issue with finding a normative reference, please contact [email protected]. We will assist you in finding the relevant information.

[ISO8601] ISO, "Data elements and interchange formats - Information interchange - Representation of dates and times", ISO 8601:2004, December 2004,

http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=40874

Note There is a charge to download the specification.

[MS-ADA2] Microsoft Corporation, "Active Directory Schema Attributes M".

[MS-ADA3] Microsoft Corporation, "Active Directory Schema Attributes N-Z".

[MS-ADSC] Microsoft Corporation, "Active Directory Schema Classes".

[MS-ADTS] Microsoft Corporation, "Active Directory Technical Specification".

[MS-DTYP] Microsoft Corporation, "Windows Data Types".

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997, http://www.rfc-editor.org/rfc/rfc2119.txt

[RFC2616] Fielding, R., Gettys, J., Mogul, J., et al., "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999, http://www.rfc-editor.org/rfc/rfc2616.txt

[RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000, http://www.rfc-editor.org/rfc/rfc2818.txt

[RFC4122] Leach, P., Mealling, M., and Salz, R., "A Universally Unique Identifier (UUID) URN

Namespace", RFC 4122, July 2005, http://www.rfc-editor.org/rfc/rfc4122.txt

Page 7: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

7 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

[RFC4346] Dierks, T., and Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.1", RFC 4346, April 2006, http://www.ietf.org/rfc/rfc4346.txt

[RFC4514] Zeilenga, K., Ed., "Lightweight Directory Access Protocol (LDAP): String Representation of Distinguished Names", RFC 4514, June 2006, http://www.ietf.org/rfc/rfc4514.txt

1.2.2 Informative References

None.

1.3 Overview

The Key Provisioning Protocol provides for registration of cryptographic keys on a user and device pair.

The Key Provisioning Protocol provides a single REST-based endpoint that returns JavaScript Object Notation (JSON)–formatted data in the response message.

This document defines and uses the following terms:

client: The entity that creates and sends the key provisioning request to the key provisioning server using the Key Provisioning Protocol.

key provisioning server: The server that implements the REST Web service that accepts and

responds to key provisioning requests using the Key Provisioning Protocol.

1.4 Relationship to Other Protocols

The following figure illustrates the relationship of this protocol to other protocols.

Figure 1: Protocols related to the Key Provisioning Protocol

1.5 Prerequisites/Preconditions

The Key Provisioning Protocol registers keys with User objects ([MS-ADSC] section 2.268) represented in a directory server. A server implementation of the Key Provisioning Protocol, or key provisioning server, requires a directory server.

This protocol requires that the following state changes be made to Active Directory.

1. Create an instance of the ms-DS-Device-Registration-Service-Container class ([MS-ADSC] section 2.138) in the directory.

Page 8: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

8 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

2. Set the following directory access control list (ACL) entries:

1. Grant the key provisioning server read access to the ms-DS-Device-Registration-Service

object ([MS-ADSC] section 2.137).

2. Grant the key provisioning server read/write access to ms-DS-Device objects ([MS-ADSC]

section 2.135).

3. Grant the key provisioning server read/write access to the ms-DS-Key-Credential-Link attribute ([MS-ADA2] section 2.347) on User objects.

1.6 Applicability Statement

The Key Provisioning Protocol is applicable only for requests for key provisioning.

1.7 Versioning and Capability Negotiation

None.

1.8 Vendor-Extensible Fields

None.

1.9 Standards Assignments

None.

Page 9: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

9 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

2 Messages

2.1 Transport

The Key Provisioning Protocol consists of a single RESTful Web service.

HTTPS [RFC2818] over TCP/IP [RFC2616]

The protocol operates on the following URI endpoint.

Web service Location

Key Provisioning Service https://<server>:<server port>/EnrollmentServer/key

All client messages to the key provisioning server MUST use Hypertext Transfer Protocol over Secure Sockets Layer (HTTPS) and provide server authentication, which MUST use Transport Layer Security (TLS) 1.1 [RFC4346] or greater.

2.2 Common Data Types

2.2.1 HTTP Headers

This protocol accesses the HTTP headers listed in the following table.

Header Description

client-request-id Specifies the request identifier.

return-client-request-id Specifies whether the key provisioning server is to include the given client-request-id in the server response.

request-id Specifies the request identifier generated by the key provisioning server.

api-version Specifies the application programming interface (API) version.

authorization Specifies a JSON Web Token (JWT) used for client authorization.

accept Specifies which media types ([RFC2616] section 3.7) are acceptable for the response.

2.2.1.1 client-request-id

The client-request-id HTTP header is optional and can appear in either the request or the response. This header is used to provide the key provisioning server with a unique request identifier, which is then used by the server to log error messages that were encountered while processing the lookup

request. If present, the value of the client-request-id header MUST be a globally unique identifier (GUID) in standard string representation (see [RFC4122] section 3 for the format).

The format of the client-request-id header, in Augmented Backus-Naur Form (ABNF), is as follows.

String = *(%x20-7E)

Page 10: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

10 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

client-request-id = String

2.2.1.2 return-client-request-id

The return-client-request-id HTTP header is optional. This header is sent in the request and is used by the key provisioning server to determine whether to return the client-specified client-request-id in the server response. If present, the value of the return-client-request-id header MUST be "true".

The format of the return-client-request-id header, in ABNF, is as follows.

return-client-request-id = "true"

2.2.1.3 request-id

The request-id HTTP header is a server-generated GUID in standard string representation (see

[RFC4122] section 3 for the format). The key provisioning server SHOULD include this header in all server responses.

The format of the request-id header, in ABNF, is as follows.

String = *(%x20-7E) request-id = String

2.2.1.4 api-version

The api-version header is an integer that indicates the API version that is expected by the client. Either this header or the api-version query parameter (section 2.2.2.1) MUST be included in all client requests.

Note The api-version header and the api-version query parameter defined in section 2.2.2.1 are mutually exclusive. The client is expected to specify an API version by using either one of these mechanisms, but not both.

The format of the api-version header, in ABNF, is as follows.

String = *(%x20-7E) api-version = String

2.2.1.5 authorization

The authorization HTTP header is required in the request and contains a JSON Web Token (JWT) that the client passes to the key provisioning server. The JWT contains claims that the key provisioning server uses to authorize access to the relevant User object on the directory server.

The format of the authorization header, in ABNF, is as follows.

String = *(%x20-7E) authorization =String

Page 11: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

11 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

2.2.1.6 accept

The accept HTTP header is required in the request and specifies which media types ([RFC2616] section 3.7) are acceptable for the response. "application/json" is the only acceptable media type for the Key

Provisioning Protocol.

The format of the accept header, in ABNF, is as follows.

accept = "application/json"

2.2.2 URI Parameters

The following table summarizes the set of common URI parameters defined by this protocol.

Parameter Description

api-version Specifies the API version.

2.2.2.1 api-version

The api-version parameter is an integer that indicates the API version that is expected by the client. Either this header or the api-version HTTP header (section 2.2.1.4) MUST be included in all client requests.

The format of the api-version parameter, in ABNF, is as follows.

String = *(%x20-7E) api-version = String

2.2.3 Complex Types

The following table summarizes the set of complex type definitions included in this specification.

Complex Type Description

ErrorDetails An object that stores data related to a key provisioning server error.

2.2.3.1 ErrorDetails

This object contains a collection of human-readable details that describe an error encountered by the

key provisioning server. It can be used by the client role of the Key Provisioning Protocol for logging purposes or for providing information to an administrator.

{ "description": "error details", "type": "object", "properties": { "code": { "type": "string", "optional": false }, "message": { "type": "string", "optional": false }, "response": { "type": "string", "optional": false },

Page 12: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

12 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

"target": { "type": "string", "optional": false }, "clientrequestid": { "type": "string", "optional": true }, "time": { "type": "string", "optional": false }, "innererror": { "description": "error details", "type": "object", "optional": true, "properties": { "trace": { "type": "string", "optional": false }, "context": { "type": "string", "optional": false }, } } } }

code: A server-generated string representing a machine readable error.

message: A human-readable string explaining the error.

response: The client action to be taken when this error is received. This value MUST be set to "ERROR_FAIL".

target: A string representing the resource being acted upon.

clientrequestid: A GUID in standard string representation (see [RFC4122] section 3 for the format).

time: The [ISO8601]-formatted time that is assigned by the key provisioning server.

trace: MUST be "null".

context: MUST be "null".

2.3 Directory Service Schema Elements

This protocol makes use of the Directory Service schema classes and attributes that are listed in the

following table.

For the syntax of <Class> or <Class><Attribute> pairs, refer to [MS-ADA2], [MS-ADA3], and [MS-ADSC].

Class Attribute

User ms-DS-Key-Credential-Link, User-Principal-Name

ms-DS-Device ms-DS-Device-ID

ms-DS-Device-Registration-Service-Container

ms-DS-Device-Registration-Service

2.3.1 ms-DS-Key-Credential-Link

The ms-DS-Key-Credential-Link attribute is a multi-valued DN-Binary attribute (see [MS-ADTS] section 3.1.1.2.2.2, the Object(DN-Binary) syntax). Each value is formatted as follows:

B:[keylen]:[key]:[objectDN]

Page 13: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

13 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

Where [keylen] is the length of [key]. [key] is a KEYCREDENTIALLINK_BLOB ([MS-ADTS] section 2.2.20.2). [objectDN] is an [RFC4514]-formatted distinguished name for the directory object that

contains the ms-DS-Key-Credential-Link attribute.

Page 14: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

14 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

3 Protocol Details

3.1 Key Provisioning Server Details

3.1.1 Abstract Data Model

None.

3.1.2 Timers

None.

3.1.3 Initialization

None.

3.1.4 Higher-Layer Triggered Events

None.

3.1.5 Message Processing Events and Sequencing Rules

The following resource is used by the Key Provisioning Protocol.

Resource Description

key An object that represents a key bound to a user and device pair.

3.1.5.1 Key

The following HTTP method is allowed to be performed on this resource:

HTTP Method Description

POST Provisions the supplied key on a User object.

3.1.5.1.1 POST

This method provisions a key on a User object.

The key resource is identified by the following URI:

https://server/EnrollmentServer/key?api-version=1.0 HTTP/1.1

The URI parameters supported by the POST request are the common URI parameters documented in section 2.2.2.

Page 15: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

15 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

3.1.5.1.1.1 Request Body

The request body contains the following JSON-formatted object.

{ "description": "key provisioning request object", "type": "object", "properties": { "kngc": { "type": "string", "optional": false } } }

kngc: Contains the base64-encoded public portion of an asymmetric key.

3.1.5.1.1.2 Response Body

If the key provisioning server successfully creates and provisions a key in the directory, the HTTP 200 status code is returned, along with a server-generated GUID in the request-id header. Additionally,

the response body contains the following JSON-formatted object. See section 3.1.5.1.1.3 for processing details.

{ "description": "key provisioning response object", "type": "object", "properties": { "kid": { "type": "string", "optional": false }, "upn": { "type": "string", "optional": false } } }

kid: Contains a unique key identifier.

upn: Contains the User-Principal-Name ([MS-ADA3] section 2.349) of the User object onto which the

key was written.

3.1.5.1.1.3 Processing Details

The HTTP POST request is processed as follows.

1. The key provisioning server verifies that the following elements are included in the POST request.

1. The api-version parameter MUST be present and contain the value "1.0".

2. The accept HTTP header MUST be present and contain the value "application/json".

3. The kngc property (section 3.1.5.1.1.1) MUST be present and base64-encoded.

If any of these constraints are not met, the server MUST respond to the HTTP POST with the

HTTP status code set to 400 and the body of the response MUST contain an ErrorDetails object populated according to section 2.2.3.1.

2. The key provisioning server verifies that the authorization HTTP header is present and contains a JSON Web Token with the following claims:

Page 16: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

16 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

Claim Value

deviceid The value MUST contain the ms-DS-Device-ID ([MS-ADA2] section 2.295) of an ms-DS-Device object in the Directory.

upn The value MUST contain the User-Principal-Name of a user in the Directory.

amr The value MUST contain either "mfa" or "http://schemas.microsoft.com/claims/multipleauthn".

If any of these constraints are not met, the server MUST respond to the HTTP POST with the HTTP status code set to 401, and the body of the response MUST contain an ErrorDetails object populated according to section 2.2.3.1.

3. The key provisioning server locates the User object in Active Directory where the User-Principal-Name attribute on the User object matches the upn claim in the JWT from step 2. If a User object is NOT found in the directory, the server MUST respond with an HTTP response with the HTTP status code set to 400. The body of the response MUST contain an ErrorDetails

object populated according to section 2.2.3.1.

4. The key provisioning server sends a request to the directory server, which adds an ms-DS-Key-Credential-Link object as an additional value in the ms-DS-Key-Credential-Link attribute on the User object located in step 3. If the directory request cannot be successfully completed, the server MUST respond with an HTTP response with the HTTP status code set to 400. The body of the response MUST contain an ErrorDetails object populated according to section

2.2.3.1.

The KEYCREDENTIALLINK_BLOB MUST be created according to [MS-ADTS] section 2.2.20 and section 2.3.1 in this document. In addition, the following KEYCREDENTIALLINK_ENTRY identifiers ([MS-ADTS] section 2.2.20.5) MUST be present.

KEYCREDENTIALLINK_ENTRY Identifier Value

KeyMaterial The base64-decoded value of the kngc property.

KeyUsage KEY_USAGE_NGC ([MS-ADTS] section 2.2.20.1)

CustomKeyInformation The Version field MUST be set to 1 and the Flags MUST be set to 0x02.

KeySource KEY_SOURCE_AD ([MS-ADTS] section 2.2.20.1)

DeviceId MUST be the value of the deviceid claim in the JWT from step 2, formatted according to [MS-ADTS] section 2.2.20.

KeyApproximateLastLogonTimeStamp MUST be set to a time generated by the key provisioning server, represented in FILETIME format ([MS-DTYP] section 2.3.3).

KeyCreationTime MUST be set to a time generated by the key provisioning server, represented in FILETIME format.

5. The key provisioning server responds to the HTTP POST request with an HTTP response with the HTTP status code set to 200 ("OK") and a server-generated GUID in the request-id

header. The response body MUST contain the UPN of the User object located in step 3 along with a server-generated GUID for the key identifier.

Page 17: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

17 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

3.1.6 Timer Events

None.

3.1.7 Other Local Events

None.

Page 18: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

18 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

4 Protocol Examples

The following section shows an example of the requests and responses that are defined by the Key Provisioning Protocol.

Note Throughout these examples, line breaks were added and irrelevant fields were removed to enhance readability.

4.1 Provision a Key

The following example shows a request to the key provisioning server to provision a key (section 3.1.5.1.1.1) and the response (section 3.1.5.1.1.2).

Request:

POST https://www.contoso.com/EnrollmentServer/key/?api-version=1.0 HTTP/1.1 Accept: application/json Authorization: Bearer eyJEZXZpY2VJRCI6IjNhNWY0NzQzLWQ0NTItNDQ2YS05NWY2LTRkYjFhNTZiOTJjYSIsInVwbiI6InVzZXJAY29udG9zb

y5jb20ifQ==

return-client-request-id: true client-Request-Id: 006dd572-ca07-42ae-8472-01a00b045bb8 { "kngc":"VGhpc0lzQW5FeGFtcGxlQXN5bW1ldHJpY0tleQ==" }

Response:

HTTP/1.1 200 OK Content-Type: application/json

client-request-id: 006dd572-ca07-42ae-8472-01a00b045bb8 request-id: 650206f2-9a02-447d-9347-0cb7b4fee827 { "kid":"0ce67455-8ea1-4523-be5f-bfd09190fad6", "upn":"[email protected]" }

Page 19: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

19 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

5 Security

5.1 Security Considerations for Implementers

The Key Provisioning Protocol uses HTTPS as a transport. Using Secure Sockets Layer (SSL) server

certificate verification ensures that the client is communicating with the real key provisioning server and closes any possible man-in-the-middle attacks.

The input message uses an JSON Web Token for both authentication and authorization. The key provisioning server must validate that the security token is signed by a trusted identity provider, is within the token validity period, and that the target audience of the token is the server.

5.2 Index of Security Parameters

Security Parameter Section

kngc 3.1.5.1.1.1

Authorization protocol 3.1.5.1.1.3

Page 20: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

20 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

6 Appendix A: Full JSON Schema

{ "description": "error details", "type": "object", "properties": { "code": { "type": "string", "optional": false }, "message": { "type": "string", "optional": false }, "response": { "type": "string", "optional": false }, "target": { "type": "string", "optional": false }, "clientrequestid": { "type": "string", "optional": true }, "time": { "type": "string", "optional": false }, "innererror": { "description": "error details", "type": "object", "optional": true, "properties": { "trace": { "type": "string", "optional": false }, "context": { "type": "string", "optional": false }, } } } { "description": "key provisioning request object", "type": "object", "properties": { "kngc": { "type": "string", "optional": false } } }

{ "description": "key provisioning response object", "type": "object", "properties": { "kid": { "type": "string", "optional": false }, "upn": { "type": "string", "optional": false } } }

Page 21: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

21 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

7 Appendix B: Product Behavior

The information in this specification is applicable to the following Microsoft products or supplemental software. References to product versions include released service packs.

The terms "earlier" and "later", when used with a product version, refer to either all preceding versions or all subsequent versions, respectively. The term "through" refers to the inclusive range of versions. Applicable Microsoft products are listed chronologically in this section.

The following tables show the relationships between Microsoft product versions or supplemental software and the roles they perform.

Windows Client Client role Key Provisioning Server role

Windows 10 v1607 operating system

Yes No

Windows Server Client role Key Provisioning Server role

Windows Server 2016 operating system

Yes Yes

Exceptions, if any, are noted below. If a service pack or Quick Fix Engineering (QFE) number appears with the product version, behavior changed in that service pack or QFE. The new behavior also applies to subsequent service packs of the product unless otherwise specified. If a product edition appears with the product version, behavior is different in that product edition.

Unless otherwise specified, any statement of optional behavior in this specification that is prescribed using the terms "SHOULD" or "SHOULD NOT" implies product behavior in accordance with the

SHOULD or SHOULD NOT prescription. Unless otherwise specified, the term "MAY" implies that the product does not follow the prescription.

Page 22: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

22 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

8 Change Tracking

This section identifies changes that were made to this document since the last release. Changes are classified as Major, Minor, or None.

The revision class Major means that the technical content in the document was significantly revised. Major changes affect protocol interoperability or implementation. Examples of major changes are:

A document revision that incorporates changes to interoperability requirements.

A document revision that captures changes to protocol functionality.

The revision class Minor means that the meaning of the technical content was clarified. Minor changes do not affect protocol interoperability or implementation. Examples of minor changes are updates to clarify ambiguity at the sentence, paragraph, or table level.

The revision class None means that no new technical changes were introduced. Minor editorial and formatting changes may have been made, but the relevant technical content is identical to the last

released version.

The changes made to this document are listed in the following table. For more information, please contact [email protected].

Section Description Revision class

1.2.1 Normative References

Replaced the reference [MS-DRSR] with the reference [MS-DTYP]. Minor

3.1.5.1.1.3

Processing Details

Replaced DSTIME format with FILETIME format in the KeyApproximateLastLogonTimeStamp and KeyCreationTime table descriptions.

Major

Page 23: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

23 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

9 Index

A Abstract data model 14 accept 11 api-version (section 2.2.1.4 10, section 2.2.2.1 11) Applicability 8 authorization 10

C Capability negotiation 8 Change tracking 22 client-request-id 9 Complex types - ErrorDetails 11

D Data model – abstract 14 Directory service schema elements 12 Directory service schema elements - ms-DS-Key-

Credential-Link 12

E Elements – directory service schema 12 ErrorDetails - fields 11 Examples overview 18 Provision a Key example 18

F Fields - vendor-extensible 8 Full JSON schema 20

G Glossary 5

H Higher-layer triggered events 14 HTTP headers 9 accept 11 api-version 10 authorization 10 client-request-id 9 request-id 10 return-client-request-id 10

I Implementer - security considerations 19 Index of security parameters 19 Informative references 7 Initialization 14 Introduction 5

J

JSON schema 20

K Key provisioning server Abstract data model 14 Higher-layer triggered events 14 Initialization 14 Message processing events and sequencing rules

14 Other local events 17 Timer events 16 Timers 14

M Message processing HTTP methods 14

key 14 Message processing events 14 Messages complex types 11 HTTP headers 9 transport 9 URI parameters 11 ms-DS-Key-Credential-Link - multi-valued DN-Binary

attribute 12

N Normative references 6

O Other local events 17 Overview (synopsis) 7

P Parameters - security index 19 Preconditions 7 Prerequisites 7 Product behavior 21 Protocol examples Provision a Key 18

Protocol relationships 7 Provision a Key example 18

R References informative 7 normative 6 Relationship to other protocols 7 request-id 10 return-client-request-id 10

S Schema elements – directory service 12 Security

Page 24: [MS-KPP]: Key Provisioning Protocol... · 2017. 6. 8. · [MS-KPP]: Key Provisioning Protocol ... TLS is standardized in the IETF TLS working group. MAY, SHOULD, MUST, SHOULD NOT,

24 / 24

[MS-KPP] - v20170601 Key Provisioning Protocol Copyright © 2017 Microsoft Corporation Release: June 1, 2017

implementer considerations 19 parameter index 19 Sequencing rules 14 Standards assignments 8

T Timer events 16 Timers 14 Tracking changes 22 Transport 9 Directory service schema elements 12

U URI parameters - api-version 11

V Vendor-extensible fields 8 Versioning 8