public class UserIdentityUtil extends Object
Constructor and Description |
---|
UserIdentityUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
assertAdministerAccess(String uri,
String currentUser,
String fromFunction,
SecurityWrapper classification,
WebServiceContext session)
throws a security exception of the user does not have the role administer
for a specific uri or global administrator, checks the servlet context
first, then the database
|
static void |
assertAdminOrAgentRole(String currentUser,
String fromFunction,
SecurityWrapper currentLevel,
WebServiceContext mc)
throws an exception if the user is a global admin or an agent , checks
the servlet context first, then the database
|
static void |
assertAgentRole(String currentUser,
String fromFunction,
SecurityWrapper currentLevel,
WebServiceContext session)
Assert Agent Role, throws a security exception if the user does not have
the agent role, checks the servlet context first, then the database
|
static void |
assertAuditAccess(String uri,
String currentUser,
String fromFunction,
SecurityWrapper classification,
WebServiceContext session)
assertAuditAccess throws a security exception if the user does not
contain the role audit for a specific URI or the global audit role ,
checks the servlet context first, then the database
|
static void |
assertAuditRole(String currentUser,
String fromFunction,
SecurityWrapper classification,
WebServiceContext session) |
static void |
assertGlobalAdministratorRole(String currentUser,
String fromFunction,
SecurityWrapper classification,
WebServiceContext session)
Assert global admin role, throws an exception if the role is not present,
checks the servlet context first, then the database
|
static void |
assertGlobalAuditRole(String currentUser,
String fromFunction,
SecurityWrapper classification,
WebServiceContext session)
Assert global admin role, throws an exception if the role is not present,
checks the servlet context first, then the database
|
static void |
assertReadAccess(String uri,
String currentUser,
String fromFunction,
SecurityWrapper classification,
WebServiceContext session)
assertReadAccess , checks the servlet context first, then the database
|
static void |
assertWriteAccess(String uri,
String currentUser,
String fromFunction,
SecurityWrapper classification,
WebServiceContext session)
assertWriteAccess throws an exception if the role is not present , checks
the servlet context first, then the database
|
static String |
getFirstIdentityToString(WebServiceContext webctx)
Current only works for HTTP auth methods, unknown if SOAP credentials
will be available here
|
static boolean |
hasGlobalAdministratorRole(String currentUser,
String fromFunction,
SecurityWrapper classification,
WebServiceContext session)
return true if the user has the global admin role, , checks the servlet
context first, then the database
|
static boolean |
hasGlobalAuditRole(String currentUser,
String fromFunction,
SecurityWrapper classification,
WebServiceContext session)
return true if the user has the global admin role, , checks the servlet
context first, then the database
|
static boolean |
hasReadAccess(String currentUser,
String fromFunction,
String uri,
SecurityWrapper classification,
WebServiceContext session)
return true if the user has the global admin role, , checks the servlet
context first, then the database
|
static boolean |
isTrustedAgent(String currentUser,
String fromFunction,
SecurityWrapper classification,
WebServiceContext session)
return true if the current user is an agent, checks the servlet context
first, then the database
|
public static final String logname
public static void assertReadAccess(String uri, String currentUser, String fromFunction, SecurityWrapper classification, WebServiceContext session)
uri
- currentUser
- fromFunction
- classification
- public static void assertWriteAccess(String uri, String currentUser, String fromFunction, SecurityWrapper classification, WebServiceContext session)
uri
- currentUser
- fromFunction
- classification
- public static void assertAuditAccess(String uri, String currentUser, String fromFunction, SecurityWrapper classification, WebServiceContext session)
uri
- currentUser
- fromFunction
- classification
- public static void assertAdministerAccess(String uri, String currentUser, String fromFunction, SecurityWrapper classification, WebServiceContext session)
uri
- currentUser
- fromFunction
- classification
- public static void assertGlobalAdministratorRole(String currentUser, String fromFunction, SecurityWrapper classification, WebServiceContext session)
currentUser
- fromFunction
- classification
- session
- public static boolean hasGlobalAdministratorRole(String currentUser, String fromFunction, SecurityWrapper classification, WebServiceContext session)
currentUser
- fromFunction
- classification
- session
- public static String getFirstIdentityToString(WebServiceContext webctx)
webctx
- public static void assertAgentRole(String currentUser, String fromFunction, SecurityWrapper currentLevel, WebServiceContext session)
currentUser
- fromFunction
- currentLevel
- mc
- public static boolean isTrustedAgent(String currentUser, String fromFunction, SecurityWrapper classification, WebServiceContext session)
currentUser
- fromFunction
- classification
- session
- public static void assertAdminOrAgentRole(String currentUser, String fromFunction, SecurityWrapper currentLevel, WebServiceContext mc)
currentUser
- fromFunction
- currentLevel
- mc
- public static void assertAuditRole(String currentUser, String fromFunction, SecurityWrapper classification, WebServiceContext session)
public static boolean hasGlobalAuditRole(String currentUser, String fromFunction, SecurityWrapper classification, WebServiceContext session)
currentUser
- fromFunction
- classification
- mc
- public static void assertGlobalAuditRole(String currentUser, String fromFunction, SecurityWrapper classification, WebServiceContext session)
currentUser
- fromFunction
- classification
- mc
- public static boolean hasReadAccess(String currentUser, String fromFunction, String uri, SecurityWrapper classification, WebServiceContext session)
currentUser
- fromFunction
- url
- classification
- session
- Copyright © 2008–2017 MIL-OSS. All rights reserved.