Hi Andy, Thank you for providing the steps.
But we are running cas on docker container, for that we are using docker image v5.2.6 from publicly and sending our config properties ( cas.properties, log4j2.xml, pom.xml, JWT.json, build.sh, run-cas.sh) to build our own image then running the cas. So can you please let me know how i can suppress these alerts in our scenario. Regards, Raheem Shaik On Mon, Dec 16, 2019 at 7:05 AM Andy Ng <[email protected]> wrote: > Hi Raheem, > > I also encountered this issue on 5.2.x, not sure if this is still an issue > on later CAS version, I suspect this issue is fixed on later version since > it seems like a spring problem. > > I used a very ugly method to suppress this message, basically I override > the GET method and prevent the trace from giving out. > > ===================================================================== > > *MyCompanyTicketGrantingTicketResourceGetMapper.java* > > package my.company.cas.rest; > import org.springframework.http.HttpStatus;import > org.springframework.http.ResponseEntity;import > org.springframework.web.bind.annotation.GetMapping;import > org.springframework.web.bind.annotation.RestController; > > @RestController("MyCompanyTicketGrantingTicketResourceGetMapper")public class > MyCompanyTicketGrantingTicketResourceGetMapper { > > /** > * Reject Get Response, without exposing error trace to client > * > * @return ResponseEntity representing Method Not Allowed > */ > @GetMapping("/v1/tickets") > public ResponseEntity<String> rejectGetResponse() throws Exception { > return new ResponseEntity<>("Method Not Allowed.", > HttpStatus.METHOD_NOT_ALLOWED); > } > > } > > > > ===================================================================== > *MyCompanyRestConfiguraiton.java* > > package my.company.cas.rest; > import org.apereo.cas.config.CasRestConfiguration;import > org.apereo.cas.configuration.CasConfigurationProperties;import > org.springframework.boot.context.properties.EnableConfigurationProperties;import > org.springframework.context.annotation.Bean;import > org.springframework.context.annotation.Configuration;import > org.springframework.context.annotation.Import; > > > > @Configuration("myCompanyCasRestConfiguration") > @Import(CasRestConfiguration.class) > @EnableConfigurationProperties(CasConfigurationProperties.class)public class > MyCompanyCasRestConfiguration { > > @Bean > public MyCompanyTicketGrantingTicketResourceGetMapper > myCompanyTicketGrantingTicketResourceGetMapper() { > return new MyCompanyTicketGrantingTicketResourceGetMapper(); > } > } > > > > ===================================================================== > And also an in the Auto Configuration on the *MyCompanyRestConfiguraiton > *config > in *spring.factories*. > > ===================================================================== > > It works for me, see if it helps you as well. > > > Cheers! > - Andy > > -- > - Website: https://apereo.github.io/cas > - Gitter Chatroom: https://gitter.im/apereo/cas > - List Guidelines: https://goo.gl/1VRrw7 > - Contributions: https://goo.gl/mh7qDG > --- > You received this message because you are subscribed to the Google Groups > "CAS Community" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/a/apereo.org/d/msgid/cas-user/9fbecda0-bd9a-4423-8585-dc5233b0b5db%40apereo.org > <https://groups.google.com/a/apereo.org/d/msgid/cas-user/9fbecda0-bd9a-4423-8585-dc5233b0b5db%40apereo.org?utm_medium=email&utm_source=footer> > . > -- ******************************************** *Inmar Confidentiality Note*: This e-mail and any attachments are confidential and intended to be viewed and used solely by the intended recipient. If you are not the intended recipient, be aware that any disclosure, dissemination, distribution, copying or use of this e-mail or any attachment is prohibited. If you received this e-mail in error, please notify us immediately by returning it to the sender and delete this copy and all attachments from your system and destroy any printed copies. Thank you for your cooperation. *Notice of Protected Rights*: The removal of any copyright, trademark, or proprietary legend contained in this e-mail or any attachment is prohibited without the express, written permission of Inmar, Inc. Furthermore, the intended recipient must maintain all copyright notices, trademarks, and proprietary legends within this e-mail and any attachments in their original form and location if the e-mail or any attachments are reproduced, printed or distributed. ******************************************** -- - Website: https://apereo.github.io/cas - Gitter Chatroom: https://gitter.im/apereo/cas - List Guidelines: https://goo.gl/1VRrw7 - Contributions: https://goo.gl/mh7qDG --- You received this message because you are subscribed to the Google Groups "CAS Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/CAD_gEK6T%2BhQvBn4eU6XX8sqiH%3Dnk2oe2joSf%3DLW-KpgmZXOmxg%40mail.gmail.com.
