warrant-dev / warrant

Warrant is a highly scalable, centralized authorization service based on Google Zanzibar. Use it to define, enforce, query, and audit application authorization and access control.
https://warrant.dev
Apache License 2.0
1.15k stars 43 forks source link

Wookie interface updates #230

Closed stanleyphu closed 1 year ago

stanleyphu commented 1 year ago

Describe your changes

This PR updates the objecttype and warrant Service interfaces to have the write methods return a wookie token in addition to the existing return values. This allows the wookie token to optionally be returned in the response. WithNewWookie is also created as a wrapper around WithinTransaction, where a new wookie is created, a transaction is started (or continued), and the new wookie is passed to the callback function.