-
Notifications
You must be signed in to change notification settings - Fork 1
[feat:extensions] add support to package web-bot-auth #62
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
01fb400 to
6380ccd
Compare
rgarcia
left a comment
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.
Good feature addition! The overall structure is clean and the UX is thoughtful with helpful next-steps messaging.
Main areas to address:
- JWK vs PEM messaging: Several places in help text, logs, and comments refer to "JWK" but PEM format is also supported. Would be good to make this consistent.
- Error handling: A few places where
os.Staterrors other thanIsNotExistare silently ignored, and some URL update failures are warnings instead of errors. - Stability: Consider pinning the GitHub download to a specific commit to avoid upstream breaking changes.
- Crypto code: The stdlib already has
crypto/x509.MarshalPKCS8PrivateKeyfor Ed25519 - no need to hand-roll ASN.1.
rgarcia
left a comment
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.
lgtm - nice work on the crypto refactor to use stdlib and good test coverage. just a few minor nits.
Note
Adds a new CLI flow to fetch, build, and package Cloudflare’s
web-bot-authbrowser extension with Kernel-specific configs, plus supporting utils and tests.kernel extensions build-web-bot-authcommand incmd/extensions.gowith flags--to,--url,--key,--upload; can auto-upload to Kernel under a specified namepkg/extensions/webbotauth.go: downloads GitHub archive, validates/converts Ed25519 keys (JWK/PEM), modifies policy/build templates, runsnpm install/build/bundle, extracts extension ID, and copies artifacts (.crx,update.xml,policy, built files) to outputpkg/util/crypto.go(ValidatePEMKey,IsPEMKey,ConvertJWKToPEM) and file ops inpkg/util/fileops.go(CopyFile,CopyDir,ModifyFile)pkg/extensions/webbotauth_test.goand crypto unit tests inpkg/util/crypto_test.goWritten by Cursor Bugbot for commit 5268e7a. This will update automatically on new commits. Configure here.