Package com.svenruppert.jsentinel.bootstrap
package com.svenruppert.jsentinel.bootstrap
-
ClassDescriptionApplication-side seam used by
InitialAdminBootstrapServiceto answer "is anyone an administrator?"Bootstrap configuration record.LoadsBootstrapConfigurationfrom system properties and environment variables.Operating mode of the first-run bootstrap mechanism.One-shot startup orchestrator.Persistent first-run-bootstrap state for one tenant.Single source of truth for "is the system uninitialized?".Persistent store forBootstrapStateper tenant.Adapter-neutral, leak-safe view of the bootstrap state.One-time bootstrap token.Generates freshBootstrapTokens usingSecureRandomand a 32-character ambiguity-free alphabet (dropsO 0 I 1).Tells the operator how to obtain the current bootstrap token.Storage for the current bootstrap token.Prints a one-time setup banner with the actual bootstrap token to the server console.Command consumed byInitialAdminBootstrapService.createInitialAdmin(CreateInitialAdminCommand).Tells the operator that the token has been written to a file.File-backed token store forBootstrapMode.PERSISTENT_FILE.Single-entry orchestrator that converts aCreateInitialAdminCommandinto either a freshly created administrator or a non-leaking failure code.In-memory token store used byBootstrapMode.TRANSIENT_CONSOLE.Trivial password policy that only enforces a minimum length.Carrier record handed toAdministratorAccountStore.createAdministrator(NewAdministrator).Validates a candidate password against the minimum acceptance rules.Bootstrap-state service backed by aBootstrapStateStore.