Is it possible to implement OPA bundle signing on code? #580
-
Hi, I have to use OPA bundle signing for integrity, but I have to do all bundle generation after signing in my code. I know that the only bundle signature method provided by OPA is the CLI. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
I don't completely understand the use-case here but if you have a bundle and you want to generate a signature for the files in the bundle you can use the |
Beta Was this translation helpful? Give feedback.
-
Thanks for the context. Is there a reason the application handles the bundle creation. I would have imagined a service that is responsible for talking to the DB and generating/signing/uploading the bundle and another service that handles client requests and talks to OPA for an authz decision. Basically a decoupled model. Is that feasible? |
Beta Was this translation helpful? Give feedback.
-
Ok here's one way to accomplish this:
All the above steps are happening in the kotlin application so you can run this flow periodically or make it event-based. Hope this helps. Thanks. |
Beta Was this translation helpful? Give feedback.
Ok here's one way to accomplish this:
data.json
(If this was a Go app that would have been perfect but lets leave that for now)opa build
command from within the code. I haven't worked with Kotlin but there should be a way to do this. (Assumption:opa
binary installed on machine/container)opa build
oropa sign
All the above steps are happening in the kotlin application so you can run this flow periodically or make it event-based.
Hope this helps. Thanks.