-
Notifications
You must be signed in to change notification settings - Fork 1
Admin API Authentication #66
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
base: main
Are you sure you want to change the base?
Conversation
1344e30
to
809912d
Compare
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.
Pull Request Overview
This PR implements mandatory HTTP Basic Authentication for the Admin API to enhance security. The authentication can be disabled for local development using a flag.
- Adds HTTP Basic Auth middleware with bcrypt password verification
- Provides configuration flags for username, password hash, and auth disabling
- Updates documentation and development tools to support authenticated API calls
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
httpserver/server.go | Implements basic auth middleware with bcrypt password verification |
httpserver/auth_middleware_test.go | Comprehensive test suite for authentication middleware |
cmd/httpserver/main.go | Adds CLI flags and configuration for admin authentication |
docker/docker-compose.yaml | Disables auth for local development environment |
README.md | Documents authentication setup and usage examples |
Makefile | Updates curl commands to support authenticated requests |
adapters/database/service.go | Minor cleanup of database connection configuration |
AGENTS.md | New development guidelines document |
.golangci.yaml | Updates linter configuration |
.github/workflows/checks.yml | Updates golangci-lint version |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
809912d
to
b84a2ef
Compare
8e8df7f
to
12b1924
Compare
📝 Summary
This PR adds mandatory authentication to Admin API.
It can be disabled with
--disable-admin-auth
.New flags / env vars:
builder-hub/cmd/httpserver/main.go
Lines 76 to 93 in 1344e30
Note
This code has been generated by OpenAI Codex with only minimal support. The changes were working mostly on first attempt, just the
htpasswd
example was initially wrong.✅ I have run these commands
make lint
make test
go mod tidy