RPC code challenge from gravitational
Find a file
2019-05-21 15:05:45 -07:00
gradle/wrapper pass in private key for generation of cert requests 2019-05-19 11:37:58 -07:00
src refactored server for dependancy injection, combined tests to run correctly in a multithreaded build 2019-05-21 15:04:18 -07:00
.gitignore removed accidental vim swaps 2019-05-21 13:26:49 -07:00
build.gradle refactored server for dependancy injection, combined tests to run correctly in a multithreaded build 2019-05-21 15:04:18 -07:00
buildwrapper.sh CNs cant be arbitrary 2019-05-19 14:25:25 -07:00
gradlew pass in private key for generation of cert requests 2019-05-19 11:37:58 -07:00
gradlew.bat pass in private key for generation of cert requests 2019-05-19 11:37:58 -07:00
README.md readme additions for cert auth test 2019-05-21 15:05:45 -07:00

JobServ

Remote Procedure Calls over the protobuf API

Requirements

  • openssl
  • tar

Building

Gradle will manage dependencies, generate code, compile the java, and package the code. Simply run the folllowing command:

$ ./buildwrapper.sh

buildwrapper will ask you for details about the client and server, if you are testing this software both CNs can be set to localhost. buildwrapper will then generate CAs for the Client and Server, and signed certs for the Client and Server. IN addition a seperate, third CA and cert will be generated for testing purposes. Gradle will then generate protobuf source and compile it with the source for the client and server. After gradle is completed buildwrapper will organize the sources with their respective certs in the staging folder. In addition to a server folder and a client folder, there will be a test folder which has a copy of all certs and both server and client functionality. The test CA is not trusted by the server or the client by default. As such, the test cert can be used to induce a mutual tls authentication failure.

Running

After build, the programs can be found in the staging folder. After changing directory to the 'staging/client' folder or the 'staging/server' folder, either program can be run as follows:

$ ./JobServ/bin/jobserv-server (port) server.crt private.pem ca.crt
$ ./JobServ/bin/jobserv-client private.pem client.crt ca.crt (hostname) (port) (command) (arguments)

alternatively, for guidance:

$ ./JobServ/bin/jobserv-server 
$ ./JobServ/bin/jobserv-client help

Testing

Running the gradle test task, or the buildwrapper will run all junit tests. Currently that includes a test of certificate based authentication (Mutual TLS) (TODO: job control module tests)