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)
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)
user
- usernamefileName
- file name to access. The file name must not contain upward path traversal sequences (e.g. "../").public ResourceAuthorizer.LogUserGroupWhitelist getLogUserGroupWhitelist(String fileName)
fileName
- file name to get the whitelistCopyright © 2023 The Apache Software Foundation. All rights reserved.