exasol / integration-test-docker-environment

A docker-based environment for integration tests with the EXASOL DB.
https://exasol.github.io/integration-test-docker-environment/
MIT License
6 stars 2 forks source link

Create SSH key for each user account #326

Closed ckunki closed 1 year ago

ckunki commented 1 year ago

Currently the ITDE writes the SSH key to file /tmp/ITDE/id_rsa with permissions 600, i.e. readable only for the current user. Another user on the same (virtual) machine will find the file existing but cannot read it.

The current ticket therefore requests to select a different file location, enabling the file to exist on a per-user basis. The user's home directory would be suitable in my eyes.

ckunki commented 1 year ago

When using the the home directory of the current user:

When using the system's temp folder, then

ckunki commented 1 year ago

The implementation currently places the file with the private key for SSH in /tmp. On system restart this folder will be emptied.

The Java solution in ETC initially had used file in the build artifacts folder ./target within the working copy of each project. But in January 2023 ETC switched to use the system global temp folder for the following reasons documented in file changes_6.5.1.md. The design document of the ETC unfortunately does not name an explicit design decision.

In summary this sounds to me more like "we wanna keep the file" as like "we wanna ensure the file to vanish at some point in time". Still we can discuss whether we want to prefer subfolders in the global system /tmp or in the home directory of the respective user.

Side note for windows users: Python tempfile.gettempdir() on windows

ckunki commented 1 year ago

@tkilias proposes ~/.cache/exasol/itde/