Securing your app, together

Oh I misunderstood!
That’s a great ask actually, I’ll request that now.

I thought about removing that dependency, but still have hope that Shopify will see the value in putting more resources in those libraries, particularly from a security and DX point of view.

The core idea of shopify_app was good. It was the churn in documentation and poor DX that caused most of the pain. Thinking purely in DX, this is what I would love to have:

# In some authenticated controller.
@shop.with_session { ShopifyAPI.fetch_something }

This is basically what shopify_app already provides. I just want with_session to handle all the plumbing automatically: fetch new token, retry, app token, refresh token, whatever. What happens in that layer should not matter. “Disk defragmentation. No end-user should have to know about that” always comes to mind.

And second something like this:

# In a separate, or even the same process.
ShopifyApp.every(1.hour).do_token_maintenance(on_error: -> (err) { notify_me(err) })

The benefit of something like this would mean any update/patch to the token acquisition method could be delivered via a dependency update + documentation, with less time spent on the plumbing.

@zeroxtlt, I’ve been able to confirm that we won’t be going forward with supporting that through the shopify.app.toml due to security concerns with that approach.

@Paige-Shopify thanks for checking, I appreciate the follow-up.

Could you share a bit more about the security concern? If the worry is that anyone with CLI access could widen the allowlist, that’s already true today for scopes, redirect URLs and webhooks, and in our setup the TOML is protected by PR review and branch protection, which is arguably stronger than a Dashboard toggle anyone with app access can change.

Either way, we really need a way to manage this outside the Dashboard. We run dev, staging and prod apps for many clients, so setting allowlists by hand doesn’t scale, drifts when a server’s egress IP changes, and leaves no audit trail.

Would any of these be on the table?

  1. A Partner/App Management API endpoint to read and update the IP allowlist
  2. A dedicated CLI command (e.g. shopify app ip-allowlist set) gated behind stronger auth or a confirmation step
  3. At minimum, an API to read the current allowlist, so CI can detect drift and alert us

Happy to give more detail on our workflow if it helps the team.

@Paige-Shopify has metafield_tag changed how it renders rich_text_field metafields?

When I tested it on October 22, it kept link URLs as they were. Today, on the same dev store, with the same values and the same Liquid, it renders those links as plain text. https links still render as links.

Is this change live on all stores, and can apps rely on it? It would help to see it in the metafield_tag docs.