Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 23 for object_key (0.1 sec)

  1. cmd/bucket-metadata.go

    		AssociatedData: kmsContext,
    	})
    	if err != nil {
    		return nil, err
    	}
    	var objectKey crypto.ObjectKey
    	if err = objectKey.Unseal(extKey, sealedKey, crypto.S3.String(), bucket, ""); err != nil {
    		return nil, err
    	}
    
    	outbuf := bytes.NewBuffer(nil)
    	_, err = sio.Decrypt(outbuf, bytes.NewBuffer(input), sio.Config{Key: objectKey[:], MinVersion: sio.Version20, CipherSuites: fips.DARECiphers()})
    	return outbuf.Bytes(), err
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 28 15:32:18 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  2. internal/s3select/sql/parser.go

    	// Remove enclosing parenthesis.
    	n := len(values[0])
    	r := values[0][1 : n-1]
    	// Translate doubled quotes
    	*ls = LiteralList(strings.Split(r, ","))
    	return nil
    }
    
    // ObjectKey is a type for parsed strings occurring in key paths
    type ObjectKey struct {
    	Lit *LiteralString `parser:" \"[\" @LitString \"]\""`
    	ID  *Identifier    `parser:"| \".\" @@"`
    }
    
    // QuotedIdentifier is a type for parsed strings that are double
    // quoted.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  3. internal/crypto/key_test.go

    	{PartID: 10000, PartKey: "f86e65c396ed52d204ee44bd1a0bbd86eb8b01b7354e67a3b3ae0e34dd5bd115"},
    }
    
    func TestDerivePartKey(t *testing.T) {
    	var key ObjectKey
    	for i, test := range derivePartKeyTest {
    		expectedPartKey, err := hex.DecodeString(test.PartKey)
    		if err != nil {
    			t.Fatalf("Test %d failed to decode expected part-key: %v", i, err)
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jul 12 20:51:54 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top