Skip to content

[bug][COM] add log filtering to prevent token and user code leakage in engine logs #1047

Description

@v-kkhuang

Search before asking

  • I had searched in the issues and found no similar issues.

Linkis Component

  • linkis-commons
  • linkis-computation-governance
  • linkis-dist
  • linkis-engineconn-plugin
  • linkis-extensions
  • linkis-orchestrator
  • linkis-public-enhancements
  • linkis-spring-cloud-services
  • linkis-web

Description

Currently, Linkis engine logs may expose sensitive information including:

  1. User authentication tokens
  2. User execution code
  3. Missing engine instance identification during kill operations

This poses security risks and makes debugging difficult.

Steps to reproduce

  1. Execute tasks with authentication tokens
  2. Check engine logs
  3. Observe tokens and user code are printed in plain text
  4. Kill an engine instance and check logs - missing instance info

Expected behavior

  • User tokens should be filtered/masked in all log outputs
  • User code should not be printed in engine logs
  • Kill engine operations should log engine instance information

Your environment

  • Linkis version used: 2.0.0
  • Environment name and version:
    • hadoop-3.3.4
    • hive-2.3.3
    • spark-3.3.0
    • scala-2.12.17
    • jdk 1.8.0_xxx

Anything else

This PR introduces utility classes CodeUtils and TokenSensitiveUtils to filter sensitive information across all engine plugins and services.

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions