These are all fine in small amounts and if cooked.Legumes such as soy products and beans contain phytate, which inhibits the digestion and absorption of other nutrients including important minerals. If you're going to feed legumes of any kind, make sure they're well-cooked, because that does help break down the phytate.
Some beans can also cause gas in dogs just like in humans.
I hope this helps, please reply back if you have additional questions
You are very welcome.
Have a great rest of your weekend