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

Ensure CreateApiKey always creates a new document #88413

Merged
merged 2 commits into from
Jul 11, 2022

Commits on Jul 11, 2022

  1. Ensure CreateApiKey always creates a new document

    The OpType of the indexRequest used for creating new API keys does not
    have its OpType configured. This means it defaults to OpType.INDEX which
    allows it to replace an existing document. This PR fixes it by explicity
    set OpType to CREATE so that it always create a new document (or throw
    error if ID conflict does happen).
    
    Since API key ID is time-based random base64 UUID, it is unlikely for
    this to happen in practice and we are not aware of any related bug
    report.
    ywangd committed Jul 11, 2022
    Configuration menu
    Copy the full SHA
    a8d08d2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8cb8d43 View commit details
    Browse the repository at this point in the history