1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
//! The `VendorBundle` capability.
//!
//! An agent-fed, vendor-defined attribute bag (a JSON object) the engine
//! transports untouched from the host to a data-path node. The engine never
//! interprets the contents; each consumer defines and reads its own keys.
//! Supplied by an agent-fed extension; token-only scopes do not provide it.
//!
//! Reading this capability separately from `bearer_token_provider` cannot
//! produce an atomic token-and-attributes pair. For consumers whose backend
//! safely rejects mismatched generations, a transient stale-token/fresh-routing
//! pair can be an acceptable eventually-consistent model because the consumer
//! converges on the next refresh. Consumers requiring generation consistency
//! must use
//! [`AgentFedCredentialProvider`](super::auth::agent_fed_credential_provider::AgentFedCredentialProvider).
//!
//! Extensions exposing both capabilities from one configured instance must
//! ensure that per-consumer clones share the same underlying snapshot, typically
//! through an `Arc`-backed state object. The extension ID alone does not enforce
//! shared state across capability handles.
//!
//! Like [`bearer_token_provider`](super::auth::bearer_token_provider), the trait is
//! expanded by the `#[capability]` proc macro into `local` (!Send) and `shared`
//! (Send + Sync) variants, a `SharedAsLocal` adapter, a zero-sized registration
//! handle, and a `KNOWN_CAPABILITIES` distributed-slice entry.
use capability;
use ;
use Arc;
use CapabilityError;
/// Hands out an agent-fed, vendor-defined attribute bag to data-path nodes.