This adds a new `/upload/config` endpoint to the API for uploading encrypted configuration files for later use by the deployer. The payload takes the form: ``` authorized: - accounta - accountb config: env: FOO: bar BAR: baz ``` The request is the encrypted using the deployer's public key (discoverable from its `WebappDeployer` record). This is handled automatically by `laconic-so` but can also be handled manually using standard CLI tools like `gpg` and `curl`. For example: ``` # Get the key $ laconic -c ~/.laconic/testnet-a-cercio.yml registry name resolve lrn://laconic/deployers/webapp-deployer-api.dev.vaasl.io | jq -r '.[0].attributes.publicKey' | base64 -d > webapp-deployer-api.dev.vaasl.io.pgp.pub # Import it $ gpg --import webapp-deployer-api.dev.vaasl.io.pgp.pub # Encrypt your config file. $ gpg --yes --encrypt --recipient webapp-deployer-api.dev.vaasl.io --trust-model always config.yaml # Post it $ curl -s -X POST -d '@config.yaml.gpg' https://webapp-deployer-api.dev.vaasl.io/upload/config | jq { "id": "B56C65AB96B741B7B219520A3ABFCD10" } ``` Reviewed-on: #14 Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com> Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
25 lines
632 B
JSON
25 lines
632 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "es2022",
|
|
"module": "node16",
|
|
"lib": ["ES2022"],
|
|
"moduleResolution": "node16",
|
|
"rootDir": ".",
|
|
"outDir": "build",
|
|
"allowSyntheticDefaultImports": true,
|
|
"importHelpers": true,
|
|
"alwaysStrict": true,
|
|
"sourceMap": true,
|
|
"forceConsistentCasingInFileNames": true,
|
|
"noFallthroughCasesInSwitch": true,
|
|
"noImplicitReturns": true,
|
|
"noUnusedLocals": true,
|
|
"noUnusedParameters": true,
|
|
"noImplicitAny": false,
|
|
"noImplicitThis": false,
|
|
"strictNullChecks": false,
|
|
"skipLibCheck": true
|
|
},
|
|
"include": ["src/**/*", "__tests__/**/*"]
|
|
}
|