Skip to content

Speed creation of auth0 & mapbox keys, and auto-inject them into a new stack.yaml for deployment #157

Description

@IamJeffG

Feature Request

https://github.com/ConservationMetrics/gc-forge/issues/104#issuecomment-5036356206 shows that 30% of our time in a new deployment is in these three steps:

  • configuring auth0 (new tenant, new application clients for each of {superset, explorer, etc})
  • set up GCP OAuth client for Google social login
  • configuring mapbox (provisioning an access key -- right @rudokemper ?)
  • populating stack.yaml -- largely with the credentials produced by the previous two bullets

This flow seems ripe for automation.

  • auth0 clients can be created via terraform (we actually used to do this before!) or API calls.
  • The initial stack.yaml template is already output from a script (gc-stack-deploy init), it's plausible to imagine seeding that with some simple output from the auth0 & mapbox steps.

User Stories & Acceptance Criteria

UI Sketch

One idea: A very hands-off wizard (script or app) that
inputs

  • only your admin auth0 login (or better, an M2M client credential)
  • TODO: GCP, mapbox ... something..?
  • lets you confirm which app clients you need created

effects

  • it creates the application tenants,
  • it creates the mapbox key(s),
  • and spits out your stack.yaml with those values populated.

If this is run on the target VM, then a very good feature would be to require only one installer, that provides the user both this and gc-stack-deploy, i.e. the user only has to install one thing!

Implementation Plan

How should the wizard interact with auth0?

  • The vibe-coder would probably use their JS or Python API.
  • Or, could the installer install terraform (or OpenTofu) on the VM itself, deploy using Terraform (which we have code for already), and possibly even delete itself later (long-term maintenance is not the use case)

Bonus (scope-creep)

You could also automate generating the SECRET_KEY(s)
... and even writing them to Keepass.

The issue title frames it as automating auth0, mapbox setup; I wonder if a more useful & intuitive framing might be "make a full-featured stack.yaml generator".

Metadata

Metadata

Assignees

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