The present application relates generally to the field of coatings and more specifically to providing a coating which provides protection against corrosion and tribocorrosion. The provision of the coating comprises applying a wear resistant coating to the surface, immersing the surface in a precursor solution having an electrolyte, and applying an electrical potential to the surface to cause electrodeposition. The electrolyte may also function as an inhibitor and may be based on rare earth metals. pH may be in the range of 4.5-8.5. The precursor solution may be a sol-gel. Also claimed is a surface having a first layer of wear resistant and/or hard material and infused second layer of corrosion resistant material where the second material covers the first layer and fills pores in first layer.