Certificate Conditions

A certificate for the OAuth 2.0 client credentials flow must contain two parts:.

The certificate must meet the following requirements:

The following examples show how to create a valid certificate using OpenSSL:

ES256

          openssl req -new -x509 -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -pkeyopt ec_param_enc:named_curve -nodes -days 365 -out public.pem -keyout private.pem 

        

ES512

          openssl req -new -x509 -newkey ec -pkeyopt ec_paramgen_curve:secp521r1 -pkeyopt ec_param_enc:named_curve -nodes -days 365 -out public.pem -keyout private.pem 

        

RSA – PSS

Note:

When you change the scheme to RSA – PSS, you must also change the algorithm used for singing to PS256.

The -days parameter is optional.

          openssl req -new -x509 -newkey rsa:4096 -keyout private.pem -sigopt rsa_padding_mode:pss -sha256 -sigopt rsa_pss_saltlen:64 -out public.pem -nodes -days 365 

        
Important:

Treat the certificate as you would any other credentials. Never share the certificate with unauthorized individuals, or outside your company.

Related Topics

General Notices