Skip to content

New POST endpoint for Creating a Datastore #49

@DanielElisenberg

Description

@DanielElisenberg

New POST Endpoint for Creating a Datastore

This post endpoint should take a JSON object on /datastores and create a new empty datastore with the right resources in the filesystem and database.

You can use the current datastore-initialzr repo as reference, but make sure to go through each piece of the logic and rework it if necessary. The initializr code is aging and might include concerns that are no longer relevant.

The auth code should ensure only authorized system-administrators can make this request.

Key Pair

The job-executor is the only component that should have access to the private key of the datastore. We should therefore create a job "generate credentials" that make the private and public key for a given datastore, stores them in a vault directory and then posts the public key to the datastore-api for exposing it to datastore administrators. This requires:

  • A post endpoint for public keys with auth
  • A new "generate credentials"-job for job-executor (remember to update the model in datastore-api as well)
  • Update existing datastores for the same structure

This is written here, and not the job-executor as I want the dev that grabs this task to decide when and how to implement the key pair generation bit. Make a task in job-executor after thinking about this.

Sub-issues

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions