def _extract_permission_data(permission):
    """Extract resource type and operation from permission."""
    perm_components = permission.split(":")
    if len(perm_components) != 3:
        raise ValueError("Invalid permission definition.")
    res_typ = perm_components[1]
    operation = perm_components[2]
    return (res_typ, operation)