Skip to content
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

[WIP] AcraReader: basic HTTP API /decrypt handling #198

Merged
merged 1 commit into from
Jul 12, 2018

Conversation

vixentael
Copy link
Collaborator

Initial version of AcraReader HTTP API handling.

API format:

Request

POST `<host>/v1/decrypt?zone_id=<zone_id_string>`
Content-Type: application/octet-stream
Content-Length: [NUMBER_OF_BYTES_IN_FILE]

[ACRASTRUCT]

Response:

HTTP/1.1 200 OK
Content-Length: 88
Content-Type: application/octet-stream
Connection: Closed

[DECRYPTED ACRASTRUCT]

@vixentael vixentael requested a review from Lagovas July 11, 2018 18:39
@Lagovas Lagovas merged commit 8dbf9c0 into new/acra-reader-T663 Jul 12, 2018
@vixentael vixentael deleted the vixentael/acra-reader-http-api branch July 12, 2018 10:41
vixentael added a commit that referenced this pull request Jul 23, 2018
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants