Skip to content

[import-document,import-file-stix] Support running as an arbitrary user (OpenShift Container Platform)  #2507

@leitosama

Description

@leitosama

Description

All connectors and OpenCTI Platform are deployed in OpenShift Container Platform.

  • import-document connector returns PermissionError: [Errno 13] Permission denied: '<file>' error while downloading into container filesystem
  • import-file-stix connector returns PermissionError: [Errno 13] Permission denied: '/.stixmarx' while starting up
    This error occurs because OCP runs container using an arbitrarily assigned user ID (same as Support running as an arbitrary user (OpenShift Container Platform) opencti#4885).

Environment

  1. OS (where OpenCTI server runs): Red Hat CoreOS 9(OpenShift Container Platform)/Debian 11 (docker compose)
  2. OpenCTI version: 6.2.13
  3. OpenCTI client: non applicable
  4. Other environment details:

Reproducible Steps

To reproduce this error in Docker:

  1. Change docker-compose.yml in OpenCTI Docker):
  connector-import-document:
    image: opencti/connector-import-document:6.2.13
    user: 1005:0
  1. Run OpenCTI Platform
  2. Import a document or text using "Import" page http://localhost:8080/dashboard/data/import

Expected Output

Import is successful

Actual Output

The connector returns PermissionError: [Errno 13] Permission denied: '<file>'

Additional information

About OCP arbitrary user

Metadata

Metadata

Assignees

No one assigned

    Labels

    buguse for describing something not working as expectedsolveduse to identify issue that has been solved (must be linked to the solving PR)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions