-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add Grafeas transport #10
Add Grafeas transport #10
Conversation
I was able to use this transport to dispatch grafeas occurrences to a test grafeas server from a test jenkins instance. However, more clean up is required. |
src/main/java/io/jenkins/plugins/intotorecorder/transport/Grafeas.java
Outdated
Show resolved
Hide resolved
src/main/java/io/jenkins/plugins/intotorecorder/transport/Grafeas.java
Outdated
Show resolved
Hide resolved
in-toto is now officially in Grafeas (grafeas/grafeas#391)! The implementation of in-toto within Grafeas requires some minor modifications to the in-toto document format, and a translator of some sort will need to be built and integrated with the changes proposed in this PR. |
Signed-off-by: Aditya Saky <[email protected]>
Signed-off-by: Aditya Saky <[email protected]>
Signed-off-by: Aditya Saky <[email protected]>
Signed-off-by: Aditya Saky <[email protected]>
Signed-off-by: Aditya Saky <[email protected]>
Signed-off-by: Aditya Sirish <[email protected]>
Signed-off-by: Aditya Sirish <[email protected]>
06e780f
to
c95c2f7
Compare
Okay! The conversion is mostly working, bar a couple of pending FIXMEs for resource URIs. For reference, here's the demo Jenkins pipeline script:
This relies on in-toto-java with in-toto/in-toto-java#19. |
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.
I think there are some minor naming nits, but it's looking good!
src/main/java/io/jenkins/plugins/intotorecorder/InTotoRecorder.java
Outdated
Show resolved
Hide resolved
src/main/java/io/jenkins/plugins/intotorecorder/transport/Grafeas.java
Outdated
Show resolved
Hide resolved
src/main/java/io/jenkins/plugins/intotorecorder/transport/Grafeas.java
Outdated
Show resolved
Hide resolved
src/main/java/io/jenkins/plugins/intotorecorder/transport/Grafeas.java
Outdated
Show resolved
Hide resolved
src/main/java/io/jenkins/plugins/intotorecorder/transport/Grafeas.java
Outdated
Show resolved
Hide resolved
src/main/java/io/jenkins/plugins/intotorecorder/transport/Grafeas.java
Outdated
Show resolved
Hide resolved
src/main/java/io/jenkins/plugins/intotorecorder/transport/Grafeas.java
Outdated
Show resolved
Hide resolved
src/test/java/io/jenkins/plugins/intotorecorder/transport/TransportTest.java
Show resolved
Hide resolved
Signed-off-by: Aditya Sirish <[email protected]>
Signed-off-by: Aditya Sirish <[email protected]>
1abc99a
to
16a505b
Compare
Signed-off-by: Aditya Sirish <[email protected]>
Signed-off-by: Aditya Sirish <[email protected]>
Signed-off-by: Aditya Sirish <[email protected]>
Signed-off-by: Aditya Sirish <[email protected]>
Thank you for your updates! I think there is just one outstanding comment and figure out why the build is failing and we can merge... |
The build seems to fail here: https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fin-toto-plugin/detail/PR-10/12/pipeline#log-146 Which means it's not seeing the changes at in-toto/in-toto-java#19. Investigating... |
Signed-off-by: Aditya Sirish <[email protected]>
e3dbb28
to
95b4923
Compare
Resolved! It's also worth noting that I was able to successfully reverse the grafeas in-toto format to the regular in-toto serialization, and verify the signature. :) |
Signed-off-by: Aditya Sirish <[email protected]>
95b4923
to
d00c3af
Compare
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.
I think we are almost there. I just have an overarching question.
src/main/java/io/jenkins/plugins/intotorecorder/transport/GrafeasTransport.java
Show resolved
Hide resolved
src/main/java/io/jenkins/plugins/intotorecorder/transport/GrafeasTransport.java
Show resolved
Hide resolved
Signed-off-by: Aditya Sirish <[email protected]>
awesome, LGTM. Merging! |
This PR introduces Grafeas as a transport for the in-toto jenkins plugin.
For a grafeas server located at
https://grafeas.example.com/
, for some projectexample_project
, the in-toto links generated by the plugin can be sent using the following transport:grafeas+https://grafeas.example.com/v1beta1/projects/example_project/occurrences?noteName=<note_occurrence_corresponds_to>&resourceUri=<resource_id>
Note, this plugin depends on the changes introduced to the Grafeas server in grafeas/grafeas#391. Any further changes there can affect the plugin and therefore this must only be merged when that PR is merged.