2) Score the ham in a diamond pattern through the skin and fat, taking care not to cut into the meat. Add the ham to the brine, weighing it down with a plate to keep it submerged, and refrigerate for at least 4 but no more than 8 hours.
3) Drain, rinse, pat the ham dry and refrigerate. One hour before roasting, remove the ham from the refrigerator.
4) For the rub, pulse the olive oil, mustard, parsley, sage, garlic, red pepper, salt and black pepper in a food processor to make a paste. Rub it all over ham.
5) Preheat the oven to 230C/Gas 8. In a large roasting pan toss the onion wedges with 250ml of the apple cider, and set the ham on top. Roast the ham for 30 minutes
6) Reduce the oven temperature to 165C/Gas 3 and roast until an instant-read thermometer inserted into the thickest part registers 68C, about 4 hours. After the first hour, loosely wrap aluminium foil around the bone to keep it from burning.
7) Meanwhile, for the glaze, boil, then simmer, the remaining apple cider in a saucepan, skimming as needed, until syrupy and reduced to about 500ml, about 1.5 hours.
8) During the last 1.5 hours of cooking the ham, brush it with the glaze every 30 minutes. Transfer the cooked ham to an ovenproof platter and let it rest in the turned-off oven for 30 minutes. Loosely cover the onions in a bowl, and put them in the oven as well.
9) Strain the pan juices into a saucepan, skim off any excess fat, and bring to a boil. Make a paste with the flour and butter and whisk a bit at a time into the juices. Boil until thick. Carve the ham and serve with the onions and sauce.