Skip to content

Developn 1 - #350

Merged
lstruman merged 45 commits into
mainfrom
developn-1
Oct 6, 2026
Merged

lstruman merged 45 commits into
mainfrom
developn-1

Conversation

@lstruman

Copy link
Copy Markdown
Contributor

No description provided.

lstruman added 30 commits July 28, 2026 16:21
- Make disable_initial_host_lookup configurable via config key;
  replace hardcoded constant with dbconf.GetBoolean
- Add exponential reconnection policy with configurable initial
  interval, max retries (default 10), and max interval
- Add socket keepalive support via configurable socket_keepalive_sec
- Upgrade host selection to TokenAwareHostPolicy wrapping
  DCAwareRoundRobinPolicy when local_dc is set
- Fix TLS host verification: derive EnableHostVerification from
  insecure_skip_verify instead of hardcoding false
- Read insecure_skip_verify once and pass to loadCassandraTLSConfig
  to eliminate duplicate config reads
- Add tls.server_name support for SNI override
- Raise default timeouts from 1s to 10s; align sample config
- Document all new config keys in sample_webconfig.conf for both
  cassandra and yugabyte blocks
Improve Cassandra connection resilience and configurability
replace the tls layer in config key path with flat key names
Add token auth for /config api
skip logging for /config api
return proper status code 401/403 for various token auth situations
…code

return proper status code 401/403 for various token auth situations
add support to combine logger kafka and kafkaproducer to one line to …
Copilot AI lite review requested due to automatic review settings September 22, 2026 23:17
Comment thread http/webconfig_server.go Dismissed
Comment thread http/webconfig_server.go Dismissed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved authentication and token-validation defects remain, including a malformed-capability panic path.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity · 2 Medium severity

Open (3)
What changed in this PR

This pull request hardens JWT/JWKS validation, adds optional /config authentication, improves HTTP status classification, and maps database timeouts to 504 responses.

Changes:

  • Strengthens token and capability validation.
  • Adds configurable authentication and 401/403 handling.
  • Adds timeout detection and regression tests.
File Summary
security/​token.go Updates JWT verification and capability validation.
security/​token_test.go Adds JWT validation tests.
security/​jwks_manager.go Handles JWKS capability parsing and test support.
security/​jwks_manager_test.go Adds JWKS verification tests.
http/​webconfig_server.go Adds config authentication, status classification, and timeout mapping.
http/​webconfig_server_test.go Tests middleware and config authentication.
http/​supplementary_handler.go Maps database timeouts to 504 responses.
http/​router.go Applies optional config authentication.
http/​rootdocument_handler.go Adds timeout-aware database error handling.
http/​response.go Preserves 401 responses.
http/​refsubdocument_handler.go Adds timeout-aware database error handling.
http/​poke_handler.go Adds timeout-aware database error handling.
http/​multipart.go Adds timeout-aware database error handling.
http/​multipart_test.go Updates authentication status tests.
http/​http_client.go Handles 401 retry classification.
http/​document_handler.go Adds timeout-aware database error handling.
http/​cassandra_timeout_test.go Tests timeout response handling.
db/​sqlite/​sqlite_client.go Implements timeout detection.
db/​database_client.go Adds the timeout interface method.
db/​cassandra/​cassandra_client.go Detects Cassandra timeout errors.
config/​sample_webconfig.conf Documents config endpoint authentication.
common/​error.go Adds a capability error sentinel.
common/​const_var.go Adds a placeholder comment.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread security/token.go
Comment thread http/router.go Outdated
Comment thread security/token.go Outdated
Copilot AI review requested due to automatic review settings September 25, 2026 21:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Unresolved moderate issues remain in router test-mode handling and token capability validation.

Review effort: Lite
Findings: 1 High severity · 2 Medium severity

Open (3)

Copilot AI lite review requested due to automatic review settings October 1, 2026 22:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved critical compatibility issues and HTTP timeout/status handling issues must be addressed before approval.

Review effort: Lite
Findings: 2 High severity

Open (2)
Resolved since last review (3)

Comment thread db/database_client.go
Comment thread http/webconfig_server.go
Copilot AI lite review requested due to automatic review settings October 2, 2026 19:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Two moderate authentication issues remain, and the broad security changes warrant human review.

Review effort: Lite
Findings: 2 High severity

Open (2)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Enforce minimum trust in TestingCpeMiddleware

http/​webconfig_server.go:642

TestingCpeMiddleware still treats every VerifyCpeToken result with ok == true as authorized and never compares the returned trust to MinTrust(). A low-trust token that CpeMiddleware now rejects with ErrLowTrust therefore reaches the handler in test routes, making the test-only authentication path diverge from production and allowing tests to pass with an authorization failure that production would reject. Apply the same trust check here and classify ErrLowTrust as forbidden.

@lstruman
lstruman merged commit d3e50f3 into main Oct 6, 2026
8 of 9 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants