Skip to main content

Disclosure

Struct Disclosure 

Source
pub struct Disclosure {
    pub list_accounts: bool,
    pub list_account_ledgers: bool,
    pub get_account_ledger: bool,
    pub stats: bool,
}
Expand description

Per-route configuration for every Credential::Disclosure route: open (public) or closed (operator-only), one flag per route rather than one flag for all of them.

§Why public is the default

listAccounts, listAccountLedgers, getAccountLedger and stats say which agents this deployment runs and what happened to them. Publishing that is this project’s accountability story, not an afterthought: plan/ownership.md exists so a stranger can ask whether an agent traces to a responsible human, and that question has no answer if the deployment that could answer it is also the one deciding whether to be asked. The same argument this project makes elsewhere for publishing what it is doing — so divergence from what was promised is a comparison somebody outside can make — applies here without modification: an operator who wants a quiet server may close a route, but the field a fresh deployment starts from is true.

§Why it is still toggleable

This is a decision for now, not a permanent property. plan/spaces.md names “private means federation off” as an alternative posture a deployment may choose, and disclosure is the same kind of choice at a smaller grain: a deployment running agents on behalf of people who would rather not have every account enumerated by a stranger needs a way to say so. Per-route rather than one switch, because closing the ledger while leaving the roster open — or the reverse — is a plausible posture a single flag cannot express.

§The toggle may only narrow

Every field defaults true. A deployment’s configuration may flip a field to false; nothing may flip one to something wider than true, because there is nothing wider than public — narrowing is the only direction this configuration tier is ever allowed to move in, the same rule that governs every other tier below the operator’s own repository.

§Closing a route is visible, not silent

The threat this default exists to resist is an operator who cannot be audited, and the configuration tier that closes a route is a tier an on-box attacker also reaches — so closing listAccounts is exactly what that attacker would do to hide what a stranger needed to see. This cannot be prevented from here, but it is made visible: auth::require_disclosure answers a closed route with DisclosureDisabled, never a 404 and never an empty list, so an outsider can tell “this server runs no agents” from “this server is not telling you” — two very different facts, and only one of them is suspicious.

Fields§

§list_accounts: bool

Whether a stranger may read which accounts this deployment holds.

Every route that names them alike, not bot.did.listAccounts on its own: com.atproto.sync.listRepos pages through the same accounts, and com.atproto.sync.subscribeRepos announces each one as it appears and as it writes. Closing one and leaving the others would answer DisclosureDisabled over a roster still readable two other ways, which is worse than not offering the toggle: it says the accounts are hidden when they are not.

Closing it costs federation. A relay crawls subscribeRepos, and a deployment that refuses it is not indexed — the trade plan/spaces.md names as “private means federation off”, taken at this grain.

§list_account_ledgers: bool

bot.did.listAccountLedgers.

§get_account_ledger: bool

bot.did.getAccountLedger.

§stats: bool

bot.did.stats.

Trait Implementations§

Source§

impl Clone for Disclosure

Source§

fn clone(&self) -> Disclosure

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Disclosure

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Disclosure

Source§

fn default() -> Self

Every route open, which is this configuration’s own resting state — see Disclosure’s own documentation for why the default is public rather than closed.

Source§

impl PartialEq for Disclosure

Source§

fn eq(&self, other: &Disclosure) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Disclosure

Source§

impl Eq for Disclosure

Source§

impl StructuralPartialEq for Disclosure

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,