Asset authorisation
Authorise assets for users or user groups with a validity period, account restrictions, an authorisation policy and a command filter; maintain file and clipboard permission templates and SSH command filters.
Asset authorisation decides which assets ordinary users, and administrators without the asset access permission (资产接入), can reach. An authorisation has these parts:
| Part | Description |
|---|---|
| Subjects | Users or user groups, and assets |
| Validity period | A start and end time; empty means no limit. When it ends, the authorisation stops working and sessions in progress are disconnected |
| Account restriction | Limits the usable asset accounts by sign-in username; empty means every account on the asset |
| Authorisation policy | File transfer and clipboard permissions; see Authorisation policies. Unrestricted (不限制) allows everything |
| Command filter | Which commands can run in SSH terminals; see Command filters. No filter (不过滤) blocks nothing |
Add an authorisation
There are three places to add an authorisation, all with the same result:
- Resources > Assets: Authorise (授权) in an asset row adds users or user groups to that asset.
- User management > Users: Asset authorisation (资产授权) in a user row adds assets for that user.
- User management > User groups: Asset authorisation in a group row adds assets for every member.
Steps
- In the authorisation panel, on the relevant tab (Assets, Users or User groups), pick what to authorise. You can pick several.
- (Optional) Pick an Authorisation policy and a Command filter.
- (Optional) Set the Start time and End time. The end must be later than the start.
- (Optional) Under Restrict accounts (限定账号), enter sign-in usernames separated by commas, such as
deploy, ops. When several assets are authorised at once, the restriction applies to the accounts with those names on each asset. - Select Authorise (授权).
The list of authorisations shows each one's policy, command filter, usable accounts, validity (indefinite, expired, not yet started, or the actual dates) and when it was granted. Select Remove to revoke one.
Authorisation policies
Authorisation > Authorisation policies (授权策略 > 授权策略) holds permission templates for file transfer and the clipboard during sessions, chosen when authorising assets.
| Group | Actions you can allow |
|---|---|
| Files | Upload, download, edit, delete, rename, create folder |
| Clipboard (graphical sessions) | Copy, paste |
Steps
- Select New policy (新建策略).
- Enter a Name and tick the actions to allow.
- Select Save.
When a policy is deleted, authorisations that used it forbid every file and clipboard action.
Command filters
Authorisation > Command filters (授权策略 > 命令过滤) holds command filters. Bound to an asset authorisation, a filter blocks dangerous commands in SSH terminals, both the web terminal and the built-in SSH service. Changes apply only to sessions opened afterwards.
Rules are matched in ascending order of priority, and the first match decides whether the command is denied or allowed. If nothing matches, the command is allowed.
| Rule type | How it matches |
|---|---|
| Command (命令) | Matches when the leading words of the command are exactly the same, such as reboot or rm -rf. Every segment joined by a pipe, ;, && or ` |
| Regex (正则) | Matches the whole command, such as ^rm\s+-rf. RE2 syntax |
Steps
- Select New filter (新建过滤器), enter a Name and select Create.
- Select Add rule, pick the Type, enter the command or regular expression, pick the Action (Deny or Allow), enter a Priority (lower numbers match first) and make sure Enabled is on.
- Select Save. Add more rules as needed.
- Pick this filter when adding an authorisation.
Blocked commands do not run and are marked as blocked in the command log. A filter with no rules blocks nothing. A filter that an asset authorisation is using cannot be deleted.
Commands
Save frequently used shell commands and run them on several SSH hosts at once, with one recorded SSH session per host.
Session audit
View online sessions, monitor them live or force a disconnect; in session history, replay recordings, read command records, set review status and delete sessions.