Skip to content

New users have unrestricted root terminal access to containers (security concern) #4073

@fredEbho

Description

@fredEbho

What problem will this feature address?

Description

When a new user is added to the Dokploy dashboard and granted access to an application, they automatically gain terminal access to the underlying Docker container.

The terminal session runs with root privileges, which introduces significant security risks.

Current Behavior

  • Any user with access to an application can:

    • Open terminal
    • Execute commands as root inside the container
  • No option to:

    • Disable terminal access per user
    • Restrict terminal permissions
    • Assign non-root users

Expected Behavior

There should be fine-grained access control, including:

1. Terminal Access Control

  • Ability to:

    • Enable/disable terminal access per user
    • Enable/disable terminal access per application

2. User Privilege Control

  • Ability to:

    • Specify which user the terminal runs as (e.g. non-root)
    • Restrict command execution

Security Concerns

  • Violates principle of least privilege

  • Risk of:

    • Accidental system damage
    • Malicious command execution
    • Container escape vectors (in worst-case scenarios)

Impact

  • Major security risk in team environments
  • Limits adoption in production/enterprise setups

Describe the solution you'd like

Suggested Improvements

  • Allow configuration of terminal user (non-root)
  • Add feature flag to disable terminal entirely
  • Audit logging for terminal sessions

Describe alternatives you've considered

None

Additional context

No response

Will you send a PR to implement it?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions