Repository navigation
Hold plugin credentials in a private Held, off the contract's Redacted (busbar #1021) - #16
Merged
Merged
Conversation
…s sealed Secret busbar #1021 renames the contract's Redacted<T> to a SEALED Secret<T>: its raw accessor takes a kernel seal and expose_secret is gone; a plugin holds no seal. The access token, the OAuth nonce and the client secret this plugin keeps across a login flow are its own memory, so they move to a crate-private Held<T> (src/held.rs) with the former wrapper's semantics: Debug and Display print [REDACTED], no serde, zeroize on drop, constant-time PartialEq, Clone, and one pub(crate) reveal(). Same pattern as auth-oauth #16. The plugin no longer names Redacted or expose_secret and compiles against the contract before and after #1021. constant_time_eq is already imported from the contract root.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports this plugin off
busbar_contract::Redactedso it builds against both the current contract and the post-busbar#1021 contract, whereRedacted<T>becomes a sealedSecret<T>andexpose_secretis deleted.The access token, OAuth nonce and client secret the plugin keeps across a login flow are its own memory, not values lent by the kernel, so they move to a crate-private
Held<T>(src/held.rs):Debug/Displayprint[REDACTED], no serde, zeroize on drop, constant-timePartialEq,Clone, and a singlepub(crate) reveal(). Same pattern as GetBusbar/busbar-auth-oauth#16.expose_secret()call sites becomereveal().constant_time_eqwas already imported from the contract root.held.rscarries tests for the redaction and equality behaviour. The crate no longer namesRedactedorexpose_secret. Not built locally; relying on CI.