fauna-labs / fauna-schema-migrate

The Fauna Schema Migrate tool helps you set up Fauna resources as code and perform schema migrations.
MIT No Attribution
88 stars 11 forks source link

Child DB Security Key Spam #119

Open MKRazz opened 2 years ago

MKRazz commented 2 years ago

If you run a command while using a child database, it will create a new key and leave it there, so you eventually end up with tons of keys on the parent database. Could these keys be deleted after the command is done running?

ryancausey commented 2 years ago

I'm no TS expert, but looking at the code it appears to create a child key every time the child DB is accessed. I think a better approach would be to use scoped keys. Fauna schema migrate already needs access to an admin key for the parent database in order to create child ones, so it shouldn't need to create a new key.