test_class.declarator: backend
test_class.modifier: private
test_class.original_string: private BackendManager backend;
test_class.type: BackendManager
test_class.var_name: backend
test_class.declarator: handler
test_class.modifier: private
test_class.original_string: private HttpRequestHandler handler;
test_class.type: HttpRequestHandler
test_class.var_name: handler
test_class.file: agent/core/src/test/java/org/jolokia/http/HttpRequestHandlerTest.java
test_class.identifier: HttpRequestHandlerTest
test_case.body: @Test(expectedExceptions = { SecurityException.class })
      public void accessDeniedViaOrigin() {
          expect(backend.isRemoteAccessAllowed("localhost","127.0.0.1")).andReturn(true);
          expect(backend.isOriginAllowed("www.jolokia.org",true)).andReturn(false);
          replay(backend);
  
          handler.checkAccess("localhost", "127.0.0.1","www.jolokia.org");
      }
test_case.class_method_signature: HttpRequestHandlerTest.accessDeniedViaOrigin()
test_case.full_signature: @Test(expectedExceptions = { SecurityException.class }) public void accessDeniedViaOrigin()
test_case.identifier: accessDeniedViaOrigin
test_case.invocations: andReturn expect isRemoteAccessAllowed andReturn expect isOriginAllowed replay checkAccess
test_case.modifiers: @Test(expectedExceptions = { SecurityException.class }) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void accessDeniedViaOrigin()
focal_class.declarator: backendManager
focal_class.modifier: private
focal_class.original_string: private BackendManager backendManager;
focal_class.type: BackendManager
focal_class.var_name: backendManager
focal_class.declarator: logHandler
focal_class.modifier: private
focal_class.original_string: private LogHandler logHandler;
focal_class.type: LogHandler
focal_class.var_name: logHandler
focal_class.declarator: config
focal_class.modifier: private
focal_class.original_string: private Configuration config;
focal_class.type: Configuration
focal_class.var_name: config
focal_class.declarator: PATH_PREFIX_PATTERN = Pattern.compile("^/?[^/]+/")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern PATH_PREFIX_PATTERN = Pattern.compile("^/?[^/]+/");
focal_class.type: Pattern
focal_class.var_name: PATH_PREFIX_PATTERN
focal_class.file: agent/core/src/main/java/org/jolokia/http/HttpRequestHandler.java
focal_class.identifier: HttpRequestHandler
focal_class.class_method_signature: HttpRequestHandler.HttpRequestHandler(Configuration pConfig, BackendManager pBackendManager, LogHandler pLogHandler)
focal_class.full_signature: public  HttpRequestHandler(Configuration pConfig, BackendManager pBackendManager, LogHandler pLogHandler)
focal_class.identifier: HttpRequestHandler
focal_class.modifiers: public
focal_class.parameters: (Configuration pConfig, BackendManager pBackendManager, LogHandler pLogHandler)
focal_class.signature:  HttpRequestHandler(Configuration pConfig, BackendManager pBackendManager, LogHandler pLogHandler)
focal_class.class_method_signature: HttpRequestHandler.handleGetRequest(String pUri, String pPathInfo, Map<String, String[]> pParameterMap)
focal_class.full_signature: public JSONAware handleGetRequest(String pUri, String pPathInfo, Map<String, String[]> pParameterMap)
focal_class.identifier: handleGetRequest
focal_class.modifiers: public
focal_class.parameters: (String pUri, String pPathInfo, Map<String, String[]> pParameterMap)
focal_class.return: JSONAware
focal_class.signature: JSONAware handleGetRequest(String pUri, String pPathInfo, Map<String, String[]> pParameterMap)
focal_class.class_method_signature: HttpRequestHandler.getProcessingParameter(Map<String, String[]> pParameterMap)
focal_class.full_signature: private ProcessingParameters getProcessingParameter(Map<String, String[]> pParameterMap)
focal_class.identifier: getProcessingParameter
focal_class.modifiers: private
focal_class.parameters: (Map<String, String[]> pParameterMap)
focal_class.return: ProcessingParameters
focal_class.signature: ProcessingParameters getProcessingParameter(Map<String, String[]> pParameterMap)
focal_class.class_method_signature: HttpRequestHandler.handlePostRequest(String pUri, InputStream pInputStream, String pEncoding, Map<String, String[]>  pParameterMap)
focal_class.full_signature: public JSONAware handlePostRequest(String pUri, InputStream pInputStream, String pEncoding, Map<String, String[]>  pParameterMap)
focal_class.identifier: handlePostRequest
focal_class.modifiers: public
focal_class.parameters: (String pUri, InputStream pInputStream, String pEncoding, Map<String, String[]>  pParameterMap)
focal_class.return: JSONAware
focal_class.signature: JSONAware handlePostRequest(String pUri, InputStream pInputStream, String pEncoding, Map<String, String[]>  pParameterMap)
focal_class.class_method_signature: HttpRequestHandler.handleCorsPreflightRequest(String pOrigin, String pRequestHeaders)
focal_class.full_signature: public Map<String, String> handleCorsPreflightRequest(String pOrigin, String pRequestHeaders)
focal_class.identifier: handleCorsPreflightRequest
focal_class.modifiers: public
focal_class.parameters: (String pOrigin, String pRequestHeaders)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> handleCorsPreflightRequest(String pOrigin, String pRequestHeaders)
focal_class.class_method_signature: HttpRequestHandler.extractJsonRequest(InputStream pInputStream, String pEncoding)
focal_class.full_signature: private Object extractJsonRequest(InputStream pInputStream, String pEncoding)
focal_class.identifier: extractJsonRequest
focal_class.modifiers: private
focal_class.parameters: (InputStream pInputStream, String pEncoding)
focal_class.return: Object
focal_class.signature: Object extractJsonRequest(InputStream pInputStream, String pEncoding)
focal_class.class_method_signature: HttpRequestHandler.executeRequest(JmxRequest pJmxReq)
focal_class.full_signature: private JSONObject executeRequest(JmxRequest pJmxReq)
focal_class.identifier: executeRequest
focal_class.modifiers: private
focal_class.parameters: (JmxRequest pJmxReq)
focal_class.return: JSONObject
focal_class.signature: JSONObject executeRequest(JmxRequest pJmxReq)
focal_class.class_method_signature: HttpRequestHandler.handleThrowable(Throwable pThrowable)
focal_class.full_signature: public JSONObject handleThrowable(Throwable pThrowable)
focal_class.identifier: handleThrowable
focal_class.modifiers: public
focal_class.parameters: (Throwable pThrowable)
focal_class.return: JSONObject
focal_class.signature: JSONObject handleThrowable(Throwable pThrowable)
focal_class.class_method_signature: HttpRequestHandler.getErrorJSON(int pErrorCode, Throwable pExp, JmxRequest pJmxReq)
focal_class.full_signature: public JSONObject getErrorJSON(int pErrorCode, Throwable pExp, JmxRequest pJmxReq)
focal_class.identifier: getErrorJSON
focal_class.modifiers: public
focal_class.parameters: (int pErrorCode, Throwable pExp, JmxRequest pJmxReq)
focal_class.return: JSONObject
focal_class.signature: JSONObject getErrorJSON(int pErrorCode, Throwable pExp, JmxRequest pJmxReq)
focal_class.class_method_signature: HttpRequestHandler.checkAccess(String pHost, String pAddress, String pOrigin)
focal_class.full_signature: public void checkAccess(String pHost, String pAddress, String pOrigin)
focal_class.identifier: checkAccess
focal_class.modifiers: public
focal_class.parameters: (String pHost, String pAddress, String pOrigin)
focal_class.return: void
focal_class.signature: void checkAccess(String pHost, String pAddress, String pOrigin)
focal_class.class_method_signature: HttpRequestHandler.extractCorsOrigin(String pOrigin)
focal_class.full_signature: public String extractCorsOrigin(String pOrigin)
focal_class.identifier: extractCorsOrigin
focal_class.modifiers: public
focal_class.parameters: (String pOrigin)
focal_class.return: String
focal_class.signature: String extractCorsOrigin(String pOrigin)
focal_class.class_method_signature: HttpRequestHandler.addErrorInfo(JSONObject pErrorResp, Throwable pExp, JmxRequest pJmxReq)
focal_class.full_signature: private void addErrorInfo(JSONObject pErrorResp, Throwable pExp, JmxRequest pJmxReq)
focal_class.identifier: addErrorInfo
focal_class.modifiers: private
focal_class.parameters: (JSONObject pErrorResp, Throwable pExp, JmxRequest pJmxReq)
focal_class.return: void
focal_class.signature: void addErrorInfo(JSONObject pErrorResp, Throwable pExp, JmxRequest pJmxReq)
focal_class.class_method_signature: HttpRequestHandler.getExceptionMessage(Throwable pException)
focal_class.full_signature: private String getExceptionMessage(Throwable pException)
focal_class.identifier: getExceptionMessage
focal_class.modifiers: private
focal_class.parameters: (Throwable pException)
focal_class.return: String
focal_class.signature: String getExceptionMessage(Throwable pException)
focal_class.class_method_signature: HttpRequestHandler.errorForUnwrappedException(Exception e, JmxRequest pJmxReq)
focal_class.full_signature: private JSONObject errorForUnwrappedException(Exception e, JmxRequest pJmxReq)
focal_class.identifier: errorForUnwrappedException
focal_class.modifiers: private
focal_class.parameters: (Exception e, JmxRequest pJmxReq)
focal_class.return: JSONObject
focal_class.signature: JSONObject errorForUnwrappedException(Exception e, JmxRequest pJmxReq)
focal_class.class_method_signature: HttpRequestHandler.extractPathInfo(String pUri, String pPathInfo)
focal_class.full_signature: private String extractPathInfo(String pUri, String pPathInfo)
focal_class.identifier: extractPathInfo
focal_class.modifiers: private
focal_class.parameters: (String pUri, String pPathInfo)
focal_class.return: String
focal_class.signature: String extractPathInfo(String pUri, String pPathInfo)
focal_method.body: public void checkAccess(String pHost, String pAddress, String pOrigin) {
          if (!backendManager.isRemoteAccessAllowed(pHost, pAddress)) {
              throw new SecurityException("No access from client " + pAddress + " allowed");
          }
          if (!backendManager.isOriginAllowed(pOrigin,true)) {
              throw new SecurityException("Origin " + pOrigin + " is not allowed to call this agent");
          }
      }
focal_method.class_method_signature: HttpRequestHandler.checkAccess(String pHost, String pAddress, String pOrigin)
focal_method.full_signature: public void checkAccess(String pHost, String pAddress, String pOrigin)
focal_method.identifier: checkAccess
focal_method.invocations: isRemoteAccessAllowed isOriginAllowed
focal_method.modifiers: public
focal_method.parameters: (String pHost, String pAddress, String pOrigin)
focal_method.return: void
focal_method.signature: void checkAccess(String pHost, String pAddress, String pOrigin)