Skip to content

Commit db31740

Browse files
committed
feat: set allowBlobPublicAccess as false by default
1 parent 37a3691 commit db31740

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

docs/driver-parameters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ protocol | specify blobfuse mount or NFSv3 mount | `fuse`, `nfs` | No | `fuse`
1717
containerName | specify the existing container name | existing container name | No | if empty, driver will create a new container name, starting with `pvc-fuse` for blobfuse or `pvc-nfs` for NFSv3
1818
isHnsEnabled | enable `Hierarchical namespace` for Azure DataLake storage account(only for blobfuse) | `true`,`false` | No | `false`
1919
server | specify Azure storage account server address | existing server address, e.g. `accountname.privatelink.blob.core.windows.net` | No | if empty, driver will use default `accountname.blob.core.windows.net` or other sovereign cloud account address
20-
allowBlobPublicAccess | Allow or disallow public access to all blobs or containers for storage account created by driver | `true`,`false` | No | `true`
20+
allowBlobPublicAccess | Allow or disallow public access to all blobs or containers for storage account created by driver | `true`,`false` | No | `false`
2121
storageEndpointSuffix | specify Azure storage endpoint suffix | `core.windows.net` | No | if empty, driver will use default storage endpoint suffix according to cloud environment, e.g. `core.windows.net`
2222
tags | [tags](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/tag-resources) would be created in newly created storage account | tag format: 'foo=aaa,bar=bbb' | No | ""
2323

pkg/blob/controllerserver.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
6666
parameters = make(map[string]string)
6767
}
6868
var storageAccountType, resourceGroup, location, account, containerName, protocol, customTags, secretNamespace string
69-
var isHnsEnabled, allowBlobPublicAccess *bool
69+
var isHnsEnabled *bool
70+
// set allowBlobPublicAccess as false by default
71+
allowBlobPublicAccess := to.BoolPtr(false)
7072

7173
// store account key to k8s secret by default
7274
storeAccountKey := true
@@ -102,8 +104,8 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
102104
storeAccountKey = false
103105
}
104106
case allowBlobPublicAccessField:
105-
if strings.EqualFold(v, falseValue) {
106-
allowBlobPublicAccess = to.BoolPtr(false)
107+
if strings.EqualFold(v, trueValue) {
108+
allowBlobPublicAccess = to.BoolPtr(true)
107109
}
108110
case pvcNamespaceKey:
109111
if secretNamespace == "" {

0 commit comments

Comments
 (0)