Skip to content

Installer offers Elasticsearch 7 (rejected by setup:install) and a 2FA-disable step that fails on 4.0.0 #437

Backlog

Description

@DavidLambauer

Preconditions and environment

  • Mage-OS 4.0.0
  • bin/magento install, the interactive installer

Steps to reproduce

  1. Run bin/magento install without a running OpenSearch (so nothing is detected) and look at the search engine question.
  2. Choose Elasticsearch 7.
  3. In a second run, answer yes when the installer offers to disable two-factor authentication.

Expected result

  • The installer only offers engines that setup:install accepts, and suggests OpenSearch, the default engine.
  • Disabling 2FA works, or the installer explains what else has to be disabled.

Actual result

Found by reading the 4.0.0 code; I haven't run every path.

  1. Search engine:

    • SearchEngineConfig offers elasticsearch7 (SearchEngineConfig.php#L65-L67, L133-L135), but setup:install only accepts elasticsearch8 and opensearch (SearchConfigOptionsList.php#L152-L153). The installation therefore fails after all the questions have been answered.
    • When nothing is detected, the default is elasticsearch8 (L127), which 4.0.0 marks as deprecated ("Elasticsearch8 is no longer supported by Adobe").
  2. Disabling 2FA: TwoFactorAuthConfigurer runs module:disable Magento_AdminAdobeImsTwoFactorAuth Magento_TwoFactorAuth (TwoFactorAuthConfigurer.php#L51). This fails for two reasons:

    • Magento_AdminAdobeImsTwoFactorAuth doesn't exist in Mage-OS 4.0.0, so module:disable stops with "Unknown module(s)".
    • MageOS_PasskeyAuth declares Magento_TwoFactorAuth in its module.xml sequence, so Magento_TwoFactorAuth can only be disabled together with MageOS_PasskeyAuth.

    The fallback hint (bin/magento module:disable Magento_TwoFactorAuth, L68) fails for the same reason.

Additional information

Possible fixes:

  • drop elasticsearch7, default to opensearch, and mark Elasticsearch 8 as deprecated in the choice list;
  • run module:disable MageOS_PasskeyAuth Magento_TwoFactorAuth, and update the hint and the re-enable hint at L46 to match.

Found while documenting the installer for the devdocs (mage-os/devdocs#108).

Triage and priority

  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions