Skip to content

Question about required authentication for local development #26

@getsolaris

Description

@getsolaris

When developing locally, we typically don't set ES_API_KEY or ES_USERNAME/ES_PASSWORD for Elasticsearch. However, the current code enforces these authentication parameters as required

.refine(
  (data) => {
    // Either apiKey is present, or both username and password are present
    return !!data.apiKey || (!!data.username && !!data.password);
  },
  {
    message:
      "Either ES_API_KEY or both ES_USERNAME and ES_PASSWORD must be provided",
    path: ["apiKey", "username", "password"],
  }
);

Could we make authentication optional for local development environments?

  1. Simplify local development setup
  2. Match default Elasticsearch behavior where authentication is not required by default
  3. Allow developers to quickly test and iterate without configuring auth credentials

Proposed solution

  • Make authentication parameters truly optional

Let me know your thoughts on this approach.

#27

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions