Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Conversation

@liamsi
Copy link
Contributor

@liamsi liamsi commented Aug 21, 2017

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

liamsi and others added 30 commits August 14, 2017 12:36
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
fix some typos
# Conflicts:
#	core/client/kt/requests.go
#	core/mutator/entry/entry.go
#	core/mutator/entry/entry_test.go
#	impl/proto/monitor_v1_service/gen.go
@liamsi liamsi requested a review from gdbelvin August 21, 2017 22:45
glog.Fatalf("Could not read domain info %v:", err)
}

srv := monitor.New(mcc, crypto.NewSHA256Signer(key), logTree, mapTree, *pollPeriod)
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is none :-D

@liamsi liamsi force-pushed the non_verifying_monitor branch from d9fc2c8 to 8603214 Compare August 21, 2017 23:13
@liamsi liamsi force-pushed the non_verifying_monitor branch from 6451c46 to 42a855b Compare August 22, 2017 03:34
// 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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this return error?

Copy link
Contributor Author

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

// TODO(ismail) use domain info to properly init. the monitor:
monitor: &cmon.Monitor{},
signer: signer,
proccessedSMRs: make([]*mopb.GetMonitoringResponse, 256),
Copy link
Contributor

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.

@liamsi liamsi force-pushed the non_verifying_monitor branch from 1fe5a23 to cdc64de Compare August 22, 2017 15:40
@google google deleted a comment from codecov-io Aug 22, 2017
@liamsi liamsi force-pushed the non_verifying_monitor branch from 82ad8e2 to d6333c8 Compare August 22, 2017 19:15
@liamsi liamsi force-pushed the non_verifying_monitor branch from d6333c8 to b881c04 Compare August 22, 2017 20:37
@liamsi liamsi force-pushed the non_verifying_monitor branch from 7fa59ef to 153d655 Compare August 24, 2017 12:40
@codecov-io
Copy link

Codecov Report

Merging #776 into master will decrease coverage by 1.09%.
The diff coverage is 12.65%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
impl/mutation/mutation.go 33.33% <ø> (ø) ⬆️
core/monitor/monitor.go 0% <0%> (ø)
core/monitor/verify.go 0% <0%> (ø)
core/monitor/sign.go 0% <0%> (ø)
impl/monitor/server.go 31.03% <31.03%> (ø)
core/mutation/mutation.go 60.41% <50%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update df5f639...153d655. Read the comment docs.

@liamsi liamsi merged commit 205ae4d into google:master Aug 24, 2017
@liamsi liamsi mentioned this pull request Sep 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants