Enabling user level permissions
ramasubbaiya opened this issue · comments
Description
We have an Apache MINA SFTP server that uses a user table to authenticate users. We would like to setup permissions such as LIST (ls
), DOWNLOAD (get
), UPLOAD (put
), and others, where users are only allowed to perform certain actions based on their permissions.
We would appreciate any ideas or guidance to make this feature happen.
Motivation
Implementing user-level permissions to restrict users based on their usernames/account.
Alternatives considered
No response
Additional context
No response
Take a look at SimpleAccessControlSftpEventListener.java
. That shows how this could be done. The listener has access to the ServerSession
, so you should be able to find the logged-in user, and from that determine in your own datastructures whether to allow a particular operation.
Thank you! Will take a look.