diff --git a/pom.xml b/pom.xml
index 586d77c86e..d322956b01 100644
--- a/pom.xml
+++ b/pom.xml
@@ -78,7 +78,6 @@
1.9.4
- 3.2.21.9.41.41.14
@@ -748,11 +747,6 @@
shiro-aspectj${project.version}
-
- org.apache.shiro
- shiro-cas
- ${project.version}
- org.apache.shiroshiro-ehcache
@@ -846,13 +840,6 @@
javax.annotation-api${javax.annotation.api.version}
-
-
- commons-codec
- commons-codec
- ${commons.codec.version}
- runtime
- org.aspectjaspectjrt
diff --git a/src/owasp-suppression.xml b/src/owasp-suppression.xml
index 76e2b0b45c..03ae97d0ce 100644
--- a/src/owasp-suppression.xml
+++ b/src/owasp-suppression.xml
@@ -31,10 +31,4 @@
cpe:/a:apache:tomcat:8.5.5
-
-
- 21ec22368b6baa211a29887e162aa4cf9a8f3c60
- cpe:/a:internet2:opensaml:1.1
-
-
-
\ No newline at end of file
+
diff --git a/support/cas/pom.xml b/support/cas/pom.xml
deleted file mode 100644
index c0909aee29..0000000000
--- a/support/cas/pom.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-
-
- org.apache.shiro
- shiro-support
- 2.0.0-SNAPSHOT
- ../pom.xml
-
-
- 4.0.0
- shiro-cas
- Apache Shiro :: Support :: CAS
- bundle
-
-
-
- org.apache.shiro
- shiro-web
-
-
- org.jasig.cas.client
- cas-client-core
- ${cas.client.core.version}
-
-
-
- commons-codec
- commons-codec
- true
-
-
-
- org.opensaml
- opensaml
- 1.1
- runtime
- true
-
-
-
- org.apache.santuario
- xmlsec
- 2.1.4
- runtime
- true
-
-
-
-
-
-
- org.apache.felix
- maven-bundle-plugin
- true
-
-
- org.apache.shiro.cas
- org.apache.shiro.cas*;version=${project.version}
-
- org.apache.shiro*;version="${shiro.osgi.importRange}",
- org.jasig.cas.client*;version="[3.2, 4)",
- *
-
-
-
-
-
-
-
-
diff --git a/support/cas/src/main/java/org/apache/shiro/cas/CasAuthenticationException.java b/support/cas/src/main/java/org/apache/shiro/cas/CasAuthenticationException.java
deleted file mode 100644
index e3add40213..0000000000
--- a/support/cas/src/main/java/org/apache/shiro/cas/CasAuthenticationException.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.shiro.cas;
-
-import org.apache.shiro.authc.AuthenticationException;
-
-/**
- * @since 1.2
- * @see buji-pac4j
- * @deprecated replaced with Shiro integration in buji-pac4j.
- */
-@Deprecated
-public class CasAuthenticationException extends AuthenticationException {
-
- public CasAuthenticationException() {
- super();
- }
-
- public CasAuthenticationException(String message) {
- super(message);
- }
-
- public CasAuthenticationException(Throwable cause) {
- super(cause);
- }
-
- public CasAuthenticationException(String message, Throwable cause) {
- super(message, cause);
- }
-}
diff --git a/support/cas/src/main/java/org/apache/shiro/cas/CasFilter.java b/support/cas/src/main/java/org/apache/shiro/cas/CasFilter.java
deleted file mode 100644
index 88262a8852..0000000000
--- a/support/cas/src/main/java/org/apache/shiro/cas/CasFilter.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.shiro.cas;
-
-import org.apache.shiro.authc.AuthenticationException;
-import org.apache.shiro.authc.AuthenticationToken;
-import org.apache.shiro.subject.Subject;
-import org.apache.shiro.web.filter.authc.AuthenticatingFilter;
-import org.apache.shiro.web.util.WebUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import java.io.IOException;
-
-/**
- * This filter validates the CAS service ticket to authenticate the user. It must be configured on the URL recognized
- * by the CAS server. For example, in {@code shiro.ini}:
- *
- * (example : http://host:port/mycontextpath/shiro-cas)
- *
- * @since 1.2
- * @see buji-pac4j
- * @deprecated replaced with Shiro integration in buji-pac4j.
- */
-@Deprecated
-public class CasFilter extends AuthenticatingFilter {
-
- private static Logger logger = LoggerFactory.getLogger(CasFilter.class);
-
- // the name of the parameter service ticket in url
- private static final String TICKET_PARAMETER = "ticket";
-
- // the url where the application is redirected if the CAS service ticket validation failed (example : /mycontextpatch/cas_error.jsp)
- private String failureUrl;
-
- /**
- * The token created for this authentication is a CasToken containing the CAS service ticket received on the CAS service url (on which
- * the filter must be configured).
- *
- * @param request the incoming request
- * @param response the outgoing response
- * @throws Exception if there is an error processing the request.
- */
- @Override
- protected AuthenticationToken createToken(ServletRequest request, ServletResponse response) throws Exception {
- HttpServletRequest httpRequest = (HttpServletRequest) request;
- String ticket = httpRequest.getParameter(TICKET_PARAMETER);
- return new CasToken(ticket);
- }
-
- /**
- * Execute login by creating {@link #createToken(javax.servlet.ServletRequest, javax.servlet.ServletResponse) token} and logging subject
- * with this token.
- *
- * @param request the incoming request
- * @param response the outgoing response
- * @throws Exception if there is an error processing the request.
- */
- @Override
- protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception {
- return executeLogin(request, response);
- }
-
- /**
- * Returns false to always force authentication (user is never considered authenticated by this filter).
- *
- * @param request the incoming request
- * @param response the outgoing response
- * @param mappedValue the filter-specific config value mapped to this filter in the URL rules mappings.
- * @return false
- */
- @Override
- protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) {
- return false;
- }
-
- /**
- * If login has been successful, redirect user to the original protected url.
- *
- * @param token the token representing the current authentication
- * @param subject the current authenticated subjet
- * @param request the incoming request
- * @param response the outgoing response
- * @throws Exception if there is an error processing the request.
- */
- @Override
- protected boolean onLoginSuccess(AuthenticationToken token, Subject subject, ServletRequest request,
- ServletResponse response) throws Exception {
- issueSuccessRedirect(request, response);
- return false;
- }
-
- /**
- * If login has failed, redirect user to the CAS error page (no ticket or ticket validation failed) except if the user is already
- * authenticated, in which case redirect to the default success url.
- *
- * @param token the token representing the current authentication
- * @param ae the current authentication exception
- * @param request the incoming request
- * @param response the outgoing response
- */
- @Override
- protected boolean onLoginFailure(AuthenticationToken token, AuthenticationException ae, ServletRequest request,
- ServletResponse response) {
- if (logger.isDebugEnabled()) {
- logger.debug( "Authentication exception", ae );
- }
- // is user authenticated or in remember me mode ?
- Subject subject = getSubject(request, response);
- if (subject.isAuthenticated() || subject.isRemembered()) {
- try {
- issueSuccessRedirect(request, response);
- } catch (Exception e) {
- logger.error("Cannot redirect to the default success url", e);
- }
- } else {
- try {
- WebUtils.issueRedirect(request, response, failureUrl);
- } catch (IOException e) {
- logger.error("Cannot redirect to failure url : {}", failureUrl, e);
- }
- }
- return false;
- }
-
- public void setFailureUrl(String failureUrl) {
- this.failureUrl = failureUrl;
- }
-}
diff --git a/support/cas/src/main/java/org/apache/shiro/cas/CasRealm.java b/support/cas/src/main/java/org/apache/shiro/cas/CasRealm.java
deleted file mode 100644
index 791674afea..0000000000
--- a/support/cas/src/main/java/org/apache/shiro/cas/CasRealm.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.shiro.cas;
-
-import org.apache.shiro.authc.AuthenticationException;
-import org.apache.shiro.authc.AuthenticationInfo;
-import org.apache.shiro.authc.AuthenticationToken;
-import org.apache.shiro.authc.SimpleAuthenticationInfo;
-import org.apache.shiro.authz.AuthorizationInfo;
-import org.apache.shiro.authz.SimpleAuthorizationInfo;
-import org.apache.shiro.realm.AuthorizingRealm;
-import org.apache.shiro.subject.PrincipalCollection;
-import org.apache.shiro.subject.SimplePrincipalCollection;
-import org.apache.shiro.util.CollectionUtils;
-import org.apache.shiro.util.StringUtils;
-import org.jasig.cas.client.authentication.AttributePrincipal;
-import org.jasig.cas.client.validation.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * This realm implementation acts as a CAS client to a CAS server for authentication and basic authorization.
- *
- * This realm functions by inspecting a submitted {@link org.apache.shiro.cas.CasToken CasToken} (which essentially
- * wraps a CAS service ticket) and validates it against the CAS server using a configured CAS
- * {@link org.jasig.cas.client.validation.TicketValidator TicketValidator}.
- *
- * The {@link #getValidationProtocol() validationProtocol} is {@code CAS} by default, which indicates that a
- * a {@link org.jasig.cas.client.validation.Cas20ServiceTicketValidator Cas20ServiceTicketValidator}
- * will be used for ticket validation. You can alternatively set
- * or {@link org.jasig.cas.client.validation.Saml11TicketValidator Saml11TicketValidator} of CAS client. It is based on
- * {@link AuthorizingRealm AuthorizingRealm} for both authentication and authorization. User id and attributes are retrieved from the CAS
- * service ticket validation response during authentication phase. Roles and permissions are computed during authorization phase (according
- * to the attributes previously retrieved).
- *
- * @since 1.2
- * @see buji-pac4j
- * @deprecated replaced with Shiro integration in buji-pac4j.
- */
-@Deprecated
-public class CasRealm extends AuthorizingRealm {
-
- // default name of the CAS attribute for remember me authentication (CAS 3.4.10+)
- public static final String DEFAULT_REMEMBER_ME_ATTRIBUTE_NAME = "longTermAuthenticationRequestTokenUsed";
- public static final String DEFAULT_VALIDATION_PROTOCOL = "CAS";
-
- private static Logger log = LoggerFactory.getLogger(CasRealm.class);
-
- // this is the url of the CAS server (example : http://host:port/cas)
- private String casServerUrlPrefix;
-
- // this is the CAS service url of the application (example : http://host:port/mycontextpath/shiro-cas)
- private String casService;
-
- /* CAS protocol to use for ticket validation : CAS (default) or SAML :
- - CAS protocol can be used with CAS server version < 3.1 : in this case, no user attributes can be retrieved from the CAS ticket validation response (except if there are some customizations on CAS server side)
- - SAML protocol can be used with CAS server version >= 3.1 : in this case, user attributes can be extracted from the CAS ticket validation response
- */
- private String validationProtocol = DEFAULT_VALIDATION_PROTOCOL;
-
- // default name of the CAS attribute for remember me authentication (CAS 3.4.10+)
- private String rememberMeAttributeName = DEFAULT_REMEMBER_ME_ATTRIBUTE_NAME;
-
- // this class from the CAS client is used to validate a service ticket on CAS server
- private TicketValidator ticketValidator;
-
- // default roles to applied to authenticated user
- private String defaultRoles;
-
- // default permissions to applied to authenticated user
- private String defaultPermissions;
-
- // names of attributes containing roles
- private String roleAttributeNames;
-
- // names of attributes containing permissions
- private String permissionAttributeNames;
-
- public CasRealm() {
- setAuthenticationTokenClass(CasToken.class);
- }
-
- @Override
- protected void onInit() {
- super.onInit();
- ensureTicketValidator();
- }
-
- protected TicketValidator ensureTicketValidator() {
- if (this.ticketValidator == null) {
- this.ticketValidator = createTicketValidator();
- }
- return this.ticketValidator;
- }
-
- protected TicketValidator createTicketValidator() {
- String urlPrefix = getCasServerUrlPrefix();
- if ("saml".equalsIgnoreCase(getValidationProtocol())) {
- return new Saml11TicketValidator(urlPrefix);
- }
- return new Cas20ServiceTicketValidator(urlPrefix);
- }
-
- /**
- * Authenticates a user and retrieves its information.
- *
- * @param token the authentication token
- * @throws AuthenticationException if there is an error during authentication.
- */
- @Override
- @SuppressWarnings("unchecked")
- protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException {
- CasToken casToken = (CasToken) token;
- if (token == null) {
- return null;
- }
-
- String ticket = (String)casToken.getCredentials();
- if (!StringUtils.hasText(ticket)) {
- return null;
- }
-
- TicketValidator ticketValidator = ensureTicketValidator();
-
- try {
- // contact CAS server to validate service ticket
- Assertion casAssertion = ticketValidator.validate(ticket, getCasService());
- // get principal, user id and attributes
- AttributePrincipal casPrincipal = casAssertion.getPrincipal();
- String userId = casPrincipal.getName();
- log.debug("Validate ticket : {} in CAS server : {} to retrieve user : {}", new Object[]{
- ticket, getCasServerUrlPrefix(), userId
- });
-
- Map attributes = casPrincipal.getAttributes();
- // refresh authentication token (user id + remember me)
- casToken.setUserId(userId);
- String rememberMeAttributeName = getRememberMeAttributeName();
- String rememberMeStringValue = (String)attributes.get(rememberMeAttributeName);
- boolean isRemembered = rememberMeStringValue != null && Boolean.parseBoolean(rememberMeStringValue);
- if (isRemembered) {
- casToken.setRememberMe(true);
- }
- // create simple authentication info
- List
-
- org.apache.shiro
- shiro-cas
- org.apache.shiro