MB-17
refactoring cloud credentials functions