Skip to content
This repository has been archived by the owner on Jul 21, 2020. It is now read-only.
/ cdk-issues Public archive

Azure functions for submitting CDK issues

License

Notifications You must be signed in to change notification settings

mixer/cdk-issues

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cdk-issues

Azure function scripts that store reports of issues with the control development kit.

Why?

  • We want to track issues via Github and get as much information as possible, including editor state.
  • Editor state may contain private or confidental data which the user doesn't want to share.
  • Github limits the amount of data we can pre-seed into an issue.

Solution

We create a pair of Azure functions to store and retrieve issue data. When we store data, we AES encrypt the data and give the user a reference and password they can include in the issue. If they don't want to include their editor dump, they can simply discard the password, and no one (including us) will be able to see their editor state.

API

POST /api/issues with a body containing {"data":"some-string"}. The issue ID and password is returned.

PUT /api/issues HTTP/1.1

{
    "data": "foo"
}

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "id": "d3a1a8815b058d2e",
    "password": "sVTv74o4OLhyddB4QwoH6KKsj1mPcbbvHAUp0Ut0sCk="
}

POST /api/issues/{issueId}decrypt with a body containing {"password":"base64-password"}. The issue data is returned. Requires auth.

POST /api/issues/d3a1a8815b058d2e/decrypt HTTP/1.1

{
    "password": "sVTv74o4OLhyddB4QwoH6KKsj1mPcbbvHAUp0Ut0sCk="
}

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

"foo"

Internal Notes

To retrieve info about an issue, set the CDK_ISSUE_KEY to the auth key for the Azure function. Run node unlock and follow the prompts to retrieve data associated with an issue. direnv is great.

Deployment is copy-pasting built code into the UI for now. We'll automate it when this repo goes public.

About

Azure functions for submitting CDK issues

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published