Skip to content

Commit 8812fef

Browse files
committed
image_with_key_bytes
1 parent ca66f99 commit 8812fef

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

prober/probes/main.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import argparse
2+
import base64
23
import logging
34
import sys
45

@@ -37,10 +38,13 @@ def main():
3738
# Parse arguments
3839
args = parser.parse_args()
3940

40-
private_key = (
41+
private_key_str = (
4142
open(args.private_key_file).read().strip().replace("_", "/").replace("-", "+")
4243
)
4344

45+
# Decode the private key from Base64
46+
private_key_bytes = base64.b64decode(private_key_str)
47+
4448
connection_params = {
4549
"host": args.host,
4650
"port": args.port,
@@ -51,7 +55,7 @@ def main():
5155
"database": args.database,
5256
"user": args.user,
5357
"authenticator": args.authenticator,
54-
"private_key": private_key,
58+
"private_key": private_key_bytes,
5559
}
5660

5761
if args.scope not in PROBES_FUNCTIONS:

0 commit comments

Comments
 (0)