-
Notifications
You must be signed in to change notification settings - Fork 150
Non-verifying monitor #776
Conversation
Monitor service and types: regenerate protos and downgrade grpc-gateway to match trillian's Monitor service and types: regenerate protos and downgrade grpc-gateway to match trillian's work in progress addressed some early review comments
simplify monitor Dockerfile (non-opinionated) add argument to 'prepare script' such that the monitor can contact the kt-server if it isn't reachable via localhost add proto messages that proof certain errors occurred early review comments add signing capability move verification into separate function gofmt golint / presubmit.sh regenerate proto with correct dependency versions add script for generating monitor signing key Add comments to exported methods Add "observed at" timestamp, sign the root hash update test
Minor changes verify signature on response resolves google#672 Add log sig verification rebase wip WIP add TODO remove streaming API (simplifies moving to core) Monitor service and types: regenerate protos and downgrade grpc-gateway to match trillian's Monitor service and types: regenerate protos and downgrade grpc-gateway to match trillian's work in progress revert local changes, add TODOs simplify monitor Dockerfile (non-opinionated)
Minor changes verify signature on response resolves google#672 Add log sig verification rebase wip WIP add TODO remove streaming API (simplifies moving to core) Monitor service and types: regenerate protos and downgrade grpc-gateway to match trillian's Monitor service and types: regenerate protos and downgrade grpc-gateway to match trillian's work in progress revert local changes, add TODOs simplify monitor Dockerfile (non-opinionated) regenerate proto with correct dependency versions Add to kubernetes config and deploy script resolves google#672 rebase rebase =gofmt WIP
* move monitor service types into separate file * move verification (wip) into sperate file * generate and use separate priv. key for signing * pass pointer of priv key * unexport verifKeys
* Remove replacer which isn't used anywhere
# Conflicts: # core/client/kt/requests.go # core/mutator/entry/entry.go # core/mutator/entry/entry_test.go # impl/proto/monitor_v1_service/gen.go
# Conflicts: # docker-compose.yml
cmd/keytransparency-monitor/main.go
Outdated
| glog.Fatalf("Could not read domain info %v:", err) | ||
| } | ||
|
|
||
| srv := monitor.New(mcc, crypto.NewSHA256Signer(key), logTree, mapTree, *pollPeriod) |
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 use a different New function from crypto. NewSHA256Signer is going away.
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.
There is none :-D
d9fc2c8 to
8603214
Compare
6451c46 to
42a855b
Compare
core/monitor/verify.go
Outdated
| // Additionally to the response it takes a complete list of mutations. The list | ||
| // of received mutations may differ from those included in the initial response | ||
| // because of the max. page size. | ||
| func (m *Monitor) VerifyResponse(in *ktpb.GetMutationsResponse, allMuts []*ktpb.Mutation) *mopb.GetMonitoringResponse { |
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.
Should this return error?
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.
It might later (in another PR). All "errors" related to failed validation will go into the GetMonitoringResponse
impl/monitor/monitor.go
Outdated
| // TODO(ismail) use domain info to properly init. the monitor: | ||
| monitor: &cmon.Monitor{}, | ||
| signer: signer, | ||
| proccessedSMRs: make([]*mopb.GetMonitoringResponse, 256), |
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 move non-grpc functions to their own object.
They can be in the same package.
1fe5a23 to
cdc64de
Compare
82ad8e2 to
d6333c8
Compare
d6333c8 to
b881c04
Compare
…on_verifying_monitor
7fa59ef to
153d655
Compare
Codecov Report
@@ Coverage Diff @@
## master #776 +/- ##
=========================================
- Coverage 48.14% 47.04% -1.1%
=========================================
Files 28 32 +4
Lines 2476 2553 +77
=========================================
+ Hits 1192 1201 +9
- Misses 1098 1166 +68
Partials 186 186
Continue to review full report at Codecov.
|
This PR contains everything a monitor would needs to do besides the verification logic. This PR contains all review comments from: #709
The verification logic comes with a separate PR: #768