- Notifications
You must be signed in to change notification settings - Fork928
POST license API endpoint#3570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Signed-off-by: Spike Curtis <spike@coder.com>
Signed-off-by: Spike Curtis <spike@coder.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
frontend ✅
Signed-off-by: Spike Curtis <spike@coder.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Most of this looks great! I noted a few minor things and I think we could do something nicer withLicense.Claims
for the frontend (like defining the known fields). Users ofcodersdk
might also benefit from exposing known fields.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Signed-off-by: Spike Curtis <spike@coder.com>
Signed-off-by: Spike Curtis <spike@coder.com>
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
//go:embed keys/2022-08-12 | ||
var key20220812 []byte | ||
var keys = map[string]ed25519.PublicKey{"2022-08-12": ed25519.PublicKey(key20220812)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Could we make acoderd.API
struct that contains this? Similar to how the AGPLcoderd
package is structured.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
the public keys are baked in at the package level this way. Isn't this what we want?
It might make it easier to do integration testing if we could inject the keys in ascoderd.Options
on creation of the API, so that tests could generate their own keys and then use them, but I worry that sort of machinery would be tempting for end users looking to bypass our licensing. Granted, right now they can just modify thekeys/2022-08-12
file, but each layer we bubble this up through makes it that much more obvious how to get away with it.
@@ -0,0 +1,153 @@ | |||
package coderd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It seems like this test doesn't have to be internal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
it modifies thekeys
variable in-place during the tests (patch paradigm). I want to keep that variable unexported, so the tests need to be internal.
Uh oh!
There was an error while loading.Please reload this page.
Signed-off-by: Spike Curtis <spike@coder.com>
Signed-off-by: Spike Curtis <spike@coder.com>
PR 1 of 2 for#3279
(next PR will add the
coder license add
CLI command that hits this endpoint