public class AdminServlet
extends javax.servlet.http.HttpServlet
public class CAAdminServlet extends AdminServlet {
...
}
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AUTHZ_CONFIG_STORE |
static java.lang.String |
AUTHZ_MGR_BASIC |
static java.lang.String |
AUTHZ_MGR_LDAP |
protected static java.lang.String |
AUTHZ_RES_NAME |
static java.lang.String |
AUTHZ_SRC_LDAP |
static java.lang.String |
AUTHZ_SRC_TYPE |
static java.lang.String |
AUTHZ_SRC_XML |
static java.lang.String |
CERT_ATTR |
static int |
ERROR |
protected java.lang.String |
mAclMethod |
protected IAuthzSubsystem |
mAuthz |
protected IConfigStore |
mConfig |
protected ILogger |
mLogger |
protected java.lang.String |
mOp |
protected ILogger |
mSignedAuditLogger |
protected AuthzToken |
mToken |
static java.lang.String |
PROP_ACL |
static java.lang.String |
PROP_AUTHZ_MGR |
static java.lang.String |
PROP_ID |
static int |
RESTART |
static java.lang.String |
SIGNED_AUDIT_EMPTY_NAME_VALUE_PAIR |
static java.lang.String |
SIGNED_AUDIT_NAME_VALUE_DELIMITER |
static java.lang.String |
SIGNED_AUDIT_NAME_VALUE_PAIRS_DELIMITER |
static java.lang.String |
SIGNED_AUDIT_OPERATION |
static java.lang.String |
SIGNED_AUDIT_PASSWORD_VALUE |
static java.lang.String |
SIGNED_AUDIT_RESOURCE |
static java.lang.String |
SIGNED_AUDIT_RULENAME |
static java.lang.String |
SIGNED_AUDIT_SCOPE |
static int |
SUCCESS |
Constructor and Description |
---|
AdminServlet()
Constructs generic administration servlet.
|
Modifier and Type | Method and Description |
---|---|
protected void |
audit(java.lang.String msg)
Signed Audit Log
This method is inherited by all extended admin servlets
and is called to store messages to the signed audit log.
|
protected java.lang.String |
auditParams(javax.servlet.http.HttpServletRequest req)
Signed Audit Parameters
This method is inherited by all extended admin servlets and
is called to extract parameters from the HttpServletRequest
and return a string of name;;value pairs separated by a '+'
if more than one name;;value pair exists.
|
protected java.lang.String |
auditSubjectID()
Signed Audit Log Subject ID
This method is inherited by all extended "CMSServlet"s,
and is called to obtain the "SubjectID" for
a signed audit log message.
|
protected void |
authenticate(javax.servlet.http.HttpServletRequest req)
Authenticates to the identity scope with the given
userid and password via identity manager.
|
protected AuthzToken |
authorize(javax.servlet.http.HttpServletRequest req)
Authorize must occur after Authenticate
|
boolean |
authorize(IAuthToken token)
authorize a user based on its authentication credentials.
|
protected void |
commit(boolean createBackup)
FileConfigStore functionality
The original config file is moved to
|
protected NameValuePairs |
convertStringArrayToNVPairs(java.lang.String[] s) |
static AuthCredentials |
getAuthCreds(IAuthManager authMgr,
java.security.cert.X509Certificate clientCert) |
protected static IExtendedPluginInfo |
getClassByNameAsExtendedPluginInfo(java.lang.String className) |
protected void |
getConfig(IConfigStore config,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Generic configuration store get operation.
|
protected java.util.Locale |
getLocale(javax.servlet.http.HttpServletRequest req)
Retrieves locale based on the request.
|
protected java.lang.String |
getParameter(javax.servlet.http.HttpServletRequest req,
java.lang.String name) |
void |
init(javax.servlet.ServletConfig sc)
Initializes the servlet.
|
protected void |
listConfig(IConfigStore config,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Lists configuration store.
|
void |
outputHttpParameters(javax.servlet.http.HttpServletRequest httpReq) |
protected void |
sendResponse(int returnCode,
java.lang.String errorMsg,
NameValuePairs params,
javax.servlet.http.HttpServletResponse resp)
Sends response.
|
void |
service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Serves HTTP admin request.
|
protected void |
setConfig(IConfigStore config,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Generic configuration store set operation.
|
protected java.lang.String |
URLdecode(java.lang.String s)
URL decodes the given string.
|
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
protected ILogger mLogger
protected ILogger mSignedAuditLogger
protected IConfigStore mConfig
protected IAuthzSubsystem mAuthz
protected java.lang.String mAclMethod
protected java.lang.String mOp
protected static java.lang.String AUTHZ_RES_NAME
protected AuthzToken mToken
public static final java.lang.String PROP_AUTHZ_MGR
public static final java.lang.String PROP_ACL
public static final java.lang.String AUTHZ_MGR_BASIC
public static final java.lang.String AUTHZ_MGR_LDAP
public static final java.lang.String PROP_ID
public static final java.lang.String AUTHZ_CONFIG_STORE
public static final java.lang.String AUTHZ_SRC_TYPE
public static final java.lang.String AUTHZ_SRC_LDAP
public static final java.lang.String AUTHZ_SRC_XML
public static final java.lang.String CERT_ATTR
public static final java.lang.String SIGNED_AUDIT_SCOPE
public static final java.lang.String SIGNED_AUDIT_OPERATION
public static final java.lang.String SIGNED_AUDIT_RESOURCE
public static final java.lang.String SIGNED_AUDIT_RULENAME
public static final java.lang.String SIGNED_AUDIT_PASSWORD_VALUE
public static final java.lang.String SIGNED_AUDIT_EMPTY_NAME_VALUE_PAIR
public static final java.lang.String SIGNED_AUDIT_NAME_VALUE_DELIMITER
public static final java.lang.String SIGNED_AUDIT_NAME_VALUE_PAIRS_DELIMITER
public static int SUCCESS
public static int ERROR
public static int RESTART
public void init(javax.servlet.ServletConfig sc) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
public void outputHttpParameters(javax.servlet.http.HttpServletRequest httpReq)
public void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, java.io.IOException
service
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
protected void authenticate(javax.servlet.http.HttpServletRequest req) throws java.io.IOException
java.io.IOException
- an input/output error has occurredpublic static AuthCredentials getAuthCreds(IAuthManager authMgr, java.security.cert.X509Certificate clientCert) throws EBaseException
EBaseException
protected AuthzToken authorize(javax.servlet.http.HttpServletRequest req)
req
- HTTP servlet requestprotected java.util.Locale getLocale(javax.servlet.http.HttpServletRequest req)
protected void sendResponse(int returnCode, java.lang.String errorMsg, NameValuePairs params, javax.servlet.http.HttpServletResponse resp) throws java.io.IOException
returnCode
- return codeerrorMsg
- localized error messageparams
- result parametersresp
- HTTP servlet responsejava.io.IOException
protected java.lang.String URLdecode(java.lang.String s)
protected java.lang.String getParameter(javax.servlet.http.HttpServletRequest req, java.lang.String name)
protected void getConfig(IConfigStore config, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, java.io.IOException, EBaseException
javax.servlet.ServletException
java.io.IOException
EBaseException
protected void setConfig(IConfigStore config, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, java.io.IOException, EBaseException
javax.servlet.ServletException
java.io.IOException
EBaseException
protected void listConfig(IConfigStore config, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, java.io.IOException, EBaseException
javax.servlet.ServletException
java.io.IOException
EBaseException
public boolean authorize(IAuthToken token) throws EBaseException
EBaseException
protected void commit(boolean createBackup) throws EBaseException
createBackup
- true if a backup file should be createdEBaseException
protected void audit(java.lang.String msg)
msg
- signed audit log messageprotected java.lang.String auditSubjectID()
protected java.lang.String auditParams(javax.servlet.http.HttpServletRequest req)
req
- HTTP servlet requestprotected NameValuePairs convertStringArrayToNVPairs(java.lang.String[] s)
protected static IExtendedPluginInfo getClassByNameAsExtendedPluginInfo(java.lang.String className)