Skip to content

Add bucket policy, CORS, and encryption config to storage service - #68

Merged
NitinKumar004 merged 1 commit into
developmentfrom
feature/storage-policy-cors-encryption
Mar 31, 2026
Merged

Add bucket policy, CORS, and encryption config to storage service#68
NitinKumar004 merged 1 commit into
developmentfrom
feature/storage-policy-cors-encryption

Conversation

@NitinKumar004

Copy link
Copy Markdown
Collaborator

Summary

  • Adds 8 new methods to storage driver interface: PutBucketPolicy, GetBucketPolicy, DeleteBucketPolicy, PutCORSConfig, GetCORSConfig, DeleteCORSConfig, PutEncryptionConfig, GetEncryptionConfig
  • Adds 4 new types: BucketPolicy, PolicyStatement, CORSRule, CORSConfig, EncryptionConfig
  • Implements across all 3 providers: AWS S3, Azure Blob Storage, GCP GCS
  • Wires through portable API layer with metrics, recording, rate limiting, and error injection
  • Get returns NotFound when no config is set (matches real cloud behavior)
  • Delete is idempotent — sets config to nil

Closes #59

Test plan

Integration tests (cloudemu_test.go)

  • TestBucketPolicyAWS — put, get, delete, verify NotFound after delete
  • TestBucketPolicyAzure — put and get policy on Azure container
  • TestBucketPolicyGCP — put and get policy on GCS bucket
  • TestCORSConfigAWS — put, get, delete, verify NotFound after delete
  • TestEncryptionConfigAWS — put and get encryption config
  • TestEncryptionConfigAzure — put and get encryption config
  • TestEncryptionConfigGCP — put and get encryption config

Verification

  • Linter: 0 issues (golangci-lint run --timeout=9m ./...)
  • Full test suite: all passing (go test ./...)

@NitinKumar004
NitinKumar004 merged commit 90d8d29 into development Mar 31, 2026
@NitinKumar004 NitinKumar004 mentioned this pull request Mar 31, 2026
@NitinKumar004
NitinKumar004 deleted the feature/storage-policy-cors-encryption branch April 30, 2026 18:16
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.

Add Bucket Policy, CORS, and Encryption config to Storage service

1 participant