-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(dast): ccp, sshconfig missing #3705
base: main
Are you sure you want to change the base?
fix(dast): ccp, sshconfig missing #3705
Conversation
@@ -85,7 +84,7 @@ jobs: | |||
run: jq '.plugins += [{ "packageName":"@hyperledger/cactus-plugin-keychain-memory","type":"org.hyperledger.cactus.plugin_import_type.LOCAL","action":"org.hyperledger.cactus.plugin_import_action.INSTALL","options":{"packageSrc":"/home/runner/work/cacti/cacti/packages/cactus-plugin-keychain-memory/","instanceId":"0daacd05-d1cd-4eab-9332-4ad1aff4b909","keychainId":"d29d728e-eaa0-4e2d-b187-d132242b0d9a"}}]' .config.json > .config2.json && mv .config2.json .config.json | |||
|
|||
- name: Install Fabric connector into the API server | |||
run: jq '.plugins += [{ "packageName":"@hyperledger/cactus-plugin-ledger-connector-fabric", "type":"org.hyperledger.cactus.plugin_import_type.LOCAL", "action":"org.hyperledger.cactus.plugin_import_action.INSTALL", "options":{ "packageSrc":"/home/runner/work/cacti/cacti/packages/cactus-plugin-ledger-connector-fabric/", "instanceId":"some-unique-fabric-connector-instance-id", "peerBinary":"/fabric-samples/bin/peer", "connectionProfile":"{}", "dockerBinary":"usr/local/bin/docker","cliContainerEnv":{"CORE_PEER_LOCALMSPID":"Org1MSP","CORE_PEER_ADDRESS":"peer0.org1.example.com:7051","CORE_PEER_MSPCONFIGPATH":"/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/[email protected]/msp","CORE_PEER_TLS_ROOTCERT_FILE":"/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt","ORDERER_TLS_ROOTCERT_FILE":"/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem"},"discoveryOptions":{"enabled":true,"asLocalhost":true}}}] ' .config.json > .config2.json && mv .config2.json .config.json | |||
run: jq '.plugins += [{ "packageName":"@hyperledger/cactus-plugin-ledger-connector-fabric", "type":"org.hyperledger.cactus.plugin_import_type.LOCAL", "action":"org.hyperledger.cactus.plugin_import_action.INSTALL", "options":{ "packageSrc":"/home/runner/work/cacti/cacti/packages/cactus-plugin-ledger-connector-fabric/", "instanceId":"some-unique-fabric-connector-instance-id", "peerBinary":"/fabric-samples/bin/peer", "connectionProfile":"{}", "connectionProfile":"{}", "dockerBinary":"usr/local/bin/docker","cliContainerEnv":{"CORE_PEER_LOCALMSPID":"Org1MSP","CORE_PEER_ADDRESS":"peer0.org1.example.com:7051","CORE_PEER_MSPCONFIGPATH":"/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/[email protected]/msp","CORE_PEER_TLS_ROOTCERT_FILE":"/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt","ORDERER_TLS_ROOTCERT_FILE":"/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem"},"discoveryOptions":{"enabled":true,"asLocalhost":true}}}] ' .config.json > .config2.json && mv .config2.json .config.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, there should be NO
changes to this piece of code (That is the objective of the task)
85013e4
to
4048f3e
Compare
3bee9e8
to
9de9c66
Compare
956d7f7
to
5ba0d22
Compare
echo "Private Key:" | ||
cat private_key.pem | ||
|
||
- run: jq '.expressJwtOptions.secret = "-----BEGIN PUBLIC KEY-----\n$(cat public_key.pem)\n-----END PUBLIC KEY-----" | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The public key is generated with those tags by default, please double check
} | ||
if (this.sshDebugOn) { | ||
this.sshConfig = this.enableSshDebugLogs(this.sshConfig); | ||
// throw new Error("Cannot instantiate Fabric connector without SSH config"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before this comment please add this
TODO: Temporarily commenting this code so that we do not have breaking changes, will be fixed by ISSUE_NUM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you straightaway copy pasted my line even though we discussed in the meeting to create a new task to fix this and then replace it with ISSUE_NUM
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 raynatopedrajeta The comment is almost spot on, just please make sure to open an issue and put the number of that issue there in place of ISSUE_NUM
this.sshConfig = this.enableSshDebugLogs(this.sshConfig); | ||
// throw new Error("Cannot instantiate Fabric connector without SSH config"); | ||
this.sshConfig = {}; | ||
console.log("The check for sshConfig has been temporarily removed"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this
on: | ||
push: | ||
branches: [main, dev] | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove these new lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @jagpreetsinghsasan ,
I've compared this per line and no changes on my end. Not sure why these empty lines are tagged as changes.
Any suggestions for this?
Thank you!
Rayn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you add the changed files (before commit), you can revert these changes there itself, the change here is, earlier it was newline
and now it is newline,space
Primary Changes ---------------- 1. Fix the issue on plugin-ledger-connector-fabric that throws an error when there is no sshConfig available. Fixes hyperledger-cacti#3671 Signed-off-by: raynato.c.pedrajeta <[email protected]>
5ba0d22
to
612559d
Compare
on: | ||
push: | ||
branches: [main, dev] | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you add the changed files (before commit), you can revert these changes there itself, the change here is, earlier it was newline
and now it is newline,space
} | ||
if (this.sshDebugOn) { | ||
this.sshConfig = this.enableSshDebugLogs(this.sshConfig); | ||
// throw new Error("Cannot instantiate Fabric connector without SSH config"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you straightaway copy pasted my line even though we discussed in the meeting to create a new task to fix this and then replace it with ISSUE_NUM
.
} | ||
if (this.sshDebugOn) { | ||
this.sshConfig = this.enableSshDebugLogs(this.sshConfig); | ||
// throw new Error("Cannot instantiate Fabric connector without SSH config"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 raynatopedrajeta The comment is almost spot on, just please make sure to open an issue and put the number of that issue there in place of ISSUE_NUM
Primary Changes
throws an error when there is no sshConfig available.
Fixes #3671
Pull Request Requirements
upstream/main
branch and squashed into single commit to help maintainers review it more efficient and to avoid spaghetti git commit graphs that obfuscate which commit did exactly what change, when and, why.-s
flag when usinggit commit
command. You may refer to this link for more information.Character Limit
A Must Read for Beginners
For rebasing and squashing, here's a must read guide for beginners.