@@ -30,7 +30,7 @@ To configure Logpush for AI Gateway, follow these steps:
3030You need to generate a key pair to encrypt and decrypt the logs. This script
3131will output your RSA privateKey and publicKey. Keep the private key secure, as
3232it will be used to decrypt the logs. Below is a sample script to generate the
33- keys using Node.js.
33+ keys using Node.js. and OpenSSL.
3434
3535<Tabs syncKey = " JSPlusSSL" > <TabItem label = " Javascript" >
3636
@@ -75,21 +75,6 @@ node {file name}
7575 openssl rsa -pubout -in private_key.pem -out public_key.pem
7676 ```
7777
78- 3 . View Private and Public Keys:
79- You can verify the contents of the generated keys by using the following commands:
80-
81- - To view the private key:
82-
83- ``` bash
84- cat private_key.pem
85- ```
86-
87- - To view the public key:
88-
89- ``` bash
90- cat public_key.pem
91- ```
92-
9378</TabItem > </Tabs >
9479
9580## 2. Upload public key to gateway settings
@@ -106,7 +91,9 @@ After configuring Logpush, logs will be sent encrypted using the public key you
10691
10792## 5. Decrypt logs
10893
109- To decrypt the encrypted log bodies and metadata from AI Gateway, you can use the following Node.js script:
94+ To decrypt the encrypted log bodies and metadata from AI Gateway, you can use the following Node.js script or OpenSSL:
95+
96+ <Tabs syncKey = " JSPlusSSL" > <TabItem label = " Javascript" >
11097
11198``` js title="JavaScript"
11299const privateKey = ` -----BEGIN RSA PRIVATE KEY-----
@@ -161,3 +148,21 @@ node {file name}
161148
162149The script reads the encrypted log file ` (my_log.log.gz) ` , decrypts the metadata, request body, and response body, and prints the decrypted data.
163150Ensure you replace the ` privateKey ` variable with your actual private RSA key that you generated in step 1.
151+
152+ </TabItem > <TabItem label = " OpenSSL" >
153+
154+ You can verify the contents of the generated keys by using the following commands:
155+
156+ - To view the private key:
157+
158+ ``` bash
159+ cat private_key.pem
160+ ```
161+
162+ - To view the public key:
163+
164+ ``` bash
165+ cat public_key.pem
166+ ```
167+
168+ </TabItem > </Tabs >
0 commit comments