Skip to content

Support serializing BlockBuilder - #342

Open
saoirse-a wants to merge 2 commits into
eclipse-biscuit:mainfrom
saoirse-a:block-builder-serialization
Open

saoirse-a wants to merge 2 commits into
eclipse-biscuit:mainfrom
saoirse-a:block-builder-serialization

Conversation

@saoirse-a

Copy link
Copy Markdown
Contributor

Allows BlockBuilder to be serialized and deserialized, to save them for re-use or to transmit them across a process boundary (similar to AuthorizerSnapshot).

BlockBuilder is serialized as a protobuf Block message with all of their symbols and public keys interned into this block.

@saoirse-a
saoirse-a force-pushed the block-builder-serialization branch from 3543fe8 to b19ed37 Compare August 13, 2026 11:34
Allows `BlockBuilder` to be serialized and deserialized, to save them
for re-use or to transmit them across a process boundary (similar to
`AuthorizerSnapshot`).

`BlockBuilder` is serialized as a protobuf `Block` message with all of
their symbols and public keys interned into this block.
Comment thread biscuit-auth/src/token/builder/block.rs Outdated
/// `BlockBuilder` is serialized as a self-contained biscuit block; it must carry its symbols
/// and public keys in its internment table. The block's contents are not authenticated.
/// [`ThirdPartyBlock`](crate::ThirdPartyBlock) instead.
pub fn from<T: AsRef<[u8]>>(slice: T) -> Result<Self, error::Token> {

@divarvel divarvel Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: I think from should be kept for From impls out of consistency. from_bytes might be more accurate here

@saoirse-a

Copy link
Copy Markdown
Contributor Author

Renamed

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.

2 participants