GreenInfo-Network / nyc-crash-mapper-etl-script

Extract, Transform, and Load script for fetching new data from the NYC Open Data Portal's vehicle collision data and loading into the NYC Crash Mapper table on CARTO.
3 stars 0 forks source link

Assess impact of new API key system #14

Closed danrademacher closed 6 years ago

danrademacher commented 6 years ago

https://carto.com/developers/fundamentals/authorization/

@gregallensworth related to discoveries in #eastcoastgreenway, it appears that CARTO rolled out an improved API key system where one can have multiple keys with different levels of access to different things.

Documentation is here: https://carto.com/developers/fundamentals/authorization/

Looks good, actually. BUT it appears possible that the single key we have by default is read only

So we need to enable write, maybe make a second key just for ETL

gregallensworth commented 6 years ago

This has been in place for some time: one master API key generated by default, and an ability to generate specific ones for specific needs, which may be revoked individually. The new part is the finer-grained control, that API keys have different access to different tables. Nice.

The key defined in CARTO_API_KEY is the only API key currently present: the master key. This API "governs API key management and provides unrestricted access to all the APIs and resources" and "should be kept as secure and safe as possible. Do not use it unless absolutely necessary"

gregallensworth commented 6 years ago

Should we want to generate a new key specifically for the ETL script, permissions are as follows:

gregallensworth commented 6 years ago

I have generated a new API key for use by the ETL script, and modified the Heroku settings to use this new API key.

I ran the ETL script manually using this new API key, and confirmed that it was able to function exactly as intended.