Skip to content

Commit

Permalink
Merge pull request #755 from Ashley-wenyizha/CVEMitigation
Browse files Browse the repository at this point in the history
Should not pass in mount option of awscredsuri
  • Loading branch information
k8s-ci-robot authored Aug 17, 2022
2 parents 36859e7 + 019e772 commit 88e6a0e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion examples/kubernetes/access_points/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,6 @@ as this could subject you to
if you configured your access point with `/ap1`, the above would mount to
`/ap1/my/subpath`.
- As with normal volume path, the `[Subpath]` must already exist prior to consuming
the volume from a pod.
the volume from a pod.

- `awscredsuri` mount option is not supported through efs-csi-driver as it's designed and used by ECS tasks.
7 changes: 6 additions & 1 deletion pkg/driver/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (d *Driver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolu
switch strings.ToLower(k) {
//Deprecated
case "path":
klog.Warning("Use of path under volumeAttributes is depracated. This field will be removed in future release")
klog.Warning("Use of path under volumeAttributes is deprecated. This field will be removed in future release")
if !filepath.IsAbs(v) {
return nil, status.Errorf(codes.InvalidArgument, "Volume context property %q must be an absolute path", k)
}
Expand Down Expand Up @@ -165,6 +165,11 @@ func (d *Driver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolu
}
}

if f == "awscredsuri" {
klog.Warning("awscredsuri mount option is not supported by efs-csi-driver.")
return nil, nil
}

if !hasOption(mountOptions, f) {
mountOptions = append(mountOptions, f)
}
Expand Down

0 comments on commit 88e6a0e

Please sign in to comment.