Skip to content

Conversation

@larskemper
Copy link
Member

@larskemper larskemper commented Nov 26, 2025

resolves shopware/shopware#13670

SwagMigrationConnector pr: shopware/SwagMigrationConnector#5

This pull request introduces a fingerprinting mechanism for migration connections to prevent duplicate source system connections.

Strategy

Shopware 6

For Shopware 6 connections, we use the shopIdV2 property from system_config as the connection fingerprint. This ID uniquely identifies every Shopware 6 shop.

Shopware 5

Since Shopware 5 doesn't have a shopId and the SBP identifies shops by domain, we extract esdKey and installationDate from s_core_config_elements, hash them together, and use the resulting hash as the connection fingerprint:

  • esdKey: An automatically generated identifier for Shopware 5 shops, present after initial installation. In Shopware 5, it's used to generate serial numbers for digital products. (Note: Theoretically editable by the shop owner, but this is highly unlikely in practice.)
  • installationDate: The datetime set during the Shopware 5 installation process.

=> we can of course use other fields and hash them if you have a idea for more appropriate ones

@larskemper larskemper self-assigned this Nov 26, 2025
@larskemper larskemper changed the title feat: prevent multiple connections to the same shop feat: prevent multiple connections to the same system Nov 26, 2025
@larskemper larskemper marked this pull request as ready for review November 26, 2025 14:13
@larskemper larskemper marked this pull request as draft December 1, 2025 07:46
@larskemper larskemper marked this pull request as ready for review December 2, 2025 15:01
@larskemper larskemper requested a review from MalteJanz December 2, 2025 15:07
@larskemper larskemper requested a review from MalteJanz December 17, 2025 13:38
@larskemper larskemper marked this pull request as ready for review December 17, 2025 13:38
Copy link
Contributor

@MalteJanz MalteJanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides my comments it looks great now. Thanks for refactoring it another time 💪

@larskemper larskemper merged commit a288248 into feature/migration-logging-refactor Dec 17, 2025
12 checks passed
@larskemper larskemper deleted the feat/prevent-multiple-connections-to-same-source-shop branch December 17, 2025 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants