Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions guides/plugins/apps/lifecycle/app-registration-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,37 @@
To prevent failure of in-flight requests during the secret rotation, your app **should accept the old secret in parallel** with the new secret for a short period (e.g., 1 minute). After that grace period, the signatures based on the old secret **must be** considered invalid.
:::

## Requirements

Apps can declare requirements in their manifest that must be met for the app to function properly. For example, an app that communicates with the shop via the Admin API will fail if the shop is not publicly accessible — declaring that upfront avoids a registration attempt that is guaranteed to fail. Shopware validates requirements during installation and updates in `prod` environments. If a requirement is not met, the installation is rejected with a descriptive error before the app attempts registration.

Add a `<requirements>` element to your `manifest.xml`. Each requirement is an empty child element — its presence enables it:

::: code-group

Check warning on line 275 in guides/plugins/apps/lifecycle/app-registration-setup.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] guides/plugins/apps/lifecycle/app-registration-setup.md#L275

File types are normally capitalized. (FILE_EXTENSIONS_CASE[1]) Suggestions: `XML` URL: https://languagetool.org/insights/post/spelling-capital-letters/ Rule: https://community.languagetool.org/rule/show/FILE_EXTENSIONS_CASE?lang=en-US&subId=1 Category: CASING
Raw output
guides/plugins/apps/lifecycle/app-registration-setup.md:275:15: File types are normally capitalized. (FILE_EXTENSIONS_CASE[1])
 Suggestions: `XML`
 URL: https://languagetool.org/insights/post/spelling-capital-letters/ 
 Rule: https://community.languagetool.org/rule/show/FILE_EXTENSIONS_CASE?lang=en-US&subId=1
 Category: CASING

```xml [manifest.xml]

Check warning on line 277 in guides/plugins/apps/lifecycle/app-registration-setup.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] guides/plugins/apps/lifecycle/app-registration-setup.md#L277

File types are normally capitalized. (FILE_EXTENSIONS_CASE[1]) Suggestions: `XML` URL: https://languagetool.org/insights/post/spelling-capital-letters/ Rule: https://community.languagetool.org/rule/show/FILE_EXTENSIONS_CASE?lang=en-US&subId=1 Category: CASING
Raw output
guides/plugins/apps/lifecycle/app-registration-setup.md:277:20: File types are normally capitalized. (FILE_EXTENSIONS_CASE[1])
 Suggestions: `XML`
 URL: https://languagetool.org/insights/post/spelling-capital-letters/ 
 Rule: https://community.languagetool.org/rule/show/FILE_EXTENSIONS_CASE?lang=en-US&subId=1
 Category: CASING
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/shopware/trunk/src/Core/Framework/App/Manifest/Schema/manifest-3.0.xsd">
<meta>
...
</meta>
<requirements>
<public-access/>
</requirements>
</manifest>
```

:::

::: info
Requirements are available since Shopware 6.7.10.0. For the full list of available requirements, see the [manifest reference](../../../../resources/references/app-reference/manifest-reference.md#requirements).
The requirement feature is extensible. We encourage you to contribute new requirements to the Shopware core to allow all app developers to use them.
:::

::: warning
Validation is skipped in `dev` and `test` environments so that local development and CI are not blocked by infrastructure checks.
:::

## Permissions

Shopware comes with the possibility to create fine-grained [Access Control Lists](../administration/../../plugins/administration/permissions-error-handling/add-acl-rules.md) \(ACLs\).
Expand Down
17 changes: 17 additions & 0 deletions resources/references/app-reference/manifest-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,23 @@ Can be omitted if no communication between Shopware and your app is needed. For

<<< @/docs/snippets/config/app/setup.xml

## Requirements

Declare requirements that must be met for your app to function properly (since `6.7.10.0`). This section can be omitted if your app does not need environment preconditions for setup or installation. For more details, see the [requirements section](../../../guides/plugins/apps/lifecycle/app-registration-setup.md#requirements).

<<< @/docs/snippets/config/app/requirements.xml

### Available requirements

#### `public-access` (since 6.7.10.0)

Validates that the Shopware instance is publicly reachable, which is necessary for apps that rely on webhooks or server-to-server communication. This is a best-effort check — a temporary network issue could cause it to fail, and a passing check does not guarantee the condition will hold indefinitely. The validator checks that:

- `APP_URL` is configured and uses HTTPS
- The host is not `localhost`, an IP address, or a reserved domain (`.local`, `.test`, `.example`, etc.)
- The host resolves via DNS to a public IP address
- The health check endpoint (`/api/_info/health-check`) returns HTTP 200
Comment thread
Gaitholabi marked this conversation as resolved.

## Storefront

Can be omitted if your app template needs higher load priority than other plugins/apps. For more details, follow the [storefront guide](../../../guides/plugins/apps/storefront/index.md).
Expand Down
10 changes: 10 additions & 0 deletions snippets/config/app/requirements.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/shopware/trunk/src/Core/Framework/App/Manifest/Schema/manifest-3.0.xsd">
<meta>
...
</meta>
<requirements>
<public-access/>
</requirements>
</manifest>
Loading