Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- `Secrets::config()` is now `#[doc(hidden)] pub` instead of `pub(crate)`
behind the `cli` feature. Any embedder that needs the manifest without a
provider — an out-of-tree plugin inspecting declared secrets, for
instance — can now reach it without taking the whole `cli` feature.
- Structured caller context lets CLI and SDK integrations identify the invoking
software, version, operation, and non-secret resource independently of the
user-supplied access reason. Audit records and providers receive the context,
Expand Down
15 changes: 11 additions & 4 deletions secretspec/src/secrets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1883,10 +1883,17 @@ impl Secrets {
Ok(())
}

/// Get a reference to the project configuration. Used by `secretspec
/// codegen` (which needs the manifest, not a provider) and by tests.
#[cfg(any(feature = "cli", test))]
pub(crate) fn config(&self) -> &Config {
/// Get a reference to the project configuration.
///
/// Used by `secretspec codegen`, which needs the manifest rather than a
/// provider. `pub(crate)` behind the `cli` feature meant any other
/// embedder needing the manifest without a provider — an out-of-tree
/// plugin (#64) inspecting declared secrets, for instance — had no way to
/// reach it short of taking the whole `cli` feature or re-parsing the
/// manifest itself. Hidden from the public SDK surface: ordinary callers
/// resolve secrets, not manifests.
#[doc(hidden)]
pub fn config(&self) -> &Config {
&self.config
}

Expand Down
Loading