Skip to content

Hardcoded mongodb credential #243

@Escalion

Description

@Escalion

There are hardcoded mongodb credentials in several modules. Those wishing to develop can easily create a docker container with the appropriate hostname, however these credentials should probably reference a .env file instead.

Notably, the IMongoRepository _mapLayersRepository which is used within the live mapping locations (opening the map in mapping or calls), will cause an excessive timeout of ~30 seconds before failing and continuing. This results in long page load times.
See : https://github.com/Resgrid/Core/blob/master/Core/Resgrid.Services/MappingService.cs#L16 -->

public static string NoSqlConnectionString = "mongodb://resgrid:resgrid123@rgdevserver:27017";

Locations with hardcoded credentials:

Core/Resgrid.Config/ApiConfig.cs

Core/Resgrid.Config/DataConfig.cs

Core/Resgrid.Config/OidcConfig.cs

Core/Resgrid.Config/AuditConfig.cs

Core/Resgrid.Config/WorkerConfig.cs

Core/Resgrid.Config/ExternalErrorConfig.cs

Repositories/Resgrid.Repositories.DataRepository/App.config

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .net codedocumentationIssue may be the result of incomplete documentationenhancementNew feature or request

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions