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

Support multiple API keys #165

Closed
chucker opened this issue Jul 19, 2024 · 2 comments
Closed

Support multiple API keys #165

chucker opened this issue Jul 19, 2024 · 2 comments

Comments

@chucker
Copy link

chucker commented Jul 19, 2024

(This is identical to loic-sharma#801; it appears this fork is more active.)

Is your feature request related to a problem? Please describe.

Currently, the recommended approach to authentication is an API key. However, this only enables you to set one API key for your entire staff. This requires key rotation as soon as one staffer leaks the key and/or leaves the team.

Describe the solution you'd like

Therefore, what I would like is simply the — optional — ability to define multiple API keys, e.g.:

  "ApiKeys": [
    {
      "User": "Frank",
      "Key": "asd"
    },
    {
      "User": "Sarah",
      "Key": "qwe"
    },
    {
      "User": "Kim",
      "Key": "zxc"
    },
  ]

On a technical level,

  • ApiKeys has precedence over ApiKey, if present.
  • The code only really cares about the Key property. The User property is human metadata.

Describe alternatives you've considered

What we do now instead is use IIS to setup HTTP basic auth, but unfortunately, NuGet (whether through dotnet, VS, or Rider) handles HTTP auth very poorly. The recommended path for them, too, appears to be API keys.

@Regenhardt
Copy link

Hi chucker, this is being implemented in #156 currently, you're welcome to review the changes, it's almost ready to merge.

@chucker
Copy link
Author

chucker commented Aug 13, 2024

Yep, this is pretty much a dupe of #147. Thanks!

@chucker chucker closed this as completed Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants