code: private static Authorizations getScanAuthorizations(ConnectorSession session, AccumuloSplit split, Connector connector, String username)
              throws AccumuloException, AccumuloSecurityException
      {
          String sessionScanUser = AccumuloSessionProperties.getScanUsername(session);
          if (sessionScanUser != null) {
              Authorizations scanAuths = connector.securityOperations().getUserAuthorizations(sessionScanUser);
              LOG.debug("Using session scanner auths for user %s: %s", sessionScanUser, scanAuths);
              return scanAuths;
          }
  
          Optional<String> scanAuths = split.getScanAuthorizations();
          if (scanAuths.isPresent()) {
              Authorizations auths = new Authorizations(Iterables.toArray(COMMA_SPLITTER.split(scanAuths.get()), String.class));
              LOG.debug("scan_auths table property set: %s", auths);
              return auths;
          }
          else {
              Authorizations auths = connector.securityOperations().getUserAuthorizations(username);
              LOG.debug("scan_auths table property not set, using user auths: %s", auths);
              return auths;
          }
      }
docs: Gets the scanner authorizations to use for scanning tables.
  <p>
  In order of priority: session username authorizations, then table property, then the default connector auths.
  
  @param session Current session
  @param split Accumulo split
  @param connector Accumulo connector
  @param username Accumulo username
  @return Scan authorizations
  @throws AccumuloException If a generic Accumulo error occurs
  @throws AccumuloSecurityException If a security exception occurs