Interface BootstrapStateStore

All Known Implementing Classes:
InMemoryBootstrapStateStore

@ExperimentalJSentinelApi public interface BootstrapStateStore
Persistent store for BootstrapState per tenant.

Used by the first-run admin bootstrap flow to record exactly once when an administrator was first created in a tenant. Where the existing BootstrapTokenStore owns the short-lived bootstrap token (a credential), this store owns the long-lived bootstrap state (a fact).

Implementations must be thread-safe.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    delete(TenantId tenant)
    Removes the recorded state for tenant.
    find(TenantId tenant)
    Returns the recorded bootstrap state for tenant.
    void
    Persists or replaces the bootstrap state.
  • Method Details

    • find

      Returns the recorded bootstrap state for tenant.
      Parameters:
      tenant - tenant scope; must not be null
      Returns:
      state, if recorded
    • save

      void save(BootstrapState state)
      Persists or replaces the bootstrap state. Keyed on BootstrapState.tenant().
      Parameters:
      state - state to save; must not be null
    • delete

      boolean delete(TenantId tenant)
      Removes the recorded state for tenant.
      Parameters:
      tenant - tenant scope; must not be null
      Returns:
      true if state was removed, false when none existed