public static void checkAndEnrichSinkAuthentication(
      final ConfigNodeProcedureEnv env, final Map<String, String> connectorAttributes) {
    final PipeParameters connectorParameters = new PipeParameters(connectorAttributes);

    final String pluginName =
        connectorParameters
            .getStringOrDefault(
                Arrays.asList(PipeConnectorConstant.CONNECTOR_KEY, PipeConnectorConstant.SINK_KEY),
                BuiltinPipePlugin.IOTDB_THRIFT_SINK.getPipePluginName())
            .toLowerCase();

    if (!pluginName.equals(BuiltinPipePlugin.WRITE_BACK_CONNECTOR.getPipePluginName())
        && !pluginName.equals(BuiltinPipePlugin.WRITE_BACK_SINK.getPipePluginName())) {
      return;
    }

    if (connectorParameters.hasAttribute(PipeConnectorConstant.CONNECTOR_IOTDB_USER_KEY)
        || connectorParameters.hasAttribute(PipeConnectorConstant.SINK_IOTDB_USER_KEY)
        || connectorParameters.hasAttribute(PipeConnectorConstant.CONNECTOR_IOTDB_USERNAME_KEY)
        || connectorParameters.hasAttribute(PipeConnectorConstant.SINK_IOTDB_USERNAME_KEY)) {
      final String hashedPassword =
          env.getConfigManager()
              .getPermissionManager()
              .login4Pipe(
                  connectorParameters.getStringByKeys(
                      PipeConnectorConstant.CONNECTOR_IOTDB_USER_KEY,
                      PipeConnectorConstant.SINK_IOTDB_USER_KEY,
                      PipeConnectorConstant.CONNECTOR_IOTDB_USERNAME_KEY,
                      PipeConnectorConstant.SINK_IOTDB_USERNAME_KEY),
                  connectorParameters.getStringByKeys(
                      PipeConnectorConstant.CONNECTOR_IOTDB_PASSWORD_KEY,
                      PipeConnectorConstant.SINK_IOTDB_PASSWORD_KEY));
      if (Objects.isNull(hashedPassword)) {
        throw new PipeException("Authentication failed.");
      }
      connectorParameters.addOrReplaceEquivalentAttributes(
          new PipeParameters(
              Collections.singletonMap(
                  PipeConnectorConstant.SINK_IOTDB_PASSWORD_KEY, hashedPassword)));
    }
  }
Check the {@link PipePlugin} configuration in Pipe. If there is an error, throw {@link
PipeException}. If there is a Pipe with the same name and there is no IfNotExists condition in
{@link #createPipeRequest}, throw {@link PipeException}. If there is an IfNotExists condition,
return {@code false}. If there is no Pipe with the same name, return {@code true}.

@param env the environment for the procedure
@return {@code true} The pipeline does not exist {@code false} The pipeline already exists and
    satisfies the IfNotExists condition
@throws PipeException
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/pipe/task/CreatePipeProcedureV2.java