public void init(FilterConfig filterConfig) throws ServletException { Utils.logDebug("Initializing the filter..", LOG); passiveRequestorEndPoint = filterConfig.getInitParameter(PASSIVE_REQUESTOR_ENDPOINT); Utils.logInfo("Passive Requestor Endpoint is:" + passiveRequestorEndPoint, LOG); if (passiveRequestorEndPoint == null) { throw new ServletException( PASSIVE_REQUESTOR_ENDPOINT + " init parameter not proivded in the filter configuration."); } // Remove query parameters if any passiveRequestorEndPoint = (passiveRequestorEndPoint != null && passiveRequestorEndPoint.indexOf('?') > 0) ? passiveRequestorEndPoint.substring(0, passiveRequestorEndPoint.indexOf('?')) : passiveRequestorEndPoint; relyingPartyRealm = filterConfig.getInitParameter(RELYING_PARTY_REALM); Utils.logInfo("Relying Party Realm is:" + relyingPartyRealm, LOG); if (relyingPartyRealm == null) { throw new ServletException( RELYING_PARTY_REALM + " init parameter not proivded in the filter configuration."); } certificatePath = filterConfig.getInitParameter(CERTIFICATE_PATH); Utils.logInfo("Certificate path:" + certificatePath, LOG); if (certificatePath == null) { // 1. check for embedded cert and if exists set certPath to cert/acs_signing.cer if (filterConfig.getServletContext().getResourceAsStream(EMBEDDED_CERT_LOC) != null) certificatePath = EMBEDDED_CERT_LOC; else throw new ServletException( CERTIFICATE_PATH + " init parameter not proivded in the filter configuration" + " or Embeddded Cert is not found at /WEB-INF/cert/_acs_signing.cer"); } secretKey = filterConfig.getInitParameter(SECRET_KEY); if (secretKey == null) { throw new ServletException( SECRET_KEY + " init parameter not proivded in the filter configuration."); } allowHttp = Boolean.parseBoolean(filterConfig.getInitParameter(ALLOW_HTTP)); // create keystore Key publicKey = getPublicKey(certificatePath, filterConfig); trustParams = new TrustParameters(publicKey, Utils.getSecretKey(secretKey), allowHttp, relyingPartyRealm); // Create the command which performs actual filtering Utils.logDebug("Creating stateless filter...", LOG); filterCommand = new StatelessFilterCommand(this); }