Put the beans with about 5 tablespoons of the canned water, the corn kernels and the finely chopped cucumber in a bowl. Fold in the finely chopped onion. Mix the ketchup, tomato paste and vinegar together and add to the bowl. Mix everything together well and season with salt and cayenne pepper. If the dressing is too thick, stretch with a little water.
The salad should be covered for about 1 hour before serving. If you like, you can also add some chopped paprika.