public class ResourceAuthorizer extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ResourceAuthorizer.LogUserGroupWhitelist |
Constructor and Description |
---|
ResourceAuthorizer(Map<String,Object> stormConf)
Constuctor.
|
Modifier and Type | Method and Description |
---|---|
ResourceAuthorizer.LogUserGroupWhitelist |
getLogUserGroupWhitelist(String fileName)
Get the whitelist of users and groups for given file.
|
boolean |
isAuthorizedLogUser(String user,
String fileName)
Checks whether user is authorized to access file.
|
boolean |
isUserAllowedToAccessFile(String user,
String fileName)
Checks whether user is allowed to access a Logviewer file via UI.
|
public boolean isUserAllowedToAccessFile(String user, String fileName)
Checks whether user is allowed to access a Logviewer file via UI. Always true when the Logviewer filter is not configured.
fileName
- file name to access. The file name must not contain upward path traversal sequences (e.g. “../”).user
- usernamepublic boolean isAuthorizedLogUser(String user, String fileName)
Checks whether user is authorized to access file. Checks regardless of UI filter.
user
- usernamefileName
- file name to access. The file name must not contain upward path traversal sequences (e.g. “../”).public ResourceAuthorizer.LogUserGroupWhitelist getLogUserGroupWhitelist(String fileName)
Get the whitelist of users and groups for given file.
fileName
- file name to get the whitelistCopyright © 2020 The Apache Software Foundation. All rights reserved.