For the duck, weigh the duck legs. You will need 15g/½oz of salt per kilo of duck legs. Place the duck legs into a roasting tray and sprinkle with the salt. Sprinkle over the thyme then covers the tray with cling film and chill in the fridge overnight.Heat a heavy frying pan over a low to medium heat, then add the duck legs to the pan and cover them completely in the duck fat.Bring the duck fat to a gentle simmer and cook the duck legs gently for 2-2½ hours, or until the meat is very tender. Remove the duck legs from the fat, reserving the fat, and place onto a clean roasting tray, draining off any excess fat.Shred the meat from two of the confit duck legs. Set the other two aside. Heat a little of the reserved duck fat in a frying pan over a medium heat. Add the shallot and garlic and fry for 1-2 minutes, or until softened. Add the canned tomatoes, bring the mixture to a simmer and cook for a further 2-3 minutes.
Add the shredded duck meat, flageolet beans, stock and rosemary and return the mixture to the boil. Boil for another 2-3 minute, then season, to taste, with salt and freshly ground black pepper, then whisk in the butter.Heat a little more of the reserved duck fat in a frying pan over a high heat. Add the reserved duck legs, skin-side down, and fry for 2-3 minutes, or until the skin is crisp and the duck meat is warmed through.Meanwhile, for celeriac mash, place the potatoes and celeriac into a pan of salted water and bring to the boil. Reduce the heat and simmer for 15 minutes, or until just tender. Drain well and return to the pan to steam over the heat for one minute.Pass the cooked potatoes and celeriac through a ricer (or mash with a potato masher) until smooth, then return to the pan. Add the butter and cream and mix well, then season, to taste, with salt and freshly ground black pepper. To serve, pile some of the celeriac mash onto each of two serving plates, then spoon the ragoût alongside. Top each portion with a crispy confit duck leg.