Bring a large pot of water to a boil and salt it. Add the cabbage, bring back to a boil and cook until just tender, about 3 minutes; use a slotted spoon or small strainer to fish it out. Drain, and let sit. (You can shock it in a bowl of ice water to keep it on the crisp side but I prefer it soft.) When the water returns to a boil, add the pasta and cook until tender but firm; start checking after 7 minutes. Drain, reserving at least 1 cup of the cooking liquid.
Return the pot to medium heat (no need to rinse it) and add the oil. When it is hot, add the leeks, celery and a heavy pinch of salt and cook, stirring occasionally until soft, 3 to 5 minutes. Add the thyme and prosciutto and stir until fragrant, just a minute or 2.
Add the cabbage, beans and pasta. Add 1 cup of the reserved pasta or bean cooking liquid and cook, stirring once in a while, until the flavors blend and everything is hot, about 5 minutes more. If the mixture dries out, add a little liquid; it should be saucy but not soupy.
Sprinkle with the cheese and toss to combine. Taste and adjust the seasoning. Serve, passing more cheese at the table.