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

Make downloads server-side (python) API calls #2735

Closed
1 task
Tracked by #137
lbeaufort opened this issue Mar 11, 2019 · 2 comments
Closed
1 task
Tracked by #137

Make downloads server-side (python) API calls #2735

lbeaufort opened this issue Mar 11, 2019 · 2 comments

Comments

@lbeaufort
Copy link
Member

lbeaufort commented Mar 11, 2019

- [ ] Set up an IP-whitelisted API key for cloud.gov only, set up the CMS to use it in stage to test. Test by: Users shouldn’t be able to use that API key, but app should
- [ ] Check on API umbrella seemingly removing the / in the IP ranges (52.222.122.97/32 becomes 52.222.122.97 - is it a display issue?
- [ ] Check on where FEC_WEB_API_KEY and FEC_WEB_API_KEY_PUBLIC are used
- [ ] Look at unlimited API key configuration and API backend configuration
- [ ] Do we really need everyone to access the POST/download URL? We could restrict this role to just the CMS key.

We discovered that client-side (browser) API calls won't have the cloud.gov IP address, and it seems that the only way for that to really work would be to make the export call a server-side call.

Plan of attack:

  • Investigate making the “Export” API call a server-side (Python) call so that the source IP is cloud.gov.
@lbeaufort lbeaufort self-assigned this Mar 11, 2019
@lbeaufort lbeaufort transferred this issue from fecgov/openFEC Mar 12, 2019
@lbeaufort lbeaufort added this to the Sprint 8.3 milestone Mar 12, 2019
@lbeaufort
Copy link
Member Author

We discovered that client-side (browser) API calls won't have the cloud.gov IP address, and it seems that the only way for that to really work would be to make the export call a server-side call.

Plan of attack:

  • Investigate making the “Export” API call a server-side (Python) call so that the source IP is cloud.gov.
  • On the API side, restrict /downloads/ to cloud.gov IP’s. See this PR (https://github.com/fecgov/openFEC/pull/3625/files) for application-level blocking, but we’d want to just whitelist cloud.gov for the /downloads/ endpoint.

@lbeaufort lbeaufort changed the title API key configuration changes Make downloads only available to CMS Mar 14, 2019
@JonellaCulmer JonellaCulmer modified the milestones: Sprint 8.3, Sprint 8.4 Mar 14, 2019
@lbeaufort lbeaufort assigned patphongs and unassigned lbeaufort Mar 14, 2019
@lbeaufort lbeaufort changed the title Make downloads only available to CMS Make downloads server-side (python) API calls Mar 14, 2019
@JonellaCulmer
Copy link
Contributor

Closing this ticket in favor of this one: fecgov/openFEC#3630

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants