-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added an encryption mechanism for API keys, Fixed the config syncing …
…problem (#229) * Fix email from mismatch between env and settings db (#175) * Encrypt Infura and SparkPost API keys inside the databse (#1) * updated websocket package version to solve the go sum checksum mismatch problem * Add golang.org/x/tools to go.sum by go mod download * Modify dependencies to fix go.sum * Modify go.sum * Modify go.sum * Modify go.sum * Fix tests dependency problem * Add encryption secret key to the Makefile * change the encryption secret key in makefile
- Loading branch information
Showing
11 changed files
with
224 additions
and
356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ export [email protected] | |
export PROXEUS_DATA_DIR?=./data | ||
export PROXEUS_DATABASE_ENGINE?=storm | ||
export PROXEUS_DATABASE_URI?=mongodb://localhost:27017 | ||
export PROXEUS_ENCRYPTION_SECRET_KEY?=PleAsE_chAnGe_me_32_Characters++ | ||
|
||
######################################################### | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//go:build coverage | ||
// +build coverage | ||
|
||
package main | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//go:build integration | ||
// +build integration | ||
|
||
package db | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//go:build integration | ||
// +build integration | ||
|
||
package db | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package database | ||
|
||
import ( | ||
"testing" | ||
|
||
. "github.com/onsi/gomega" | ||
) | ||
|
||
func TestUtils(t *testing.T) { | ||
RegisterTestingT(t) | ||
// cipher key | ||
secretKey := "thisis32bitlongpassphraseimusing" | ||
|
||
// plaintext | ||
pt := "11165875f50c4b87a32a501afa79bf64" | ||
|
||
c, err := EncryptWithAES(secretKey, pt) | ||
Expect(err).To(BeNil()) | ||
|
||
// decrypt | ||
decrepted, err := DecryptWithAES(secretKey, c) | ||
Expect(err).To(BeNil()) | ||
|
||
Expect(decrepted).To(Equal(pt)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.