Class DevelopmentAdminReset

java.lang.Object
com.iizix.server.user.DevelopmentAdminReset

public final class DevelopmentAdminReset extends Object
The development-only reset of the administrator's sign-in factors (CC-SERVERADMIN-DEV-RESET, the owner's rulings RS-1 to RS-7 of 2026-10-08): a development server started with the system property -D"com.iizix.serveradmin.reset"="1" deletes, at every start while the option is set, what keeps everyone but the enrolled person out of iiziAdmin - so that a rig, a second person or a Browser check can sign in to ServerAdmin on a developer's server once more.

What goes (RS-3), in one transaction, after the database is open and before the first session is admitted (JettyRunConfiguration.onStartServer, right after SeedPasswordCheck):

The pending sign-ins and enrolments (the held sign-ins, enrolments and proofs of UserMFA, the passkey challenges of PasskeyService) live in memory keyed by session and are empty at a start by construction. The password, the language and every other profile setting are kept (RS-5): after the reset, sign-in runs the normal code. A table the database does not have is looked for, never created.

Who (RS-4): iiziAdmin only, the account createBaseTables.sql creates, found by its name; no other member of the administrators group is touched.

When (RS-1, RS-2): the property alone decides, and exactly the value "1"; any other value is off, and nothing in a request, a settings file or the database can set it. A built server (Tycho, Jenkins, shipped) that finds it logs one SEVERE and changes nothing: the mode is SystemConfig.isDevelopmentMode, as SeedPasswordCheck tells it (AP-6).

Loud (RS-6): one WARNING at every start with the option, with the count per kind of what was deleted - never a secret - and the word to remove the option.

The kill switch (the owner, 2026-10-08): ENABLED, in this one place. With it null the feature is gone: run() returns at once and the property is not even read.

Author:
Christopher Mindus
  • Field Details

    • ENABLED

      public static final Object ENABLED
      The kill switch of the whole feature, in this one place: Integer.valueOf(1) builds the reset in, null removes it - run() answers DevelopmentAdminReset.Outcome.OFF at once and the property "com.iizix.serveradmin.reset" is not read. A final Object rather than a compile-time constant on purpose: a test hands run(Object) either value, and nothing that reads this field is inlined by the compiler.
    • PROPERTY

      public static final String PROPERTY
      The system property: "com.iizix.serveradmin.reset"="1" at the start of a development server, read at every start. Only whoever starts the server can set it.
      See Also:
    • ON

      public static final String ON
      The one value of the property that turns the reset on: "1". Any other value is off.
      See Also:
  • Method Details

    • run

      public static DevelopmentAdminReset.Result run()
      Runs the reset at the start of the server, as ENABLED and the property say. A failure is logged and never stops the start.
      Returns:
      What was done.