refactor role validation, configuration validation