  def _AuthorizationCheck(self) -> None:
    """Checks the authorization of this cluster's API client.

    Performs a check as per `kubectl auth can-i '*' '*' --all-namespaces`,
    logging a warning if the check did not return 'yes'.
    """
    api = self._Api(client.AuthorizationV1Api)
    response = api.create_self_subject_access_review(
        # Body from `kubectl auth can-i '*' '*' --all-namespaces`
        {'spec': {
            'resourceAttributes': {
                'verb': '*', 'resource': '*'
            }
        }})
    if not response.status.allowed:
      logger.warning(
          'This object\'s client is not authorized to perform all operations'
          'on the Kubernetes cluster. API calls may fail.')
Checks the authorization of this cluster's API client.

Performs a check as per `kubectl auth can-i '*' '*' --all-namespaces`,
logging a warning if the check did not return 'yes'.
libcloudforensics/providers/kubernetes/cluster.py