-
Notifications
You must be signed in to change notification settings - Fork 283
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
refactor(cmd-api-server): clean up configuration parameters #720 #1996
refactor(cmd-api-server): clean up configuration parameters #720 #1996
Conversation
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.
@ruzell22 The documentation doesn't seem to be updated. Please go through the acceptance criteria again.
@petermetz I have looked into the package cactus-cmd-api-server about the parameters to see if it is mentioned there on other files and for possible documentations. I have cleaned those that are not inside the other packages: I have also ran npm run configure and npm run start:api-server command and it outputs a success I would like to inquire if this is good to push for a PR or is there other specific documentation file I should update? Thank you |
694cc32
to
321c8f6
Compare
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.
@ruzell22 I'm seeing the variable names in free text search popping up several times throughout the code-base still.
321c8f6
to
59a7ae6
Compare
|
GitGuardian id | Secret | Commit | Filename | |
---|---|---|---|---|
- | Generic Private Key | 0c0952b | examples/cactus-example-carbon-accounting-backend/example-config.json | View secret |
- | RSA Private Key | 0c0952b | examples/cactus-example-carbon-accounting-backend/example-config.json | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Our GitHub checks need improvements? Share your feedbacks!
a341ebe
to
44f38ee
Compare
@petermetz I have removed more cactusNodeId, consortiumId, and keychainSuffixKeyPairPem and their ENV equivalent (excluding in example-config.json file which causes GitGuardian bot error during checks here). |
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.
@petermetz I have removed more cactusNodeId, consortiumId, and keychainSuffixKeyPairPem and their ENV equivalent (excluding in example-config.json file which causes GitGuardian bot error during checks here).
@ruzell22 If changing example-config.json
trips the GitGuardian check we need to configure it to ignore that file because the alternative would be to not change that file ever again which is not feasable. Ignoring it in gitguardian should be safe because it's an example file with randomly generated keys in it.
44f38ee
to
fcb52ad
Compare
@ruzell22 any updates on this PR? (If you think the necessary changes were done, you can always re-request for review) |
fcb52ad
to
e763552
Compare
Hello @petermetz , I have pushed the changes for the clean up so the new gitguardian workflow will be able to scan it. It passed. However, when I looked into more details about it, the scanner is still saying "Invalid token header. No credentials provided". It seems that even after being merged to the main repository, the workflow still doesn't have the permission to access the environmental secrets variable. I would like to ask assistance in that matter. Thank you. Below are the screenshots of the details. |
@ruzell22 That's unfortunate. Please re-open the issue for the git guardian check, link to the comment you just made in a comment on that issue so that everyone has the context. |
…#2379 fixes: 2379 related to: hyperledger-cacti#2313 and hyperledger-cacti#1996 Signed-off-by: ruzell22 <[email protected]>
…#2379 fixes: hyperledger-cacti#2379 related to: hyperledger-cacti#2313 and hyperledger-cacti#1996 This fixes the Invalid token header, no credentials provided error of the custom gitguardian workflow. Signed-off-by: ruzell22 <[email protected]>
…#2379 fixes: hyperledger-cacti#2379 related to: hyperledger-cacti#2313 and hyperledger-cacti#1996 This fixes the Invalid token header, no credentials provided error of the custom gitguardian workflow. Signed-off-by: ruzell22 <[email protected]>
…#2379 fixes: hyperledger-cacti#2379 related to: hyperledger-cacti#2313 and hyperledger-cacti#1996 This fixes the Invalid token header, no credentials provided error of the custom gitguardian workflow. Signed-off-by: ruzell22 <[email protected]>
…#2379 fixes: hyperledger-cacti#2379 related to: hyperledger-cacti#2313 and hyperledger-cacti#1996 This fixes the Invalid token header, no credentials provided error of the custom gitguardian workflow. Signed-off-by: ruzell22 <[email protected]>
…#2379 fixes: hyperledger-cacti#2379 related to: hyperledger-cacti#2313 and hyperledger-cacti#1996 This fixes the Invalid token header, no credentials provided error of the custom gitguardian workflow. Signed-off-by: ruzell22 <[email protected]>
…#2379 fixes: hyperledger-cacti#2379 related to: hyperledger-cacti#2313 and hyperledger-cacti#1996 This fixes the Invalid token header, no credentials provided error of the custom gitguardian workflow. Signed-off-by: ruzell22 <[email protected]>
…#2379 fixes: hyperledger-cacti#2379 related to: hyperledger-cacti#2313 and hyperledger-cacti#1996 This fixes the Invalid token header, no credentials provided error of the custom gitguardian workflow. Signed-off-by: ruzell22 <[email protected]>
…#2379 fixes: hyperledger-cacti#2379 related to: hyperledger-cacti#2313 and hyperledger-cacti#1996 This fixes the Invalid token header, no credentials provided error of the custom gitguardian workflow. Signed-off-by: ruzell22 <[email protected]>
…#2379 fixes: hyperledger-cacti#2379 related to: hyperledger-cacti#2313 and hyperledger-cacti#1996 This fixes the Invalid token header, no credentials provided error of the custom gitguardian workflow. Signed-off-by: ruzell22 <[email protected]>
…#2379 fixes: hyperledger-cacti#2379 related to: hyperledger-cacti#2313 and hyperledger-cacti#1996 This fixes the Invalid token header, no credentials provided error of the custom gitguardian workflow. Signed-off-by: ruzell22 <[email protected]>
…#2379 fixes: hyperledger-cacti#2379 related to: hyperledger-cacti#2313 and hyperledger-cacti#1996 This fixes the Invalid token header, no credentials provided error of the custom gitguardian workflow. Signed-off-by: ruzell22 <[email protected]>
…#2379 fixes: hyperledger-cacti#2379 related to: hyperledger-cacti#2313 and hyperledger-cacti#1996 This fixes the Invalid token header, no credentials provided error of the custom gitguardian workflow. Signed-off-by: ruzell22 <[email protected]>
Hello @petermetz , with gitguardian being removed, this PR is considered done and can be closed. Thank you. |
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.
@ruzell22 Please
- rebase onto upstream/main
- Retest and see if this part of the commit message is still true:
"Parameter keyPairPem cannot be removed as it results to an error in running the api server."
2.1. Post the full error logs if it is still crashing or remove it otherwise.
@petermetz I have rebased and ran 'yarn run configure' and it built successfully. I tried removing the parameter keyPairPem and it is having error when building |
1f00d24
to
7008aeb
Compare
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.
Thank you @ruzzel22, LGTM
…er-cacti#720 BREAKING CHANGE: Removed the `keyPairPem` parameter from the API server configuration. fixes: hyperledger-cacti#720 Parameters cleaned up are: cactusNodeId, consortiumId, keychainSuffixKeyPairPem Cleaning the three mentioned parameters are backwards compatible with tags versions: v1.0.0-rc.3 and v1.0.0 The latest tag being used as of this change is v1.0.0-25-gdda3f00c Signed-off-by: ruzell22 <[email protected]> Signed-off-by: Peter Somogyvari <[email protected]>
7008aeb
to
0c0952b
Compare
fixes: #720
Parameters that are cleaned up are: cactusNodeId, consortiumId, keychainSuffixKeyPairPem
Parameter keyPairPem cannot be remove as it results to an error in running the api server.
Cleaning the three mentioned parameter are backwards compatible with tags versions:
v1.0.0-rc.3 and v1.0.0
The latest tag being used as of this change is v1.0.0-25-gdda3f00c
Signed-off-by: ruzell22 [email protected]