Closed aph3rson closed 1 year ago
Setting up a CI server just to inject a token seems a tad overkill. Still, I'm curious as to how you would implement this- would the CI server just write out the key in the source file before compilation? Even if it were to be encrypted, what good would that do, since we still have to decrypt it client-side to make the request?
You would implement Travis CI, which is available for all public GitHub repos. Travis has a mechanism to encrypt secrets asymmetrically, so the values committed to the VCS are decrypted during Travis's build process.
As for where you'd be incorporating the value, you could just replace the value in the source file with the encrypted value. There's a guide on the Travis website mentioning how that all works.
Regarding it still being necessary client side, you're correct, someone could decompile the DLLs to get the token back, but it's non-trivial to do so.
Thanks for the clarifications. I'll probably pass on the CI to avoid needless complexity, but I can see about adding some mechanism to use a custom token- perhaps using a config file. Until then there is the Ctrl+Alt+F12 shortcut to copy the log to clipboard so you can publish it where you like.
Custom token support added to log publisher in 10.0.0. To use, press Ctrl+F12, uncheck "Use recommended settings", and paste a token into the input field.
Right now, logs are posted as Gists using a token committed to the repo. GitHub automatically revokes these tokens when they're committed (for good reason).
The better way to do this would be to load the encrypted production token in to a CI build config (e.g. Travis, etc.), yet allow users to specify their own tokens if they so choose. This could be for development purposes (as there'd be no access to the token), or just because (I'd like to have access to all the logs I've uploaded in one place).