Skip to content

Commit c124a4a

Browse files
bksagarSagar BK
and
Sagar BK
authored
fix: Removal of ICN Validation for license check
* Removal of the ICN support and fix on the security issue * Upgrading the CIS profile version --------- Co-authored-by: Sagar BK <Sagar.BK1@ibm.com>
1 parent d151c57 commit c124a4a

39 files changed

+44
-322
lines changed

.releaserc

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}],
1111
["@semantic-release/exec", {
1212
"successCmd": "echo \"SEMVER_VERSION=${nextRelease.version}\" >> $GITHUB_ENV",
13-
"publishCmd": "./ci/trigger-catalog-onboarding-pipeline.sh --version=${nextRelease.version}"
13+
"publishCmd": "./ci/trigger-catalog-onboarding-pipeline.sh --version=v${nextRelease.version}"
1414
}]
1515
]
1616
}

.tekton/lsf/lsf-pr-pipeline/listener-git-pr-status.yaml

-5
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ spec:
7373
- name: solution
7474
description: Provide the value for the solution that is needed for the support of lsf and HPC.
7575
default: "lsf"
76-
- name: ibm_customer_number
77-
description: Comma-separated list of the IBM Customer Number(s) (ICN) that is used for the Bring Your Own License (BYOL) entitlement check. For more information on how to find your ICN, see [What is my IBM Customer Number (ICN)?](https://www.ibm.com/support/pages/what-my-ibm-customer-number-icn)..
78-
default: ""
7976
resourcetemplates:
8077
- apiVersion: v1
8178
kind: PersistentVolumeClaim
@@ -142,8 +139,6 @@ spec:
142139
value: $(params.git_user_email)
143140
- name: solution
144141
value: $(params.solution)
145-
- name: ibm_customer_number
146-
value: $(params.ibm_customer_number)
147142
workspaces:
148143
- name: pipeline-ws
149144
persistentVolumeClaim:

.tekton/lsf/lsf-pr-pipeline/lsf-pipeline-git-pr-status.yaml

-5
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@ spec:
7878
- name: solution
7979
description: Provide the value for the solution that is needed for the support of lsf and HPC.
8080
default: "lsf"
81-
- name: ibm_customer_number
82-
description: Comma-separated list of the IBM Customer Number(s) (ICN) that is used for the Bring Your Own License (BYOL) entitlement check. For more information on how to find your ICN, see [What is my IBM Customer Number (ICN)?](https://www.ibm.com/support/pages/what-my-ibm-customer-number-icn)..
83-
default: ""
8481
workspaces:
8582
- name: pipeline-ws
8683
tasks:
@@ -223,8 +220,6 @@ spec:
223220
value: $(params.git_user_email)
224221
- name: solution
225222
value: $(params.solution)
226-
- name: ibm_customer_number
227-
value: $(params.ibm_customer_number)
228223
# - name: wes-lsf-da-ubuntu-pr
229224
# runAfter: [git-clone, pre-requisites-install, ssh-key-creation]
230225
# taskRef:

.tekton/lsf/lsf-regression-pipeline/listener-git-trigger.yaml

-9
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ spec:
8080
- name: solution
8181
description: Provide the value for the solution that is needed for the support of lsf and HPC.
8282
default: "lsf"
83-
- name: ibm_customer_number
84-
description: Comma-separated list of the IBM Customer Number(s) (ICN) that is used for the Bring Your Own License (BYOL) entitlement check. For more information on how to find your ICN, see [What is my IBM Customer Number (ICN)?](https://www.ibm.com/support/pages/what-my-ibm-customer-number-icn)..
85-
default: ""
8683
- name: pac_ha_exist_certificate
8784
description: PAC HA Existing Certificate
8885
default: ""
@@ -142,8 +139,6 @@ spec:
142139
value: $(params.cos_api_key)
143140
- name: solution
144141
value: $(params.solution)
145-
- name: ibm_customer_number
146-
value: $(params.ibm_customer_number)
147142
- name: hpc_custom_reports_repo
148143
value: $(params.hpc_custom_reports_repo)
149144
- name: hpc_custom_reports_branch
@@ -199,8 +194,6 @@ spec:
199194
value: $(params.git_user_email)
200195
- name: solution
201196
value: $(params.solution)
202-
- name: ibm_customer_number
203-
value: $(params.ibm_customer_number)
204197
- name: pac_ha_exist_certificate
205198
value: $(params.pac_ha_exist_certificate)
206199
---
@@ -266,8 +259,6 @@ spec:
266259
value: $(event.ref)
267260
- name: solution
268261
value: $(event.ref)
269-
- name: ibm_customer_number
270-
value: $(event.ref)
271262
- name: pac_ha_exist_certificate
272263
value: $(event.ref)
273264
---

.tekton/lsf/lsf-regression-pipeline/lsf-pipeline-git-trigger.yaml

-15
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ spec:
7171
- name: solution
7272
description: Provide the value for the solution that is needed for the support of lsf and HPC.
7373
default: "lsf"
74-
- name: ibm_customer_number
75-
description: Comma-separated list of the IBM Customer Number(s) (ICN) that is used for the Bring Your Own License (BYOL) entitlement check. For more information on how to find your ICN, see [What is my IBM Customer Number (ICN)?](https://www.ibm.com/support/pages/what-my-ibm-customer-number-icn)..
76-
default: ""
7774
- name: pac_ha_exist_certificate
7875
description: PAC HA Existing Certificate
7976
default: ""
@@ -177,8 +174,6 @@ spec:
177174
value: $(params.git_user_email)
178175
- name: solution
179176
value: $(params.solution)
180-
- name: ibm_customer_number
181-
value: $(params.ibm_customer_number)
182177
- name: wes-lsf-da-rhel-2
183178
runAfter: [git-clone, pre-requisites-install, ssh-key-creation]
184179
taskRef:
@@ -225,8 +220,6 @@ spec:
225220
value: $(params.git_user_email)
226221
- name: solution
227222
value: $(params.solution)
228-
- name: ibm_customer_number
229-
value: $(params.ibm_customer_number)
230223
- name: wes-lsf-da-rhel-3
231224
runAfter: [git-clone, pre-requisites-install, ssh-key-creation]
232225
taskRef:
@@ -273,8 +266,6 @@ spec:
273266
value: $(params.git_user_email)
274267
- name: solution
275268
value: $(params.solution)
276-
- name: ibm_customer_number
277-
value: $(params.ibm_customer_number)
278269
- name: wes-lsf-da-rhel-4
279270
runAfter: [git-clone, pre-requisites-install, ssh-key-creation]
280271
taskRef:
@@ -321,8 +312,6 @@ spec:
321312
value: $(params.git_user_email)
322313
- name: solution
323314
value: $(params.solution)
324-
- name: ibm_customer_number
325-
value: $(params.ibm_customer_number)
326315
- name: pac_ha_exist_certificate
327316
value: $(params.pac_ha_exist_certificate)
328317
# - name: wes-lsf-da-ubuntu
@@ -415,8 +404,6 @@ spec:
415404
value: $(params.git_user_email)
416405
- name: solution
417406
value: $(params.solution)
418-
- name: ibm_customer_number
419-
value: $(params.ibm_customer_number)
420407
- name: wes-lsf-da-negative
421408
runAfter: [git-clone, pre-requisites-install, ssh-key-creation]
422409
taskRef:
@@ -461,8 +448,6 @@ spec:
461448
value: $(params.git_user_name)
462449
- name: git_user_email
463450
value: $(params.git_user_email)
464-
- name: ibm_customer_number
465-
value: $(params.ibm_customer_number)
466451
- name: ssh-key-deletion
467452
runAfter:
468453
[

.tekton/lsf/lsf_task/lsf-task-infra-rhel-1.yaml

-5
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ spec:
7171
- name: solution
7272
description: Provide the value for the solution that is needed for the support of lsf and HPC.
7373
default: "lsf"
74-
- name: ibm_customer_number
75-
description: Comma-separated list of the IBM Customer Number(s) (ICN) that is used for the Bring Your Own License (BYOL) entitlement check. For more information on how to find your ICN, see [What is my IBM Customer Number (ICN)?](https://www.ibm.com/support/pages/what-my-ibm-customer-number-icn)..
76-
default: ""
7774
workspaces:
7875
- name: workspace
7976
mountPath: /artifacts
@@ -121,8 +118,6 @@ spec:
121118
value: $(params.git_access_token)
122119
- name: solution
123120
value: $(params.solution)
124-
- name: ibm_customer_number
125-
value: $(params.ibm_customer_number)
126121
- name: management_image_name
127122
value: $(params.management_image_name)
128123
steps:

.tekton/lsf/lsf_task/lsf-task-infra-rhel-2.yaml

-5
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ spec:
7171
- name: solution
7272
description: Provide the value for the solution that is needed for the support of lsf and HPC.
7373
default: "lsf"
74-
- name: ibm_customer_number
75-
description: Comma-separated list of the IBM Customer Number(s) (ICN) that is used for the Bring Your Own License (BYOL) entitlement check. For more information on how to find your ICN, see [What is my IBM Customer Number (ICN)?](https://www.ibm.com/support/pages/what-my-ibm-customer-number-icn)..
76-
default: ""
7774
workspaces:
7875
- name: workspace
7976
mountPath: /artifacts
@@ -121,8 +118,6 @@ spec:
121118
value: $(params.git_access_token)
122119
- name: solution
123120
value: $(params.solution)
124-
- name: ibm_customer_number
125-
value: $(params.ibm_customer_number)
126121
- name: management_image_name
127122
value: $(params.management_image_name)
128123
steps:

.tekton/lsf/lsf_task/lsf-task-infra-rhel-3.yaml

-5
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ spec:
7171
- name: solution
7272
description: Provide the value for the solution that is needed for the support of lsf and HPC.
7373
default: "lsf"
74-
- name: ibm_customer_number
75-
description: Comma-separated list of the IBM Customer Number(s) (ICN) that is used for the Bring Your Own License (BYOL) entitlement check. For more information on how to find your ICN, see [What is my IBM Customer Number (ICN)?](https://www.ibm.com/support/pages/what-my-ibm-customer-number-icn)..
76-
default: ""
7774
workspaces:
7875
- name: workspace
7976
mountPath: /artifacts
@@ -121,8 +118,6 @@ spec:
121118
value: $(params.git_access_token)
122119
- name: solution
123120
value: $(params.solution)
124-
- name: ibm_customer_number
125-
value: $(params.ibm_customer_number)
126121
- name: management_image_name
127122
value: $(params.management_image_name)
128123
steps:

.tekton/lsf/lsf_task/lsf-task-infra-rhel-4.yaml

-5
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ spec:
7171
- name: solution
7272
description: Provide the value for the solution that is needed for the support of lsf and HPC.
7373
default: "lsf"
74-
- name: ibm_customer_number
75-
description: Comma-separated list of the IBM Customer Number(s) (ICN) that is used for the Bring Your Own License (BYOL) entitlement check. For more information on how to find your ICN, see [What is my IBM Customer Number (ICN)?](https://www.ibm.com/support/pages/what-my-ibm-customer-number-icn)..
76-
default: ""
7774
- name: pac_ha_exist_certificate
7875
description: PAC HA Existing Certificate
7976
default: ""
@@ -124,8 +121,6 @@ spec:
124121
value: $(params.git_access_token)
125122
- name: solution
126123
value: $(params.solution)
127-
- name: ibm_customer_number
128-
value: $(params.ibm_customer_number)
129124
- name: management_image_name
130125
value: $(params.management_image_name)
131126
- name: pac_ha_exist_certificate

.tekton/lsf/lsf_task/lsf-task-negative.yaml

-5
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ spec:
7171
- name: solution
7272
description: Provide the value for the solution that is needed for the support of lsf and HPC.
7373
default: "lsf"
74-
- name: ibm_customer_number
75-
description: Comma-separated list of the IBM Customer Number(s) (ICN) that is used for the Bring Your Own License (BYOL) entitlement check. For more information on how to find your ICN, see [What is my IBM Customer Number (ICN)?](https://www.ibm.com/support/pages/what-my-ibm-customer-number-icn)..
76-
default: ""
7774
workspaces:
7875
- name: workspace
7976
mountPath: /artifacts
@@ -121,8 +118,6 @@ spec:
121118
value: $(params.git_access_token)
122119
- name: solution
123120
value: $(params.solution)
124-
- name: ibm_customer_number
125-
value: $(params.ibm_customer_number)
126121
- name: management_image_name
127122
value: $(params.management_image_name)
128123
steps:

.tekton/lsf/lsf_task/lsf-task-pr-rhel.yaml

-5
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ spec:
7272
- name: solution
7373
description: Provide the value for the solution that is needed for the support of lsf and HPC.
7474
default: "lsf"
75-
- name: ibm_customer_number
76-
description: Comma-separated list of the IBM Customer Number(s) (ICN) that is used for the Bring Your Own License (BYOL) entitlement check. For more information on how to find your ICN, see [What is my IBM Customer Number (ICN)?](https://www.ibm.com/support/pages/what-my-ibm-customer-number-icn)..
77-
default: ""
7875
workspaces:
7976
- name: workspace
8077
mountPath: /artifacts
@@ -127,8 +124,6 @@ spec:
127124
value: $(params.git_access_token)
128125
- name: solution
129126
value: $(params.solution)
130-
- name: ibm_customer_number
131-
value: $(params.ibm_customer_number)
132127
- name: management_image_name
133128
value: $(params.management_image_name)
134129
workingDir: "/artifacts"

.tekton/lsf/lsf_task/lsf-task-region.yaml

-5
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ spec:
7171
- name: solution
7272
description: Provide the value for the solution that is needed for the support of lsf and HPC.
7373
default: "lsf"
74-
- name: ibm_customer_number
75-
description: Comma-separated list of the IBM Customer Number(s) (ICN) that is used for the Bring Your Own License (BYOL) entitlement check. For more information on how to find your ICN, see [What is my IBM Customer Number (ICN)?](https://www.ibm.com/support/pages/what-my-ibm-customer-number-icn)..
76-
default: ""
7774
workspaces:
7875
- name: workspace
7976
mountPath: /artifacts
@@ -121,8 +118,6 @@ spec:
121118
value: $(params.git_access_token)
122119
- name: solution
123120
value: $(params.solution)
124-
- name: ibm_customer_number
125-
value: $(params.ibm_customer_number)
126121
- name: management_image_name
127122
value: $(params.management_image_name)
128123
steps:

.tekton/scripts/issue_track.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ error_check_on_all_file() {
77
for file in "$DIRECTORY"/$pattern; do
88
if [ -f "$file" ]; then
99
if [[ "${file}" == *"negative"* ]]; then
10-
infra_validation_negative_log_fail_check=$(eval "grep -v 'Terraform upgrade output:' $file" | grep -E -w 'FAIL')
10+
infra_validation_negative_log_fail_check=$(grep -v -e 'Terraform upgrade output:' -e 'Error retrieving reservation ID from secrets:' -e 'Field validation for' "$file" | grep -E -w 'FAIL')
1111
if [[ "$infra_validation_negative_log_fail_check" ]]; then
1212
results+=("true")
1313
if [[ "${infra_or_validation}" == "infra" ]]; then
@@ -17,7 +17,7 @@ error_check_on_all_file() {
1717
fi
1818
fi
1919
else
20-
infra_validation_log_error_check=$(eval "grep -v 'Terraform upgrade output:' $file" | grep -E -w 'FAIL|Error|ERROR')
20+
infra_validation_log_error_check=$(grep -v -e 'Terraform upgrade output:' -e 'Error retrieving reservation ID from secrets:' -e 'Field validation for' "$file" | grep -E -w 'FAIL|Error|ERROR')
2121
if [[ "$infra_validation_log_error_check" ]]; then
2222
results+=("true")
2323
if [[ "${infra_or_validation}" == "infra" ]]; then
@@ -45,15 +45,15 @@ issue_track() {
4545
DIRECTORY="/artifacts/tests"
4646
if [ -d "$DIRECTORY" ]; then
4747
if [[ "${LOG_FILE_NAME}" == *"negative"* ]]; then
48-
negative_log_error_check=$(eval "grep -v 'Terraform upgrade output:' $DIRECTORY/$LOG_FILE_NAME" | grep 'FAIL')
48+
negative_log_error_check=$(grep -v -e 'Terraform upgrade output:' -e 'Error retrieving reservation ID from secrets:' -e 'Field validation for' $DIRECTORY/"$LOG_FILE_NAME" | grep 'FAIL')
4949
if [[ "$negative_log_error_check" ]]; then
5050
echo "${negative_log_error_check}"
5151
echo "Found FAIL in plan/apply log. Please check log : ${LOG_FILE_NAME}"
5252
exit 1
5353
fi
5454
else
5555
# Track error/fail from the suites log file
56-
log_error_check=$(eval "grep -v 'Terraform upgrade output:' $DIRECTORY/$LOG_FILE_NAME" | grep -E -w 'FAIL|Error|ERROR')
56+
log_error_check=$(grep -v -e 'Terraform upgrade output:' -e 'Error retrieving reservation ID from secrets:' -e 'Field validation for' $DIRECTORY/"$LOG_FILE_NAME" | grep -E -w 'FAIL|Error|ERROR')
5757
if [[ "$log_error_check" ]]; then
5858
echo "${log_error_check}"
5959
echo "Found Error/FAIL/ERROR in plan/apply log. Please check log : ${LOG_FILE_NAME}"
@@ -103,9 +103,9 @@ display_validation_log() {
103103
echo "##################################################################################"
104104
echo "##################################################################################"
105105
if [[ "${LOG_FILE_NAME}" == *"negative"* ]]; then
106-
validation_log_error_check=$(eval "grep -v 'Terraform upgrade output:' $DIRECTORY/logs/$LOG_FILE_NAME" | grep -E -w 'FAIL')
106+
validation_log_error_check=$(grep -v -e 'Terraform upgrade output:' -e 'Error retrieving reservation ID from secrets:' -e 'Field validation for' $DIRECTORY/logs/"$LOG_FILE_NAME" | grep -E -w 'FAIL')
107107
else
108-
validation_log_error_check=$(eval "grep -v 'Terraform upgrade output:' $DIRECTORY/logs/$LOG_FILE_NAME" | grep -E -w 'FAIL|Error|ERROR')
108+
validation_log_error_check=$(grep -v -e 'Terraform upgrade output:' -e 'Error retrieving reservation ID from secrets:' -e 'Field validation for' $DIRECTORY/logs/"$LOG_FILE_NAME" | grep -E -w 'FAIL|Error|ERROR')
109109
fi
110110

111111
# Display if any error in validation log

.tekton/scripts/suites.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ common_suite() {
4040
# get ssh-key created based on pr-id
4141
get_pr_ssh_key "${PR_REVISION}" "${CHECK_SOLUTION}"
4242
SSH_KEY=${CICD_SSH_KEY:?} COMPUTE_IMAGE_NAME=${compute_image_name:?} LOGIN_NODE_IMAGE_NAME=${login_image_name:?} MANAGEMENT_IMAGE_NAME=${management_image_name:?} \
43-
ZONE=${zone:?} SOLUTION=${solution:?} IBM_CUSTOMER_NUMBER=${ibm_customer_number:?} DEFAULT_EXISTING_RESOURCE_GROUP=${resource_group:?} \
43+
ZONE=${zone:?} SOLUTION=${solution:?} DEFAULT_EXISTING_RESOURCE_GROUP=${resource_group:?} \
4444
go test -v -timeout 9000m -run "${test_cases}" | tee -a "$LOG_FILE"
4545
# Upload log/test_output files to cos bucket
4646
cos_upload "PR" "${CHECK_SOLUTION}" "${DIRECTORY}"
@@ -78,7 +78,7 @@ common_suite() {
7878
# get ssh-key created based on commit-id
7979
get_commit_ssh_key "${REVISION}" "${CHECK_SOLUTION}"
8080
SSH_KEY=${CICD_SSH_KEY:?} COMPUTE_IMAGE_NAME=${compute_image_name:?} LOGIN_NODE_IMAGE_NAME=${login_image_name:?} MANAGEMENT_IMAGE_NAME=${management_image_name:?} \
81-
ZONE=${zone:?} SOLUTION=${solution:?} IBM_CUSTOMER_NUMBER=${ibm_customer_number:?} DEFAULT_EXISTING_RESOURCE_GROUP=${resource_group:?} \
81+
ZONE=${zone:?} SOLUTION=${solution:?} DEFAULT_EXISTING_RESOURCE_GROUP=${resource_group:?} \
8282
go test -v -timeout 9000m -run "${test_cases}" | tee -a "$LOG_FILE"
8383
# Upload log/test_output files to cos bucket
8484
cos_upload "REGRESSION" "${CHECK_SOLUTION}" "${DIRECTORY}" "${VALIDATION_LOG_FILE_NAME}"

cra-config.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ CRA_TARGETS:
1010
TF_VAR_bastion_ssh_keys: "[\"geretain-hpc\"]"
1111
TF_VAR_compute_ssh_keys: "[\"geretain-hpc\"]"
1212
TF_VAR_remote_allowed_ips: "[\"49.207.216.50\"]"
13-
TF_VAR_ibm_customer_number: "051700"
1413
TF_VAR_solution: "lsf"

ibm_catalog.json

+2-6
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
"authority": "scc-v3",
5252
"profiles": [
5353
{
54-
"profile_name": "CIS IBM Cloud Foundations Benchmark",
55-
"profile_version": "1.0.0"
54+
"profile_name": "CIS IBM Cloud Foundations Benchmark v1.1.0",
55+
"profile_version": "1.1.0"
5656
}
5757
]
5858
},
@@ -77,10 +77,6 @@
7777
{
7878
"key": "remote_allowed_ips"
7979
},
80-
{
81-
"key": "ibm_customer_number",
82-
"required": true
83-
},
8480
{
8581
"key": "zones",
8682
"required": true,

0 commit comments

Comments
 (0)