PublicKeyCertificate

Represents the public key certificate. On this entity we store a public certificate or a JSON web key, which is used to validate the customer-provided JWT.

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

Important

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

PublicKeyCertificate components have the suffix .PublicKeyCertificate and are stored in the PublicKeyCertificate folder.

Version 

Introduced in API version 62.0.

Special Access Rules 

There are no additional access requirements that are specific to this type.

Fields 

description 

  • Type: string
  • Required: No
  • Description: A description of the public key certificate.

isActive 

  • Type: boolean
  • Required: No
  • Description: Indicates whether the public key certificate is active (true) or inactive (false). The default value is false.

jsonWebKey 

  • Type: string
  • Required: No
  • Description: Represents a public cryptographic key that can be used to verify the validity of a token.

masterLabel 

  • Type: string
  • Required: Yes
  • Description: Required. The label for the public key certificate.

Declarative Metadata Sample Definition 

The following is an example of a PublicKeyCertificate component.

1<?xml version="1.0" encoding="UTF-8"?>
2<PublicKeyCertificate xmlns="http://soap.sforce.com/2006/04/metadata">
3    <masterLabel>pck1</masterLabel>
4    <isActive>true</isActive>
5    <description>This is my description for a test PublicKeyCertificate</description>
6    <jsonWebKey>
7{
8  "kid":"123456",
9  "alg":"RS256",
10  "use":"sig",
11  "kty":"RSA",
12  "x5c":["<Your public certificate>"],
13  "y":"y",
14  "n":"<Base64-encoded modulus>",
15  "e":"<Base64-encoded public exponent>",
16  "crv":"crv",
17  "d":"d",
18  "k":"k"
19}
20    </jsonWebKey>
21</PublicKeyCertificate>

The following is an example package.xml that references the previous definition.

1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3  ~ Copyright 2024 salesforce.com, inc.
4  ~ All Rights Reserved
5  ~ Company Confidential
6  -->
7
8<Package xmlns="http://soap.sforce.com/2006/04/metadata">
9    <types>
10        <members>*</members>
11        <name>PublicKeyCertificate</name>
12    </types>
13    <version>62.0</version>
14</Package>

Wildcard Support in the Manifest File 

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.