Heat oven to 350 degrees F. Place duck on a double thickness of aluminum foil, enough to completely wrap it. Stir 2 tbsp oil, 2 tsp tamarind, 1 tbsp salt and shrimp paste in a bowl. Rub mixture all over outside of duck. Set aside.
Puree remaining oil and tamarind, plus sugar, kecap manis, garlic, shallots, candlenuts, chiles, galangal, ginger, turmeric, and salt in a food processor until smooth. Stir in curry leaves.
Stuff half the paste inside duck and rub remaining paste on outside. Wrap tightly in foil and place in a roasting pan; bake until an instant-read thermometer inserted into thickest part of leg reads 175 degrees F (about 1 1/2 hours).
Remove foil and increase oven temperature to 450 degrees F. Bake until duck is brown and slightly crisp (25–30 minutes). Rest 20 minutes before carving.
Garnish with Kaffir lime leaves and serve with cooked rice, sliced cucumber and tomatoes, if you like.