Heat the olive oil in a large pot over medium heat.
Add the chopped pancetta and allow it to brown for about 5 minutes, stirring occasionally.
Add the chopped onion and minced garlic to the pot.
Cook until the onion is soft, about 3-5 minutes.
Stir to combine everything well.
Pour in the tomatoes and chicken stock, followed by the rosemary sprigs.
Bring the mixture to a rapid boil.
Stir in the ditalini pasta and reduce the heat to medium.
Cook for about 6-8 minutes or until the pasta is al dente.
Add the cannellini beans and remove the rosemary sprigs before serving.
Season with salt and pepper to taste and let the soup cool slightly before serving.
Serve hot or at room temperature.