Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

services/horizon: Deprecation and Removal of --db-url Command Line Parameter #4915

Closed
3 tasks
urvisavla opened this issue Jun 16, 2023 · 3 comments
Closed
3 tasks

Comments

@urvisavla
Copy link
Contributor

urvisavla commented Jun 16, 2023

What problem does your feature solve?

In our docs, we recommend using environment variables instead of command line flags for Horizon as they provide better security for sensitive information.

What would you like to see?

  • Display warning messages regarding the deprecation of the --db-url command line argument by year-end and transition to using environment variable.
  • Identify any additional command-line parameters that require deprecation.
  • Phase out the --db-url command line parameter by year-end.
@urvisavla
Copy link
Contributor Author

As part of this we can also:

  1. Assess whether there are any command-line flags that are not inherently "global" and could potentially vary based on the specific subcommand. In such case, we may need to allow users to override these specific environment variables using command-line options. We can start with identifying any flags falling within this category.
  2. Review current validations for each command and their respective subcommands tree and make adjustments/improvements where necessary.

@urvisavla urvisavla assigned urvisavla and unassigned urvisavla Aug 10, 2023
@urvisavla urvisavla changed the title services/horizon: Deprecate command line input for Horizon flags services/horizon: Deprecation and Removal of --db-url Command Line Parameter Aug 14, 2023
@urvisavla urvisavla moved this from Next Sprint Proposal to Current Sprint in Platform Scrum Aug 15, 2023
@urvisavla urvisavla moved this from Current Sprint to In Progress in Platform Scrum Aug 16, 2023
@urvisavla
Copy link
Contributor Author

I have a PR that introduces a deprecation warning for the --db-url command-line parameter. This PR also includes the necessary changes to support a config flag exclusively via environment variables. However, I'm not sure if this is the best way to go. Here are a few reasons why:

  1. If we make one config parameter exclusively environment variables, the inconsistency could confuse users.
  2. Users can run multiple Horizon instances, and these instances might need to connect to different databases.
    For example, they might have an API-only instance and an ingestion instance on the same machine. In such cases, the API instance might need to use a read-only database (ro db instance), while the ingestion instance needs the db-url parameter to point to a read-write database (rw db instance). To manage this, users would have to create extra scripts to pass different environment variables. Keeping the option to set db-url via the command line might be simpler for users.

I agree that command-line parameters may not be the most secure approach, and we may need to rethink how we handle Horizon's configuration as a whole. However, recommending the use of environment variables for configuring Horizon in our public documentation guides users toward a more secure and proper setup.

I'd love to hear your thoughts on this, @mollykarcher, @sreuland, @aditya1702.

@urvisavla
Copy link
Contributor Author

As discussed during the Partner Experience team meeting, we have decided not to proceed with this and instead favor #5045. Hence, closing this issue.

@github-project-automation github-project-automation bot moved this from In Progress to Done in Platform Scrum Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

1 participant