generateJWKS utility
The generateJWKS utility generates a JSON Web Key in JSON Web Key Set
(JWKS) format. This JWKS can be configured for the Transaction server to sign JSON Web
Tokens (JWT) for bearer authentication.
Usage
The generateJWKS.sh utility script is available on both HCL Commerce production and HCL Commerce Developer environments with the same parameter usage.
generateJWKS.sh kID
generateJWKS.bat kID
Where:
- kID
- The key ID of the JWKS. For example,
hcl-com-auth-key
.
Example
- Within a production environment:From the utilities_root/bin directory, run the utility in a command prompt:
- generateJWKS.sh k1
- Within a HCL Commerce Developer environment:From the utilities_root\bin directory, run the utility in a command prompt:
- generateJWKS.bat k1
The command output will generate an output similar to the following:
=== Generated JWKS ===
Json format:
{"keys":[{"kty":"RSA","kid":"k1","n":"o6wWq22Ltyq37jv_C4IptgOehpUI4ihTqaqTAq1BW7OSLH7ZgVugbiA4548XzSUzb_xCoboUoy5Lx3ZFTxYGGtQM5oI3dhtLdc3oLlUmI9ZHEBpo_MTLBM7qLWuTol3ulSAebFYmMM0BEojA0SGWiT1nBoM5MvqusxfwSDgqMykkIn0829fS9lM14XQk9fTvgizSd2hdadGVAg_3TnT3yl67_ReCMuB9yT_NfS-qSm7Qr8T4Qt3LVNcAO6bqn_Xp-mcpIFJQvXk_5i8EGOB56WyDeHnlAyNIrChUqYM64Vyh6NGDSDslVnfgYeFFY8D9Oct5O_9HjhU3dIt6HBgV9w","e":"AQAB","d":"m-kJK0HN7qy9yy3RtUfHrf_imbcMYEsj7yJyqgEaml0DaGlpjiUXPPBq5IHVnXDLf-igHGki0ZL_UsEiIsULCbFnnIj8hgBYMJ71hnVMQKUUyo0t52MbNbhZMO0iFHBAHkQbVv31oVUXqW0lp9HEEXWxV23XJe3QTwAFvvXplRMW9_E7sfx-Zszfa8zYM9rr40GdUXkFx5JSYi258bnmIkV8EbsZWX1fFzoXzH1cRly6nd4Kcjo-jaBHiv0QMIBqvxOvdKETjHlkRU7RjLiX00OGrbyLWHsDAJVMZILPazrdd3t360_khCQIQnulEm4a_2R0bL8UlV0yRwRlXQ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BZVlJEMi1CanVNTXNFIiwicSI6InJGT1pWSlUxTkl3cEl2c0hoSkh0Q3hwWlM2S0pxbkE1ZXduek9OMUh2OTZYQlc3YVUtMmk2SWwzREx6UGd6TnZHZ1lrUVFGYzI1ZzlSYW56eGp5YnJTZ1h5ckRzRDd1anhDcl81ckZkM1FGN2llNWVkSjl0NWE2SHhUa3N2THh1SlFhV0xucGFSS3ZHT25xY21HZm5LNUFJMkFLak1ZTnhzUVUyOGRLcFRyYyIsImRwIjoiUWFRdzY2eEdFdTVFUGlPT0VsaVYyMkJBUVQtQVdCMld0WXAyMzBHNi1qZ1A0bFZCMTNWbkdEZncybGVWQXVaMW05Rms4d2JOVmc0RWw5dk5sQ2RvUXduenBFdXpSZVZoY2tON0tyb1lsVEdYeWZnVFJjQlhWSWk0eDRZclNTYzNBZzVkTDhyWEJKUVkweVlkVTRwNUYwWV9UVm9mS1dpS00wTXI4d2pPZjhFIiwiZHEiOiJYcHp2bkY3bmZWaE81YVBKdHVHZnNlN2ZoQVZUYkQ1OWNLNF8yY0swT0FYd0NNMmFGV1p0Z1Jxb1FGZ1Izc2tJZ05OS2FGNWxLelBrd0REVlpNdTE5VllENmdkRk5FWWpYZnIxMFNVa2tjalVtU0JFdi1jZ29YQTNudk1MT3Z5QnhOWmU4bG0tNGVFbHpzbXUzSVpfaDQxbkxhSVZFNFJGa1psNVYwQUFNUFUiLCJxaSI6IlM3eGVoMEFyY1ZYNmFBa1MxdFBzT1ZBNFVGelJISlhRcDNDQ0xCUVQzbzNiVVFvT1E0dGpEZjZvQV96VnQtc1U4TXF4RUxBdzNobUFmRkR6UENZMlFmTGFGNkF6amRqX3NVS2k5ejhla2lndHR6U3M5YVlGUm5UYkJuWXNKVXd3TUg4TkNZajM0c1RYOVU2N1V1Zk56Z2ZIcmhLMUpRakFJbDJTZjBicmlKUSJ9XX0=
The base64 string with {base64} prefix
can be used to set the JWKS environment
variable when deploying the Transaction server.