Method: vdc.provisionMobileSecurityObjects

用于配置凭据的端点。

HTTP 请求

POST https://example.issuer.com/api/v1/vdc/provisionMobileSecurityObjects

请求正文

请求正文中包含结构如下的数据:

JSON 表示法
{
  "requestMetadata": {
    object (RequestMetadata)
  },
  "deviceReferenceId": string,
  "credentialId": string,
  "authKeys": [
    {
      object (AuthKey)
    }
  ],
  "proofOfProvisioning": {
    object (ProofOfProvisioning)
  },
  "deviceEncryptionKey": {
    object (DeviceEncryptionKey)
  },
  "credentialVersionId": string
}
字段
requestMetadata

object (RequestMetadata)

有关请求的元数据,所有请求中都需要提供。

deviceReferenceId

string

与设备对应的 ID 以及与设备关联的身份密钥。此 ID 不是设备 ID,也就是说,如果用户在同一设备上拥有两个不同的凭据,则此 ID 会有所不同。

此 ID 会在所有请求中提供,可用于关联请求。

credentialId

string

表示已向设备配置的特定凭据的不透明标识符。

示例:UUID

authKeys[]

object (AuthKey)

需要认证的 x509 证书列表,以便这些证书可用作移动安全对象。每张证书都由设备凭据密钥签名。

proofOfProvisioning

object (ProofOfProvisioning)

设备中的一个对象,用于证明凭据已正确配置。如需详细了解此结构的更多信息,请参阅对象定义。

注意:仅在凭据配置完毕后首次配置移动安全对象时,系统才会提供此对象。如果此方法用于 MSO 刷新,则不会提供此信息。

deviceEncryptionKey

object (DeviceEncryptionKey)

一个包含设备的临时加密密钥和关联元数据的对象。此密钥用于将值加密回设备。此对象可能不会在初始配置期间于沙盒环境中提供,表明发卡机构应返回纯文本数据。此值应始终在生产环境中设置。

credentialVersionId

string

设备当前拥有的凭据版本 ID。不应使用此方法为旧版凭据配置移动安全对象。如果此值与签发者记录中预配的最新版本不匹配,则应改为返回包含 InvalidState 的 ErrorResponse。

响应正文

包含移动安全对象配置结果的响应。

如果成功,响应正文将包含结构如下的数据:

JSON 表示法
{
  "responseMetadata": {
    object (ResponseMetadata)
  },
  "mobileSecurityObjects": [
    {
      object (MobileSecurityObject)
    }
  ]
}
字段
responseMetadata

object (ResponseMetadata)

有关响应的元数据,所有响应中都需要包含此元数据。

mobileSecurityObjects[]

object (MobileSecurityObject)

已准备就绪的 MobileSecurityObject 的列表。如果目前没有 MobileSecurityObject 处于就绪状态,此列表可能为空。

AuthKey

由设备凭据密钥签名的 x509 证书,将由颁发者进行认证。

这些密钥由钱包从 Android Identity Credential API 中检索,并在 https://developer.android.com/reference/android/security/identity/IdentityCredential#getAuthKeysNeedingCertification() 中进一步说明

JSON 表示法
{

  // Union field presencetype can be only one of the following:
  "encryptedData": {
    object (EncryptedData)
  },
  "unencryptedValue": string
  // End of list of possible types for union field presencetype.
}
字段
联合字段 presencetype。一个 oneof,用于指示 AuthKey 的呈现方式。presencetype 只能是下列其中一项:
encryptedData

object (EncryptedData)

加密值以及解密该值所需的加密元数据。

unencryptedValue

string

AuthKey 的 base64 编码值。

ProofOfProvisioning

一种由设备凭据密钥签名的 COSE_Sign1 结构,用于证明相关凭据已正确配置到设备上的安全存储空间。

此结构由 Android Identity Credential API 定义,如需了解详情,请参阅 https://developer.android.com/reference/android/security/identity/WritableIdentityCredential#personalize(android.security.identity.PersonalizationData)

JSON 表示法
{

  // Union field presencetype can be only one of the following:
  "encryptedData": {
    object (EncryptedData)
  },
  "unencryptedValue": string
  // End of list of possible types for union field presencetype.
}
字段
联合字段 presencetype。一个 oneof,用于指示如何呈现 ProofOfProvisioning。presencetype 只能是下列其中一项:
encryptedData

object (EncryptedData)

加密值以及解密该值所需的加密元数据。

unencryptedValue

string

ProofOfProvisioning 的 base64 编码值。

MobileSecurityObject

一种对象,用于封装根据凭据中包含的每个数据元素计算出的摘要。这表示为静态身份验证数据,这是 Android Identity Credential 库所需的格式。如需详细了解静态身份验证数据构建,请参阅此处

JSON 表示法
{
  "expirationTimeMillis": string,

  // Union field presencetype can be only one of the following:
  "encryptedData": {
    object (EncryptedData)
  },
  "unencryptedValue": string
  // End of list of possible types for union field presencetype.
}
字段
expirationTimeMillis

string (int64 format)

表示移动安全对象过期的时间戳。时间戳以自 Unix 纪元以来经过的毫秒数表示。

联合字段 presencetype。一个 oneof,用于指示凭据的呈现方式。presencetype 只能是下列其中一项:
encryptedData

object (EncryptedData)

加密值以及解密该值所需的加密元数据。

unencryptedValue

string

凭据的 base64 编码值。