def secret_errors(vol_desc):
    """Sanity check a Secret volume description and return a string for
       the first problem found.  Return None if no problem is found.

    """
    required_fields = ['secret_name']
    accepted_fields = ['secret_name', 'items', 'default_mode', 'optional']
    secret = vol_desc.get('secret', None)
    if secret is None:
        return "No secret specification in secret volume description"
    for field in required_fields:
        if field not in secret.keys():
            return "Secret specification missing required '%s'" % field
    for field in secret.keys():
        if field not in accepted_fields:
            return "Secret specification has unrecognized '%s'" % field
    return None