Skip to content

Commit 1e7a4ab

Browse files
authored
Add seLinuxChangePolicy field to Fabric chaincode CRD and remove Profile field from enrollment requests in multiple controllers (#270)
- Introduced a new `seLinuxChangePolicy` field in the Fabric chaincode CRD to enhance security configurations. - Removed the `Profile` field from enrollment request functions in the identity, ordnode, and peer controllers to streamline the request structure. These changes improve the configuration options for chaincode and simplify the enrollment process across controllers. Signed-off-by: David VIEJO <[email protected]>
1 parent e6dc526 commit 1e7a4ab

File tree

4 files changed

+2
-9
lines changed

4 files changed

+2
-9
lines changed

config/crd/bases/hlf.kungfusoftware.es_fabricchaincodes.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,8 @@ spec:
815815
runAsUser:
816816
format: int64
817817
type: integer
818+
seLinuxChangePolicy:
819+
type: string
818820
seLinuxOptions:
819821
properties:
820822
level:

controllers/identity/identity_controller.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,6 @@ func getEnrollRequestForFabricCA(client *kubernetes.Clientset, conf *hlfv1alpha1
439439
return certs.EnrollUserRequest{
440440
Hosts: []string{},
441441
CN: "",
442-
Profile: conf.Spec.Caname,
443442
Attributes: nil,
444443
User: conf.Spec.Enrollid,
445444
Secret: conf.Spec.Enrollsecret,
@@ -510,7 +509,6 @@ func getReenrollRequestForFabricCA(client *kubernetes.Clientset, conf *hlfv1alph
510509
TLSCert: string(cacert),
511510
Hosts: []string{},
512511
CN: "",
513-
Profile: profile,
514512
URL: tlsCAUrl,
515513
Name: conf.Spec.Caname,
516514
EnrollID: conf.Spec.Enrollid,

controllers/ordnode/ordnode_controller.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,7 +1547,6 @@ func getEnrollRequestForFabricCATLS(client *kubernetes.Clientset, enrollment *hl
15471547
return certs.EnrollUserRequest{
15481548
Hosts: hosts,
15491549
CN: enrollment.Enrollid,
1550-
Profile: profile,
15511550
Attributes: nil,
15521551
User: enrollment.Enrollid,
15531552
Secret: enrollment.Enrollsecret,
@@ -1603,7 +1602,6 @@ func getReenrollRequestForFabricCA(client *kubernetes.Clientset, enrollment *hlf
16031602
TLSCert: string(cacert),
16041603
Hosts: []string{},
16051604
CN: "",
1606-
Profile: profile,
16071605
URL: tlsCAUrl,
16081606
Name: enrollment.Caname,
16091607
EnrollID: enrollment.Enrollid,
@@ -1636,7 +1634,6 @@ func getReenrollRequestForFabricCATLS(client *kubernetes.Clientset, enrollment *
16361634
TLSCert: string(cacert),
16371635
Hosts: hosts,
16381636
CN: "",
1639-
Profile: profile,
16401637
URL: tlsCAUrl,
16411638
Name: enrollment.Caname,
16421639
EnrollID: enrollment.Enrollid,

controllers/peer/peer_controller.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,6 @@ func getEnrollRequestForFabricCA(client *kubernetes.Clientset, enrollment *hlfv1
862862
return certs.EnrollUserRequest{
863863
Hosts: []string{},
864864
CN: conf.Name,
865-
Profile: profile,
866865
Attributes: nil,
867866
User: enrollment.Enrollid,
868867
Secret: enrollment.Enrollsecret,
@@ -886,7 +885,6 @@ func getEnrollRequestForFabricCATLS(client *kubernetes.Clientset, enrollment *hl
886885
return certs.EnrollUserRequest{
887886
Hosts: hosts,
888887
CN: enrollment.Enrollid,
889-
Profile: profile,
890888
Attributes: nil,
891889
User: enrollment.Enrollid,
892890
Secret: enrollment.Enrollsecret,
@@ -1026,7 +1024,6 @@ func getReenrollRequestForFabricCA(client *kubernetes.Clientset, enrollment *hlf
10261024
TLSCert: string(cacert),
10271025
Hosts: []string{},
10281026
CN: "",
1029-
Profile: profile,
10301027
URL: tlsCAUrl,
10311028
Name: enrollment.Caname,
10321029
EnrollID: enrollment.Enrollid,
@@ -1049,7 +1046,6 @@ func getReenrollRequestForFabricCATLS(client *kubernetes.Clientset, enrollment *
10491046
TLSCert: string(cacert),
10501047
Hosts: hosts,
10511048
CN: "",
1052-
Profile: profile,
10531049
URL: tlsCAUrl,
10541050
Name: enrollment.Caname,
10551051
EnrollID: enrollment.Enrollid,

0 commit comments

Comments
 (0)