Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 20 for ObjectKey (0.07 sec)

  1. cmd/post-policy_test.go

    	"net/url"
    	"strings"
    	"testing"
    	"time"
    
    	"github.com/dustin/go-humanize"
    )
    
    const (
    	iso8601DateFormat = "20060102T150405Z"
    )
    
    func newPostPolicyBytesV4WithContentRange(credential, bucketName, objectKey string, expiration time.Time) []byte {
    	t := UTCNow()
    	// Add the expiration date.
    	expirationStr := fmt.Sprintf(`"expiration": "%s"`, expiration.Format(iso8601TimeFormat))
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed May 22 23:07:14 UTC 2024
    - 30.2K bytes
    - Viewed (0)
  2. internal/crypto/sse-c.go

    // from the metadata using the SSE-C client key of the HTTP headers
    // and returns the decrypted object key.
    func (s3 ssec) UnsealObjectKey(h http.Header, metadata map[string]string, bucket, object string) (key ObjectKey, err error) {
    	clientKey, err := s3.ParseHTTP(h)
    	if err != nil {
    		return
    	}
    	return unsealObjectKey(clientKey[:], metadata, bucket, object)
    }
    
    // CreateMetadata encodes the sealed key into the metadata
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  3. internal/s3select/sql/parser_test.go

    		err := p.ParseString(tc, &id)
    		if err == nil {
    			t.Fatalf("%d: %v", i, err)
    		}
    		// fmt.Println(tc, err)
    	}
    }
    
    func TestLiteralStringParsing(t *testing.T) {
    	var k ObjectKey
    	p := participle.MustBuild(
    		&ObjectKey{},
    		participle.Lexer(sqlLexer),
    		participle.CaseInsensitive("Keyword"),
    	)
    
    	validCases := []string{
    		"['abc']",
    		"['ab''c']",
    		"['a''b''c']",
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  4. cmd/object-api-utils.go

    	return &PutObjReader{Reader: rawReader, rawReader: rawReader}
    }
    
    func sealETag(encKey crypto.ObjectKey, md5CurrSum []byte) []byte {
    	var emptyKey [32]byte
    	if bytes.Equal(encKey[:], emptyKey[:]) {
    		return md5CurrSum
    	}
    	return encKey.SealETag(md5CurrSum)
    }
    
    func sealETagFn(key crypto.ObjectKey) SealMD5CurrFn {
    	fn := func(md5sumcurr []byte) []byte {
    		return sealETag(key, md5sumcurr)
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 08 15:29:58 UTC 2024
    - 37.1K bytes
    - Viewed (0)
  5. internal/crypto/sse-kms.go

    // from the metadata using KMS and returns the decrypted object
    // key.
    func (s3 ssekms) UnsealObjectKey(k *kms.KMS, metadata map[string]string, bucket, object string) (key ObjectKey, err error) {
    	if k == nil {
    		return key, Errorf("KMS not configured")
    	}
    
    	keyID, kmsKey, sealedKey, ctx, err := s3.ParseMetadata(metadata)
    	if err != nil {
    		return key, err
    	}
    	if ctx == nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  6. internal/s3select/sql/evaluate.go

    	}
    	pathExpr := e.StripTableAlias(alias)
    	_, rawVal := r.Raw()
    	switch rowVal := rawVal.(type) {
    	case jstream.KVS, simdjson.Object:
    		if len(pathExpr) == 0 {
    			pathExpr = []*JSONPathElement{{Key: &ObjectKey{ID: e.BaseKey}}}
    		}
    
    		result, _, err := jsonpathEval(pathExpr, rowVal)
    		if err != nil {
    			return nil, err
    		}
    
    		return jsonToValue(result)
    	default:
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 12K bytes
    - Viewed (0)
  7. cmd/object-multipart-handlers.go

    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    	dstOpts.IndexCB = idxCb
    
    	rawReader := srcInfo.Reader
    	pReader := NewPutObjReader(rawReader)
    
    	var objectEncryptionKey crypto.ObjectKey
    	if isEncrypted {
    		if !crypto.SSEC.IsRequested(r.Header) && crypto.SSEC.IsEncrypted(mi.UserDefined) {
    			writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrSSEMultipartEncrypted), r.URL)
    			return
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Aug 31 18:25:48 UTC 2024
    - 39.2K bytes
    - Viewed (0)
  8. cmd/object-handlers.go

    		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrInvalidSSECustomerAlgorithm), r.URL)
    		return
    	}
    
    	var oldKey, newKey []byte
    	var newKeyID string
    	var kmsCtx kms.Context
    	var objEncKey crypto.ObjectKey
    	sseCopyKMS := crypto.S3KMS.IsEncrypted(srcInfo.UserDefined)
    	sseCopyS3 := crypto.S3.IsEncrypted(srcInfo.UserDefined)
    	sseCopyC := crypto.SSEC.IsEncrypted(srcInfo.UserDefined) && crypto.SSECopy.IsRequested(r.Header)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Oct 05 05:16:15 UTC 2024
    - 117.4K bytes
    - Viewed (0)
  9. cmd/erasure-multipart.go

    		objectEncryptionKey, err = decryptObjectMeta(nil, bucket, object, fi.Metadata)
    		if err != nil {
    			return oi, err
    		}
    	}
    	if len(objectEncryptionKey) == 32 {
    		var key crypto.ObjectKey
    		copy(key[:], objectEncryptionKey)
    		opts.EncryptFn = metadataEncrypter(key)
    	}
    
    	for idx, part := range partInfoFiles {
    		if part.Error != "" {
    			err = objPartToPartErr(part)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Sep 29 22:40:36 UTC 2024
    - 44.7K bytes
    - Viewed (0)
  10. cmd/bucket-handlers.go

    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	rawReader := hashReader
    	pReader := NewPutObjReader(rawReader)
    	var objectEncryptionKey crypto.ObjectKey
    
    	// Check if bucket encryption is enabled
    	sseConfig, _ := globalBucketSSEConfigSys.Get(bucket)
    	sseConfig.Apply(formValues, sse.ApplyOptions{
    		AutoEncrypt: globalAutoEncryption,
    	})
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Sep 12 12:24:04 UTC 2024
    - 63.4K bytes
    - Viewed (0)
Back to top