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

JAVA based implementation for Asherah gRPC server #138

Merged
merged 14 commits into from
May 4, 2020
Merged

Conversation

nikoo28
Copy link
Contributor

@nikoo28 nikoo28 commented Apr 10, 2020

This includes

  • java based server implementation
  • generated files for java by protobuf plugin

Copy link
Contributor

@sushantmimani sushantmimani left a comment

Choose a reason for hiding this comment

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

Minor changes/additions

server/java/README.md Show resolved Hide resolved
server/java/README.md Outdated Show resolved Hide resolved
server/java/README.md Show resolved Hide resolved
responseObserver.onNext(SessionResponse.getDefaultInstance());
}

if (sessionBytes == null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

an accidental re-org of the if blocks might break this flow. think having the null check within the encrypt and decrypt blocks would mitigate that

Copy link
Contributor

Choose a reason for hiding this comment

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

looks like this concern is still active as the code doesn't make it clear that GetSession needs to precede Encrypt\Decrypt operations.

Copy link
Contributor

@aka-bo aka-bo left a comment

Choose a reason for hiding this comment

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

First pass complete. Will review again once the additional tests have been added.

Add support for environment variables
Add more test cases
Simplify logic
Update README
Add graceful termination of java server
@codecov-io
Copy link

codecov-io commented Apr 16, 2020

Codecov Report

Merging #138 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #138   +/-   ##
=========================================
  Coverage     96.28%   96.28%           
  Complexity      399      399           
=========================================
  Files           123      123           
  Lines          3259     3259           
  Branches         60       60           
=========================================
  Hits           3138     3138           
  Misses          111      111           
  Partials         10       10           
Flag Coverage Δ Complexity Δ
#csharp_AppEncryption 97.58% <ø> (ø) 0.00 <ø> (ø)
#csharp_Logging 100.00% <ø> (ø) 0.00 <ø> (ø)
#csharp_SecureMemory 88.38% <ø> (ø) 0.00 <ø> (ø)
#go_appencryption 96.01% <ø> (ø) 0.00 <ø> (ø)
#go_securememory 96.82% <ø> (ø) 0.00 <ø> (ø)
#java_app_encryption 96.93% <ø> (ø) 330.00 <ø> (ø)
#java_secure_memory 94.91% <ø> (ø) 69.00 <ø> (ø)

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 0290ebf...b6d93f3. Read the comment docs.

Copy link
Contributor

@aka-bo aka-bo left a comment

Choose a reason for hiding this comment

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

Review is still in-progress but here's what I've got so far.

server/README.md Outdated Show resolved Hide resolved
server/java/Dockerfile Outdated Show resolved Hide resolved
server/java/Dockerfile Outdated Show resolved Hide resolved
server/java/README.md Outdated Show resolved Hide resolved
server/java/README.md Outdated Show resolved Hide resolved
server/java/README.md Outdated Show resolved Hide resolved
server/java/README.md Outdated Show resolved Hide resolved
server/java/pom.xml Outdated Show resolved Hide resolved
responseObserver.onNext(SessionResponse.getDefaultInstance());
}

if (sessionBytes == null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like this concern is still active as the code doesn't make it clear that GetSession needs to precede Encrypt\Decrypt operations.

server/java/README.md Outdated Show resolved Hide resolved
server/java/README.md Show resolved Hide resolved
server/java/README.md Outdated Show resolved Hide resolved
server/java/README.md Show resolved Hide resolved
server/java/README.md Show resolved Hide resolved
@nikoo28 nikoo28 requested a review from aka-bo April 29, 2020 19:46
@sushantmimani sushantmimani linked an issue Apr 29, 2020 that may be closed by this pull request
Copy link
Contributor

@aka-bo aka-bo left a comment

Choose a reason for hiding this comment

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

just a few minor concerns (see comments) plus the two items we discussed offline: docs around test dependencies and suppressing the log spam caused by the known grpc-java issue

server/README.md Outdated Show resolved Hide resolved
server/README.md Outdated Show resolved Hide resolved
server/java/Dockerfile Outdated Show resolved Hide resolved
@nikoo28 nikoo28 requested a review from aka-bo May 1, 2020 20:25
@aka-bo aka-bo merged commit b14c756 into master May 4, 2020
@aka-bo aka-bo deleted the java_server branch May 4, 2020 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Java based grpc server
5 participants