Skip to content

Alerta does not pick up on non-default Postgres credentials #444

@davidusken

Description

@davidusken

Issue Summary
When using credentials other then the default ones for Postgres, Alerta does not use them.
This results in having the password in cleartext in Git when wanting to use non-default credentials.

Environment

  • OS: Linux

  • API version: 9.0.1

  • Deployment: Docker

  • Database: [eg. MongoDB, Postgres]

  • Server config:
    Auth enabled? Yes
    Auth provider? OpenID
    Customer views? No
    (or provide the /config endpoint output)

  • web UI version: 9.0.1

  • CLI version: 9.0.1

To Reproduce
Steps to reproduce the behavior:

  1. Update alerta-postgresql with different credentials
  2. Re-deploy app
  3. Verify auth fails for alerta user as credentials alerta:PG_ALERTA_PASSWORD no longer works

For web app issues, include any web browser JavaScript console errors.

Expected behavior
Best case scenario the database URL should read from the secret.
Alternatively it should work to supply the new password as an env variable and use this syntax:
DATABASE_URL = "postgresql://alerta:${PG_ALERTA_PASSWORD}@fmonitoring-alerta-postgresql:5432/alerta"
(Tested this and it does not use the env variable to authenticate)

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

NOTE: Please provide as much information about your issue as possible.
Failure to provide basic details about your specific environment make
it impossible to know if an issue has already been fixed, can delay a
response and may result in your issue being closed without a resolution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions