Skip to content

Duplicate tests for realm config wiring: JwtRealmAuthIT vs SecurityRealmSettingsTests  #84576

Open

Description

Description

Question (@justincr-elastic):

Why are there duplicate integration tests for checking realm config wiring?

x-pack/plugin/security/qa/smoke-test-all-realms/build.gradle (Used by JwtRealmAuthIT.java)

  setting 'xpack.security.authc.realms.file.file0.order', '0'
  setting 'xpack.security.authc.realms.native.native1.order', '1'
  setting 'xpack.security.authc.realms.ldap.ldap2.order', '2'
  setting 'xpack.security.authc.realms.active_directory.ad3.order', '3'
  setting 'xpack.security.authc.realms.pki.pki4.order', '4'
  setting 'xpack.security.authc.realms.saml.saml5.order', '5'
  setting 'xpack.security.authc.realms.kerberos.kerb6.order', '6'
  setting 'xpack.security.authc.realms.oidc.openid7.order', '7'
  setting 'xpack.security.authc.realms.jwt.jwt8.order', '8'

x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/authc/SecurityRealmSettingsTests.java

.put("xpack.security.authc.realms.file.file1.order", 1)
.put("xpack.security.authc.realms.native.native1.order", 2)
.put("xpack.security.authc.realms.ldap.ldap1.order", 3)
.put("xpack.security.authc.realms.active_directory.ad1.order", 4)
.put("xpack.security.authc.realms.pki.pki1.order", 5)
.put("xpack.security.authc.realms.saml.saml1.order", 6)
.put("xpack.security.authc.realms.kerberos.kerb1.order", 7)
.put("xpack.security.authc.realms.oidc.oidc1.order", 8)
.put("xpack.security.authc.realms.jwt.jwt9.order", 9)

Response (@tvernum):

I think we can consider SecurityRealmSettingsTests to be obsolete. The QA test is better because it actually starts a real node.
I think it's worth opening an issue to review whether the QA test covers everything that is in SecurityRealmSettingsTests and then delete SecurityRealmSettingsTests.

Context:

Found during PR #84249: Add smoke test for JWT realm wiring
Link to Tim's comment: #84249 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions