-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add AcraTranslator service T663 (#213)
* acra reader: entry point * deadline listener; refactor acra-server * base part of connection handling (#197) * base part of connection handling * save connections by descriptor * add a little bit graceful stop service * basic http /decrypt handle (#198) * refactor http API handler, add test (#199) * refactor http API handler, add test * validate acrastruct length before decryption (#201) * add more errors checking * copy keys in test keystorage, add tests on encryption * move into separate folder; add http message responses in body * grpc handler (#200) * change sign of comparison key length * base part of connection handling * save connections by descriptor * add a little bit graceful stop service * add grpc service * fix log message * fix import path * add missing file * validate acrastruct length before decryption * add api test * drop old method fill with zeroes private key * verbose go get * rename api -> grpc_api * fix network part (#203) * fix accepting connections, network manager * drop comment * AcraReader http buffering (#204) * fixing http handling * close connection, remove buffers for http response * add more logs to decryptor * move defer to the top * acra-reader -> acra-translator renaming (#205) * acra-reader -> acra-translator * re-gen api.pb.go * rm old file * Update AcraConnector to connect with AcraTranslator (#206) * acra-reader -> acra-translator * re-gen api.pb.go * add separate acra-translator keys * simplify keys check * acra reader integration tests [T663] (#207) * integration tests for grpc/http * refactor serializing http response struct * check response codes and messages in tests * compare all messages in lower case * add translator keystore move filesystem keystore to separate package run translator with own transport keys * fix import in unit test * return error code after failed creation of posion record * drop keys folder before tests * set Connection: close header to http response * optimize response sending * deadline for secure session handshake timeout for http requests in tests * refactor tests of acra-connector shutdown * detect poison record on translator (#212) * check poison records on acra-translator * change path to test master key * update log messages
- Loading branch information
Showing
49 changed files
with
2,859 additions
and
298 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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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,23 @@ | ||
package connector_mode | ||
|
||
import "strings" | ||
|
||
type ConnectorMode string | ||
|
||
const ( | ||
UndefinedMode ConnectorMode = "UndefinedMode" | ||
AcraServerMode ConnectorMode = "AcraServer" | ||
AcraTranslatorMode ConnectorMode = "AcraTranslator" | ||
) | ||
|
||
func CheckConnectorMode(mode string) ConnectorMode { | ||
lowerCaseMode := strings.ToLower(mode) | ||
|
||
switch lowerCaseMode { | ||
case "acraserver": | ||
return AcraServerMode | ||
case "acratranslator": | ||
return AcraTranslatorMode | ||
} | ||
return UndefinedMode | ||
} |
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
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
Oops, something went wrong.