Skip to content

Commit e74556e

Browse files
Merge pull request #34 from ibm-hyper-protect/sbs-code-changes
Updated code and docs for sbs-gen1 and sbs-gen2
2 parents f27701b + 7239617 commit e74556e

File tree

8 files changed

+1390
-752
lines changed

8 files changed

+1390
-752
lines changed

README.md

Lines changed: 5 additions & 664 deletions
Large diffs are not rendered by default.

SBS-HPVScloud.md

Lines changed: 667 additions & 0 deletions
Large diffs are not rendered by default.

SBS-VPC.md

Lines changed: 561 additions & 0 deletions
Large diffs are not rendered by default.

build.py

Lines changed: 143 additions & 86 deletions
Large diffs are not rendered by default.

client_certificate.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
# US Government Users Restricted Rights - Use, duplication or
99
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp
1010
#
11+
1112
import sys, os, logging, shutil
1213
from OpenSSL import crypto
1314
from cicd.openssl import gen_ca, gen_csr, sign_csr, sign_server_csr, getSANValue
@@ -25,8 +26,17 @@ def __init__(self, numeric_level, params):
2526
self.params['default_client_crt_key'] = True
2627

2728
# store all cert paths
29+
global is_client_using_own_keys
30+
is_client_using_own_keys= False
2831
self.client_crt_key = './' + self.params['client_crt_key']
29-
self.cert_dir = self.client_crt_key + '.d'
32+
if not 'certpath' in self.params:
33+
self.cert_dir = self.client_crt_key + '.d'
34+
else:
35+
split_certpath = str.split(self.params['certpath'], '/')
36+
certpath_dir="/".join(split_certpath[:-1])
37+
self.params['certpath']=certpath_dir
38+
self.cert_dir='./' + self.params['certpath']
39+
is_client_using_own_keys=True
3040

3141
# set up default file paths if not specificed through a config json file or command-line parameters
3242
if not 'capath' in self.params:

filters.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,6 @@ def filter(self, record):
103103

104104
def redact(self, msg):
105105
for key in self._stringstobefiltered:
106-
msg = re.sub(re.escape(key), "*******", msg)
106+
if len(key) != 0:
107+
msg = re.sub(re.escape(key), "*******", msg)
107108
return msg

images/sbs_vpc.drawio

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

images/sbs_vpc.png

76.7 KB
Loading

0 commit comments

Comments
 (0)