Combine the cayenne, cumin, coriander, turmeric, pepper, and 1/2 tsp of salt in a small bowl and mix well.
Sprinkle half of the spice mixture over the chicken pieces, rubbing in to coat well. Set aside coated chicken and remaining spice mixture. Be careful with the spices, as turmeric will leave a yellow stain if it gets on clothing!In a dutch oven, heat 2 tbsp oil over medium-high heat.
Add chicken, skin side down, and cook 8-10 minutes, turning occasionally, until well-browned.
Remove chicken to a shallow bowl, cover, and set aside.Spoon off some of the oil from the Dutch oven, leaving about 2 tbsp, taking care not to remove any of the browned bits left from the chicken. Reheat the oil and saute the ginger slices for about 30 seconds, turning and pressing down to release the juices.
Add garlic and saute, stirring and turning constantly, until golden brown (about 30-45 seconds). If it gets too hot and starts to darken, just add a 1/4 cup or so of water and deglaze (beware of splatters!).
Add onion and remaining spice mixture to pan.
Saute until onion is tender, about 1 minute.
Add rice and toss until coated with spiced oil and beginning to turn translucent.
Add the water and 1 1/2 tsp salt to rice. Bring to a boil over high heat, stirring occasionally to prevent sticking. Boil rice until surface is dry and grains begin to swell, about 5-7 minutes.Reduce heat to low. Return chicken to pan, burying each piece near the bottom of the pan under the rice.
Add any juices that have collected in the bowl to the pan. Smooth surface of rice to hide chicken completely. Cover pan and cook over low heat until rice is tender and chicken is cooked through, about 30 minutes.Meanwhile, in a small wok or skillet, pour in oil to a depth of 2 inches.
Heat over medium-high heat until hot but not smoking (to test, drop a piece of shallot in oil; if it sizzles right away, the oil is ready).
Sprinkle sliced shallots over the hot oil and, with a fork, separate the rings and turn them over quickly. When most of the shallots are golden brown, remove with a slotted spoon to a paper towels to drain. When cool enough to touch, spread out on a small plate and set aside, uncovered.When the rice and chicken are done, remove from heat and let stand, covered, for about 15 minutes. Meanwhile, prepare sauce and garnishes.In a small glass mixing bowl, combine vinegar, sugar, and 1/2 tsp salt, stirring until dissolved and thickened.
Sprinkle chilie slices over sauce and transfer to a small, non-reactive serving bowl.To serve, remove chicken from rice, scraping away any clinging rice grains, and set aside. Fluff the rice with a fork, remove and discard the ginger slices, and mound on a serving platter. Arrange chicken pieces on the platter.
Garnish with cucumber slices, cilantro leaves, and crispy shallots.