@Test public void testAuthParamSanitization() { try { MiniClient c = new MiniClient(); c.setConnectorEndpoint(connector.getHttpEndpoint()); c.setLogin(testAgent.getIdentifier(), testPass); ClientResponse result = c.sendRequest("GET", "test/requesturi?param1=sadf&access-token=secret", ""); Assert.assertEquals(200, result.getHttpCode()); Assert.assertTrue(result.getResponse().contains("param1")); Assert.assertFalse(result.getResponse().contains("secret")); Assert.assertFalse(result.getResponse().contains("access-token")); HashMap<String, String> headers = new HashMap<>(); headers.put("param1", "asdf"); result = c.sendRequest("GET", "test/headers", "", headers); Assert.assertEquals(200, result.getHttpCode()); Assert.assertTrue(result.getResponse().toLowerCase().contains("param1")); Assert.assertFalse(result.getResponse().toLowerCase().contains("authorization")); } catch (Exception e) { e.printStackTrace(); Assert.fail("Exception: " + e); } }
public String getHttpEndpoint() { return "http: }
WebConnector extends Connector { public String getHttpEndpoint() { return "http: } }
WebConnector extends Connector { public String getHttpEndpoint() { return "http: } WebConnector();  WebConnector(boolean http, int httpPort, boolean https, int httpsPort);  WebConnector(Integer httpPort); }
WebConnector extends Connector { public String getHttpEndpoint() { return "http: } WebConnector();  WebConnector(boolean http, int httpPort, boolean https, int httpsPort);  WebConnector(Integer httpPort); void setLogFile(String filename); void setHttpPort(Integer port); void setHttpsPort(Integer port); void enableHttpHttps(boolean http, boolean https); @Deprecated void setSocketTimeout(int timeoutInMs); void setLogStream(OutputStream stream); void setSslKeyPassword(String password); void setSslKeystore(String keystore); void setCrossOriginResourceDomain(String cord); String getCrossOriginResourceDomain(); void setCrossOriginResourceMaxAge(int maxAge); int getCrossOriginResourceMaxAge(); void setCrossOriginResourceSharing(boolean enable); boolean isCrossOriginResourceSharing(); void setPreferLocalServices(boolean enable); @Override void start(Node node); String getRootCAFilename(); String getMyHostname(); String getHttpsEndpoint(); String getHttpEndpoint(); @Override synchronized void stop(); Node getL2pNode(); void logMessage(String message); void logError(String message, Throwable throwable); void logError(String message); NameLock getLockOidc(); String getOidcClientId(); String getOidcClientSecret(); int getHttpPort(); int getHttpsPort(); X509Certificate getCACertificate(); AgentImpl authenticateAgent(MultivaluedMap<String, String> requestHeaders, String accessTokenQueryParam); AgentSession getOrCreateSession(PassphraseAgentImpl agent); AgentSession getSessionById(String sessionid); void destroySession(String sessionId); String generateToken(); }
WebConnector extends Connector { public String getHttpEndpoint() { return "http: } WebConnector();  WebConnector(boolean http, int httpPort, boolean https, int httpsPort);  WebConnector(Integer httpPort); void setLogFile(String filename); void setHttpPort(Integer port); void setHttpsPort(Integer port); void enableHttpHttps(boolean http, boolean https); @Deprecated void setSocketTimeout(int timeoutInMs); void setLogStream(OutputStream stream); void setSslKeyPassword(String password); void setSslKeystore(String keystore); void setCrossOriginResourceDomain(String cord); String getCrossOriginResourceDomain(); void setCrossOriginResourceMaxAge(int maxAge); int getCrossOriginResourceMaxAge(); void setCrossOriginResourceSharing(boolean enable); boolean isCrossOriginResourceSharing(); void setPreferLocalServices(boolean enable); @Override void start(Node node); String getRootCAFilename(); String getMyHostname(); String getHttpsEndpoint(); String getHttpEndpoint(); @Override synchronized void stop(); Node getL2pNode(); void logMessage(String message); void logError(String message, Throwable throwable); void logError(String message); NameLock getLockOidc(); String getOidcClientId(); String getOidcClientSecret(); int getHttpPort(); int getHttpsPort(); X509Certificate getCACertificate(); AgentImpl authenticateAgent(MultivaluedMap<String, String> requestHeaders, String accessTokenQueryParam); AgentSession getOrCreateSession(PassphraseAgentImpl agent); AgentSession getSessionById(String sessionid); void destroySession(String sessionId); String generateToken(); static final int DEFAULT_HTTP_PORT; static final String WEB_CONNECTOR; static final int DEFAULT_HTTPS_PORT; static final boolean DEFAULT_START_HTTP; static final boolean DEFAULT_START_HTTPS; static final String DEFAULT_CROSS_ORIGIN_RESOURCE_DOMAIN; static final int DEFAULT_CROSS_ORIGIN_RESOURCE_MAX_AGE; static final boolean DEFAULT_ENABLE_CROSS_ORIGIN_RESOURCE_SHARING; static final boolean DEFAULT_ONLY_LOCAL_SERVICES; static final String SESSION_COOKIE; static final String DEFAULT_DEFAULT_OIDC_PROVIDER; public String defaultOIDCProvider; public ArrayList<String> oidcProviders; static final int DEFAULT_MAX_CONNECTIONS; static final String COOKIE_SESSIONID_KEY; static final int DEFAULT_SESSION_TIMEOUT; static final int DEFAULT_MAX_THREADS; static final int DEFAULT_MAX_REQUEST_BODY_SIZE; static final String SSL_INSTANCE_NAME; public Map<String, JSONObject> oidcProviderInfos; }