Skip to content

feat: add terminal session audit#4725

Open
huanghongbo-hhb wants to merge 14 commits into
koderover:mainfrom
huanghongbo-hhb:feat/terminal-session-audit
Open

feat: add terminal session audit#4725
huanghongbo-hhb wants to merge 14 commits into
koderover:mainfrom
huanghongbo-hhb:feat/terminal-session-audit

Conversation

@huanghongbo-hhb

@huanghongbo-hhb huanghongbo-hhb commented May 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add terminal session audit for pod exec, workflow debug, and SSH sessions
  • record terminal IO as asciicast and expose session history, command records, replay, and terminate APIs

Why

  • support audit trail and replay for host login and container debug operations

Main Changes

  • hook terminal stdin/stdout/resize in pod exec, workflow debug, and SSH paths
  • persist session metadata and command indexes in MongoDB
  • stream cast files to object storage and return cast content for replay
  • reuse existing masking logic for workflow credentials and referenced Kubernetes secrets

Risk / Compatibility

  • introduces new system-level audit APIs and new MongoDB collections/indexes
  • historical cast storage uses existing object storage, while session metadata remains in MongoDB

Test

  • ? github.com/koderover/zadig/v2/pkg/shared/terminalio [no test files]
    ok github.com/koderover/zadig/v2/pkg/microservice/aslan/core/common/service/terminalaudit (cached) [no tests to run]
    ok github.com/koderover/zadig/v2/pkg/microservice/podexec/core/service (cached) [no tests to run]
    ? github.com/koderover/zadig/v2/pkg/tool/wsconn [no test files]
    ok github.com/koderover/zadig/v2/pkg/microservice/aslan/core/environment/service (cached) [no tests to run]
    ? github.com/koderover/zadig/v2/pkg/microservice/aslan/core/system/handler [no test files]
    ? github.com/koderover/zadig/v2/pkg/cli/initconfig/cmd [no test files]

Contact


This change is Reviewable

Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
@huanghongbo-hhb huanghongbo-hhb force-pushed the feat/terminal-session-audit branch from 6d5eeea to b736a4e Compare May 28, 2026 08:07
Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
@huanghongbo-hhb huanghongbo-hhb force-pushed the feat/terminal-session-audit branch from b31f718 to 2114627 Compare June 1, 2026 02:11
Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
Signed-off-by: huanghongbo-hhb <huanghongbo@koderover.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant