Skip to content

Require HTTPS for remote keyservers#39

Closed
YoungJinJung wants to merge 2 commits into
mainfrom
issue-34-require-https-keyserver
Closed

Require HTTPS for remote keyservers#39
YoungJinJung wants to merge 2 commits into
mainfrom
issue-34-require-https-keyserver

Conversation

@YoungJinJung

@YoungJinJung YoungJinJung commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Reject non-local http:// keyserver URLs by default before token exchange or publishing.
  • Keep loopback HTTP available for local development.
  • Add --insecure-http and ENDE_KEYSERVER_INSECURE_HTTP=1 for explicit test-only overrides.
  • Update compose smoke wiring and docs for the explicit override.

Closes #34.

Validation

  • env -u GOROOT -u GOPATH /opt/homebrew/bin/go test ./...
  • PYTHONPATH=. python3 -m unittest discover keyserver/tests

Add the local keyserver service, CLI publish/login/fetch commands, compose smoke wiring, and tests as a reviewable baseline for the security hardening work stacked above it.

Constraint: Security fixes for issues #30-#34 target files that are not yet present on main.
Rejected: Fold all security fixes into one PR | would make review and issue closure harder.
Confidence: medium
Scope-risk: broad
Directive: Review this foundation before merging stacked hardening PRs into main.
Tested: PYTHONPATH=. python3 -m unittest discover keyserver/tests; env -u GOROOT -u GOPATH /opt/homebrew/bin/go test ./...
Not-tested: Docker compose smoke test was not run locally.
Remote keyserver URLs now default to HTTPS-only before any provider or publish token is exchanged. Local loopback HTTP remains available for development, and an explicit insecure override supports compose smoke tests.

Constraint: Docker compose smoke uses an internal http://keyserver service name.
Rejected: Ban all HTTP URLs | would break local and compose development flows.
Confidence: high
Scope-risk: moderate
Directive: Keep insecure HTTP opt-in and test-only; do not make remote HTTP the default.
Tested: env -u GOROOT -u GOPATH /opt/homebrew/bin/go test ./...; PYTHONPATH=. python3 -m unittest discover keyserver/tests
Related: #34

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR successfully implements HTTPS enforcement for remote keyserver URLs while maintaining backward compatibility for local development. The implementation is secure and well-tested.

Summary of Changes:

  • Added HTTPS validation that rejects remote http:// URLs by default
  • Preserved HTTP support for loopback addresses (localhost, 127.0.0.1, ::1)
  • Introduced --insecure-http flag and ENDE_KEYSERVER_INSECURE_HTTP environment variable for explicit test overrides
  • Added comprehensive test coverage for the new validation logic
  • Updated docker-compose configuration and documentation

Security Impact:
The changes effectively prevent accidental credential leakage over unencrypted connections to remote keyservers while maintaining usability for local development scenarios.

No blocking issues identified. The code is ready to merge.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@YoungJinJung YoungJinJung changed the base branch from keyserver-foundation to main June 16, 2026 06:19
@YoungJinJung

Copy link
Copy Markdown
Contributor Author

Closing because this was opened against the wrong repository. The security triage is being redone against companyjupiter/quarkify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Require HTTPS for remote keyserver token exchange

1 participant