Skip to content

Comments

feat(security): validate presigned URLs for skip-auth transport#17

Merged
smekcio merged 2 commits intomainfrom
feat/security-presigned-url-validation
Feb 22, 2026
Merged

feat(security): validate presigned URLs for skip-auth transport#17
smekcio merged 2 commits intomainfrom
feat/security-presigned-url-validation

Conversation

@smekcio
Copy link
Owner

@smekcio smekcio commented Feb 22, 2026

Summary

  • add strict presigned URL validation for absolute skip_auth=True requests
  • enforce HTTPS by default
  • block localhost/loopback/private-reserved IPs unless explicitly allowed
  • support host allowlist with exact and subdomain matching

Changes

  • Added KsefClientOptions fields:
    • strict_presigned_url_validation
    • allowed_presigned_hosts
    • allow_private_network_presigned_urls
  • Added request-time validation in sync/async HTTP clients for absolute pre-signed URLs used with skip_auth=True
  • Added unit tests for allow/reject/allowlist scenarios
  • Updated docs (configuration, errors)

Validation

  • python -m pytest -q
  • Result at submission time: 406 passed, 4 skipped

@smekcio smekcio merged commit 81bc405 into main Feb 22, 2026
16 checks passed
@smekcio smekcio deleted the feat/security-presigned-url-validation branch February 22, 2026 21:56
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.

1 participant