Refactor secret validation for redability

Mostly applied method extraction to the secret schema validation
function in order to have it more readable.

Change-Id: I1bf35adebc95aadfc4be03400ddd848625569e01
Merge "Refactor secret validation for redability"