My diet:
Comparison

Carnauba Wax vs Shellac

The short answer
Both make candy shiny. Carnauba wax comes from palm leaves and fits every diet; shellac ("confectioner's glaze") is made by insects, so it isn't vegan and its halal and kosher status depends on the certifier.
Side by sideCarnauba WaxShellac (Confectioner's Glaze)
Safety score88/100 Generally safe80/100 Generally safe
Made fromLeaves of the Brazilian carnauba palmResin from lac insects
VeganYes ✓ BetterNo
Halal and kosherYes ✓ BetterDepends on the certifier
FinishHard, high glossGlossy, seals in moisture
Found onGummies, jelly beans, chocolate candies, fruitJelly beans, candy corn, coated chocolates, fruit, pills
Safety score88 ✓ Better80

Swapping one for the other

Many vegan and gelatin-free candies already use carnauba wax. On a label, "confectioner's glaze", "pharmaceutical glaze" and "resinous glaze" all mean shellac.

Common questions

Is beeswax a vegan alternative?

No. Beeswax (E901) comes from bees, so strict vegans avoid it too. Carnauba and candelilla wax are the plant options.