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

API security - authentication, CORS settings #8

Open
5 tasks
alexbojko opened this issue Mar 31, 2022 · 1 comment
Open
5 tasks

API security - authentication, CORS settings #8

alexbojko opened this issue Mar 31, 2022 · 1 comment
Labels
invalid This doesn't seem right

Comments

@alexbojko
Copy link
Collaborator

As API user:

I believe we should have authentication mechanism for API endpoints.
Possible solutions:

  • basic auth - using nginx
    • usually for that case of auth login/passwords are stored in config file (not secure, hard to maintain)
    • nginx-db-auth to store login/password in DB
  • API token - stored in DB
  • third party SSO mechanism (OAuth) for example [Auth0](http://auth0.

Needs to be done in this scope:

  • Choose authentication method
  • Implement it on the API or Infra layer
  • Write tests
  • QA
  • Deploy
@aih
Copy link
Collaborator

aih commented Mar 31, 2022

Of these, I lean toward the token approach. The API is intended for two purposes:

  1. As a service for the BillMap UI
  2. As a public API for others who may want to use the data.

The second goal is something we will implement in the future, but it is not a near-term goal.

For 1., we want enough security to prevent malicious use, but don't want to make our own use a lot more complicated. For this, rate limits and settings on nginx may be enough.

For 2. we want to support certain users who may call the API at higher volumes. For that, I think that tokens are a reasonable approach and consistent with other public APIs, like the ones at GPO.gov

@alexbojko alexbojko added the invalid This doesn't seem right label Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants