storj.io/uplink@v1.13.0/private/access/access.go (about) 1 // Copyright (C) 2020 Storj Labs, Inc. 2 // See LICENSE for copying information. 3 4 package access 5 6 import ( 7 "storj.io/common/macaroon" 8 "storj.io/uplink" 9 "storj.io/uplink/internal/expose" 10 ) 11 12 // EnablePathEncryptionBypass enables path encryption bypass for embedded encryption access. 13 func EnablePathEncryptionBypass(access *uplink.Access) error { 14 encAccess := expose.AccessGetEncAccess(access) 15 encAccess.Store.EncryptionBypass = true 16 return nil 17 } 18 19 // APIKey returns the API key. 20 func APIKey(access *uplink.Access) *macaroon.APIKey { 21 return expose.AccessGetAPIKey(access) 22 } 23 24 // DisableObjectKeyEncryption disables the encryption of object keys for newly 25 // uploaded objects. 26 // 27 // Disabling the encryption of object keys means that the object keys are 28 // stored in plain text in the satellite database. This allows object listings 29 // to be returned in lexicographically sorted order. 30 // 31 // Object content is still encrypted as usual. 32 func DisableObjectKeyEncryption(config *uplink.Config) { 33 expose.ConfigDisableObjectKeyEncryption(config) 34 }