minvws / nl-covid19-notification-app-backend

Server-side code for CoronaMelder.
European Union Public License 1.2
77 stars 26 forks source link

Running in Docker on Linux fails #28

Closed llewelld closed 2 years ago

llewelld commented 3 years ago

Describe the bug, issue or concern

When running the docker-compose install on Linux, executing the following command fails:

docker exec docker_content_api_1 EksEngine/EksEngine

This is running on Ubuntu 20.04.

To Reproduce

Steps to reproduce the behavior:

  1. Start/build the docker install on Linux.

    docker-compose up --build
  2. Initialise the database.

    docker exec docker_content_api_1 Tools/DbProvision/DbProvision
  3. Generate Teks.

    docker exec docker_content_api_1 Tools/GenTeks/GenTeks
    docker exec docker_content_api_1 Tools/ForceTekAuth/ForceTekAuth
  4. Attempt to initialise the Eks engine

    docker exec docker_content_api_1 EksEngine/EksEngine
  5. Generates the following error.

    [21:38:59 FTL] System.PlatformNotSupportedException: Windows Principal functionality is not supported on this platform.
    at System.Security.Principal.WindowsIdentity.GetCurrent()
    at NL.Rijksoverheid.ExposureNotification.BackEnd.Components.Framework.WindowsIdentityQueries.CurrentUserIsAdministrator() in /app/Components/Framework/WindowsIdentityQueries.cs:line 13
    at NL.Rijksoverheid.ExposureNotification.BackEnd.Components.ExposureKeySetsEngine.ExposureKeySetBatchJobMk3.Execute() in /app/Components/ExposureKeySetsEngine/ExposureKeySetBatchJobMk3.cs:line 78
    at NL.Rijksoverheid.ExposureNotification.BackEnd.EksEngine.Program.Start(IServiceProvider serviceProvider, String[] args) in /app/EksEngine/Program.cs:line 46
    at NL.Rijksoverheid.ExposureNotification.BackEnd.Components.ConsoleApps.ConsoleAppRunner.Execute(String[] args, Action`2 configure, Action`2 start) in /app/Components/ConsoleApps/ConsoleAppRunner.cs:line 41
  6. Notice that there are no exposureKeySet ids in the manifest.

Expected behavior

The EksEngine starts up successfully and the exposureKeySet ids are added to the manifest.

Screenshots

n/a.

Additional context

PR #27 highlights where the errors occur in the EtkEngine code. The problem stems from the fact that the user certificate store isn't available on Linux (I'm not sure whether this is a Linux issue or a Docker issue though). The PR works around the problem, but isn't really a fix because it results in dummy signatures being generated (it does, however, make clear where the issues are, I think).

Governance

skos001 commented 2 years ago

@llewelld and belated thanks for opening this issue back in 2020 as well πŸŽ‰ and sincere apologies that we haven't responded to this pull request all this time either 😬 πŸ˜…

This is duplicated from issue #25, but relevant here as well: the Docker setup within the project has changed since your reporting of this issue, and should now work without issue on Windows, Linux and macOS (excepting macOS M1, which has specific work-around instructions in the README).

If the changes to the project solve this issue, feel free to close the issue and the corresponding pull request πŸ™‚

skos001 commented 2 years ago

Closing old issue.