I've been working on automating stuff via REST calls and I ran into an uncomfortable security scenario. The account I used has a dedicated rest-role. In this role it has read/write (all via cli) for /api/storage/volumes. This is necessary for creating and modifying volumes which one of the main goals of the REST calls. If you dig a little deeper into that api path there is /api/storage/volumes/{uuid}/files/{path} which allows you to make some changes directly on files or folders inside a volume and ignores any cifs/nfs acls. Yep, it does that. It's even noted in TR-4569 that it's not recorded in the NAS Audit Log. Concerning to say the least.
I've been trying to figure out a what to limit the access this account has on this deeper api path. Via the web gui it doesn't list that deep of path as an option. Using cli I've tried security login rest-role create -vserver <svmName> -role <roleName> -api "/api/storage/volumes/*/files/*" but get the response "specified uri path is invalid or not suppported. I've also tried dropping the last * but it doesn't recognize that path either. I know the * wildcard works in the command because I've successfully added /api/storage/volumes/*/snapshots.
Anyone have any ideas? Maybe I'm just being paranoid about having the ability to effect changes to files/folders to which I don't have auditable access, or automation having the same access which feels like a sizeable security hole.