Dev.to Security 🔐 Cybersecurity 👁 0 📖 3 min read

Medusa Admin API keys are store control-plane credentials

Medusa Admin API keys are store control-plane credentials Medusa separates its storefront from the administrative API. The admin API documentation describes bearer JWT authentication, an admin user's API token, and coo

Medusa Admin API keys are store control-plane credentials

Medusa separates its storefront from the administrative API. The admin API documentation describes bearer JWT authentication, an admin user's API token, and cookie sessions as accepted authentication methods. API key concepts document that admin API keys are created by authorized admin users and are useful for operations such as creating orders or managing products.

That makes a Medusa deployment a two-surface system. The storefront may be intentionally public, while the admin API controls catalog, orders, customers, and settings. A ZoomEye match should not be classified by the storefront's visibility alone. The high-value review target is the administrative panel and any route that accepts an admin API key.

The admin API and the storefront can share a domain or run on separate hosts. A reverse proxy may expose /store to the internet and leave /admin on the same origin with weaker network controls. The product documentation says all admin API routes are prefixed with /admin, which gives a useful inventory check but not proof of authorization.

Query plan

Use the candidate product phrase app="Medusa" and the more specific title title="Medusa Admin" with sub_type=all, page 1, and page size 1. The title query is narrower and may miss deployments that use a custom title. The application query may include storefronts that do not expose the admin interface. Live counts were not collected in this run because the ZoomEye execution path was not approved; no numeric exposure is claimed.

When a later measurement is approved, record both results and the exact collection time. Do not assume that an app match grants administrative reach. Verify the response and ownership record first.

Review the key hierarchy

List admin users, roles, and API keys. Record who created each key, which store or environment it targets, and whether it is active. Remove keys that cannot be linked to a current integration. Test key revocation and key rotation in a test environment before changing production.

The Medusa documentation describes JWT, API key, and cookie-session paths. Confirm that each path has the intended CORS policy, cookie attributes, expiration, and logout behavior. A strong admin password does not compensate for an API key with broad permissions and no owner.

Use the RBAC documentation to verify whether store operations are partitioned by role. If enterprise RBAC is available, test a role that should be read-only. The protected-route guidance describes authentication middleware and actor types, which is useful for reviewing custom routes. A custom route that accepts an admin session but skips the intended authorization check is a local code-review issue, not a product fingerprint result.

Secure the edge

Put the admin dashboard and /admin API behind an access policy that matches the operator population. Consider a VPN, identity-aware proxy, or network allowlist, but do not treat those controls as a replacement for authentication. The public storefront should not be able to forward a request into the admin path through an overly broad proxy rule.

Inspect CORS and cookie settings for cross-site risks. An admin session that is accepted from an untrusted origin can be abused through a browser even when the API key path is separate. Test with an unauthenticated browser and an expired session. Verify that errors do not disclose stack traces or configuration values.

Review logs for admin API key creation, login, product changes, order changes, and failed authorization. Keep the audit data separate from the storefront analytics. A compromised admin key can create a believable order or product change without touching the public checkout.

Respond with the business context

Identify the organization, store, and deployment owner before taking action. If an admin surface is unexpectedly reachable, disable public access at the edge, rotate exposed keys, and review recent orders and catalog changes. Preserve evidence before deleting a suspicious key or account.

Medusa's public storefront can be a healthy part of the business. The admin API is a different control plane. Inventory the product, then review the people and keys that can change the store.

References

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.