The mystery of the security chief’s resignation

Ostensibly the resignation of Domenico Giani was a consequence of the leaking of the names of five suspended Vatican officials, but did it really? Or was it because of friction between the Secretariat of State and the Vatican’s finance departments? Or is it because Giani really did know too much about corruption in the Vatican, making him too powerful?