public static String filterSensitive(String url) {
        if (StringUtils.isBlank(url)) {
            return url;
        }

        try {
            String resultUrl = url;
            while (resultUrl.contains(InlongConstants.PERCENT)) {
                resultUrl = URLDecoder.decode(resultUrl, "UTF-8");
            }
            resultUrl = resultUrl.replaceAll(InlongConstants.REGEX_WHITESPACE, InlongConstants.EMPTY);
            resultUrl = filterSensitiveKeyByBracket(resultUrl);
            if (resultUrl.contains(InlongConstants.QUESTION_MARK)) {
                StringBuilder builder = new StringBuilder();
                builder.append(StringUtils.substringBefore(resultUrl, InlongConstants.QUESTION_MARK));
                builder.append(InlongConstants.QUESTION_MARK);

                List<String> paramList = new ArrayList<>();
                String queryString = StringUtils.substringAfter(resultUrl, InlongConstants.QUESTION_MARK);
                if (queryString.contains(InlongConstants.SHARP)) {
                    queryString = StringUtils.substringBefore(queryString, InlongConstants.SHARP);
                }
                for (String param : queryString.split(InlongConstants.AMPERSAND)) {
                    if (StringUtils.isBlank(param)) {
                        continue;
                    }
                    String key = StringUtils.substringBefore(param, InlongConstants.EQUAL);
                    String value = StringUtils.substringAfter(param, InlongConstants.EQUAL);

                    if (SENSITIVE_REMOVE_PARAM_MAP.contains(key) || SENSITIVE_REPLACE_PARAM_MAP.containsKey(key)) {
                        continue;
                    }

                    paramList.add(key + InlongConstants.EQUAL + value);
                }
                SENSITIVE_REPLACE_PARAM_MAP.forEach((key, value) -> paramList.add(key + InlongConstants.EQUAL + value));

                String params = StringUtils.join(paramList, InlongConstants.AMPERSAND);
                builder.append(params);
                resultUrl = builder.toString();
            }

            log.info("MySQL original URL {} was replaced to {}", url, resultUrl);
            return resultUrl;
        } catch (Exception e) {
            throw new BaseException(String.format("Failed to filter MySQL sensitive URL: %s, error: %s",
                    url, e.getMessage()));
        }
    }
Filter the sensitive params for the given URL.

@param url str may have some sensitive params
@return str without sensitive param
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/util/MySQLSensitiveUrlUtils.java