bkoehm commented on code in PR #16174: URL: https://github.com/apache/grails-core/pull/16174#discussion_r3816375062
########## grails-test-examples/spring-security/cas/test1/src/integration-test/groovy/specs/AbstractCasSpec.groovy: ########## @@ -0,0 +1,182 @@ +/* + * 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 + * + * https://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 specs Review Comment: Is this a package typically used for tests? ########## grails-spring-security/cas/plugin/src/main/groovy/grails/plugin/springsecurity/cas/SpringSecurityCasGrailsPlugin.groovy: ########## @@ -87,10 +91,30 @@ class SpringSecurityCasGrailsPlugin extends Plugin { if (conf.cas.useSingleSignout) { - // session fixation prevention breaks single signout because - // the service ticket is mapped to the session id which changes + // Session fixation prevention breaks single signout because the service ticket is + // mapped to the session id, which changes when the session is replaced on login. + // Disabling it is a security trade-off the application has opted into, so say so. + String message = ''' + WARNING: cas.useSingleSignout is enabled, so session fixation prevention has been disabled. + CAS maps the service ticket to the HTTP session id, and a logout request cannot be matched to a + session that was replaced when the user authenticated. Set cas.useSingleSignout to false to keep + session fixation prevention and handle logout in the application instead. + ''' + println message Review Comment: Minor: Is the `println` necessary on top of the `log.warn`? ########## grails-test-examples/spring-security/cas/test1/src/main/groovy/spring/security/cas/test/CasTestConfig.groovy: ########## @@ -0,0 +1,72 @@ +/* + * 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 + * + * https://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 spring.security.cas.test Review Comment: Again, not sure if this is following typical Grails test package naming conventions or not. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
