In a large Dutch oven or stock pot, sauté the onions and garlic in olive oil over medium-low heat until translucent, about 5 to 10 minutes. Add any fresh herbs and stir for 1 minute.
If using, add mushrooms and sauté until the water is released and they brown, about 5 minutes.
Add tomatoes, if using. Break them up with the back of a wooden spoon and cook for about 5 to 10 minutes until cooked down.
If using tomato paste, add now, cook and stir for a few minutes until it turns from bright red to brick red.
Add soaked beans, if using. Cover them with 3 inches of water or broth. If you are adding cheese rinds, add them now. Add salt and any dried herbs. Cover the pot with the lid. Bring the beans to a boil, then turn them down to a simmer and cook covered for about an hour until tender. Stir occasionally while they cook.
Add chopped vegetables and, if using, dry grains and cooked beans. Add more water or broth to cover the ingredients. Bring them to a boil, then turn down to simmer. Cover and cook for 15 to 20 minutes until the vegetables are tender.
At the end of cooking, add any leafy greens.
Season the soup to taste with vinegar or lemon juice. Taste and add more vinegar or salt or pepper if needed.