Started failing since Feb 23. Failed 24 times since then. 

Error message
```
java.lang.AssertionError: One or more realm type are not configured [file, ldap, native, jwt, saml, kerberos, oidc, active_directory, pki]	
Expected: iterable with items ["saml", "pki", "active_directory", "native", "ldap", "oidc", "kerberos", "file"] in any order	
     but: not matched: "jwt"
```

**Build scan:**
https://gradle-enterprise.elastic.co/s/2vka6xxi4qcvc/tests/:x-pack:plugin:security:internalClusterTest/org.elasticsearch.xpack.security.authc.SecurityRealmSettingsTests/testClusterStarted

**Reproduction line:**
`./gradlew ':x-pack:plugin:security:internalClusterTest' --tests "org.elasticsearch.xpack.security.authc.SecurityRealmSettingsTests.testClusterStarted" -Dtests.seed=6082151451A37D92 -Dbuild.snapshot=false -Dtests.jvm.argline="-Dbuild.snapshot=false" -Dtests.locale=nb-NO -Dtests.timezone=America/Buenos_Aires -Druntime.java=17`

**Applicable branches:**
master

**Reproduces locally?:**
Didn't try

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.xpack.security.authc.SecurityRealmSettingsTests&tests.test=testClusterStarted

**Failure excerpt:**
```
java.lang.AssertionError: One or more realm type are not configured [file, ldap, native, jwt, saml, kerberos, oidc, active_directory, pki]
Expected: iterable with items ["saml", "pki", "active_directory", "native", "ldap", "oidc", "kerberos", "file"] in any order
     but: not matched: "jwt"

  at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
  at org.junit.Assert.assertThat(Assert.java:956)
  at org.elasticsearch.xpack.security.authc.SecurityRealmSettingsTests.nodeSettings(SecurityRealmSettingsTests.java:111)
  at org.elasticsearch.test.ESIntegTestCase$1.nodeSettings(ESIntegTestCase.java:1985)
  at org.elasticsearch.test.InternalTestCluster.getSettings(InternalTestCluster.java:468)
  at org.elasticsearch.test.InternalTestCluster.getNodeSettings(InternalTestCluster.java:707)
  at org.elasticsearch.test.InternalTestCluster.reset(InternalTestCluster.java:1148)
  at org.elasticsearch.test.InternalTestCluster.beforeTest(InternalTestCluster.java:1085)
  at org.elasticsearch.test.ESIntegTestCase.lambda$beforeInternal$0(ESIntegTestCase.java:358)
  at com.carrotsearch.randomizedtesting.RandomizedContext.runWithPrivateRandomness(RandomizedContext.java:187)
  at com.carrotsearch.randomizedtesting.RandomizedContext.runWithPrivateRandomness(RandomizedContext.java:211)
  at org.elasticsearch.test.ESIntegTestCase.beforeInternal(ESIntegTestCase.java:367)
  at org.elasticsearch.test.ESIntegTestCase.setupTestCluster(ESIntegTestCase.java:2194)
  at jdk.internal.reflect.GeneratedMethodAccessor10.invoke(null:-1)
  at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:568)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:980)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
  at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:44)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:375)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:824)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:475)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:955)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:840)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:891)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:902)
  at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:375)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:831)
  at java.lang.Thread.run(Thread.java:833)

```
x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/RealmsTests.java
final boolean disabled = randomBoolean();
        if (disabled) {
            builder.put("xpack.security.authc.realms." + type + ".native.enabled", false);
        }
        return disabled;
    }
    private void assertImplicitlyAddedBasicRealms(Iterator<Realm> iter, boolean fileRealmDisabled, boolean nativeRealmDisabled) {
        Realm realm;
        if (false == fileRealmDisabled && false == nativeRealmDisabled) {
            assertTrue(iter.hasNext());
            realm = iter.next();
            assertThat(realm.type(), is(FileRealmSettings.TYPE));
            assertThat(realm.name(), is(FileRealmSettings.DEFAULT_NAME));
            assertTrue(iter.hasNext());
            realm = iter.next();
            assertThat(realm.type(), is(NativeRealmSettings.TYPE));
            assertThat(realm.name(), is(NativeRealmSettings.DEFAULT_NAME));
        } else if (false == fileRealmDisabled) {
            assertTrue(iter.hasNext());
            realm = iter.next();
            assertThat(realm.type(), is(FileRealmSettings.TYPE));
            assertThat(realm.name(), is(FileRealmSettings.DEFAULT_NAME));
        } else if (false == nativeRealmDisabled) {
            assertTrue(iter.hasNext());
            realm = iter.next();
            assertThat(realm.type(), is(NativeRealmSettings.TYPE));
            assertThat(realm.name(), is(NativeRealmSettings.DEFAULT_NAME));
        }
    }
    static class DummyRealm extends Realm {