Backport part of Introduce Gitlab::Encryption::KeyProvider for e... (!186541 - merged) • Rémy Coutable • 17.11 to %17.9.