{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/7383","repository_url":"https://api.github.com/repos/spring-projects/spring-boot","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/7383/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/7383/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/7383/events","html_url":"https://github.com/spring-projects/spring-boot/issues/7383","id":189147866,"number":7383,"title":"server.session.timeout is not expiring session","user":{"login":"fedepia","id":8620635,"avatar_url":"https://avatars.githubusercontent.com/u/8620635?v=3","gravatar_id":"","url":"https://api.github.com/users/fedepia","html_url":"https://github.com/fedepia","followers_url":"https://api.github.com/users/fedepia/followers","following_url":"https://api.github.com/users/fedepia/following{/other_user}","gists_url":"https://api.github.com/users/fedepia/gists{/gist_id}","starred_url":"https://api.github.com/users/fedepia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedepia/subscriptions","organizations_url":"https://api.github.com/users/fedepia/orgs","repos_url":"https://api.github.com/users/fedepia/repos","events_url":"https://api.github.com/users/fedepia/events{/privacy}","received_events_url":"https://api.github.com/users/fedepia/received_events","type":"User","site_admin":false},"labels":[{"id":97741072,"url":"https://api.github.com/repos/spring-projects/spring-boot/labels/waiting-for-feedback","name":"waiting-for-feedback","color":"fef2c0","default":false},{"id":293438798,"url":"https://api.github.com/repos/spring-projects/spring-boot/labels/waiting-for-triage","name":"waiting-for-triage","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-11-14T15:51:54Z","updated_at":"2016-11-14T20:28:23Z","closed_at":null,"body":"Hi, \r\n\r\nAccording to the documentation on [this link(\r\nhttp://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html)\r\nthe `session timeout` property says:\r\n\r\n> server.session.timeout= # Session timeout in seconds.\r\n\r\nSo, I want to make the session to timeout after 5 seconds by using:\r\n\r\n```\r\nserver.session.timeout=5\r\n```\r\n\r\nbut the session is not expiring, also waited for 5min but didn't expire either.\r\n\r\nI am using SprintBoot version 1.4.1.RELEASE with an embedded Tomcat. Not sure if it is worth it to mention that I'm using spring security as well to check users.\r\n\r\nRegards"},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/260452716","html_url":"https://github.com/spring-projects/spring-boot/issues/7383#issuecomment-260452716","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/7383","id":260452716,"user":{"login":"fedepia","id":8620635,"avatar_url":"https://avatars.githubusercontent.com/u/8620635?v=3","gravatar_id":"","url":"https://api.github.com/users/fedepia","html_url":"https://github.com/fedepia","followers_url":"https://api.github.com/users/fedepia/followers","following_url":"https://api.github.com/users/fedepia/following{/other_user}","gists_url":"https://api.github.com/users/fedepia/gists{/gist_id}","starred_url":"https://api.github.com/users/fedepia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedepia/subscriptions","organizations_url":"https://api.github.com/users/fedepia/orgs","repos_url":"https://api.github.com/users/fedepia/repos","events_url":"https://api.github.com/users/fedepia/events{/privacy}","received_events_url":"https://api.github.com/users/fedepia/received_events","type":"User","site_admin":false},"created_at":"2016-11-14T20:28:23Z","updated_at":"2016-11-14T20:28:23Z","body":"Thanks @wilkinsona, good to know. I'll try Jetty to see if I have the same problem.\r\n\r\n@philwebb, I don't have any configuration my app it is just a bunch of webservices. The only configuration I use is this for spring security and anything else:\r\n\r\n`@Configuration\r\n@EnableWebSecurity\r\npublic class SecurityConfig extends WebSecurityConfigurerAdapter {\r\n\t@Autowired\r\n\tUserRepository userRepository;\r\n\t\r\n\tprivate Logger logger = LoggerFactory.getLogger(SecurityConfig.class);\r\n\t\r\n\t/**\r\n\t * Configures the http security\r\n\t */\r\n\t@Override\r\n\tprotected void configure(HttpSecurity http) throws Exception {\r\n\t\t// Allows connections for test endpoints. Note MockWebServer needs this endpoint free for testing\r\n\t\thttp.authorizeRequests().antMatchers(\"/test/**\").permitAll();\r\n\r\n\t\t// Configure all requests to use header basic auth. \r\n\t\t// CSRF is disabled meaning that session is not saved and all request will need auth.\r\n\t\thttp\r\n\t\t\t.authorizeRequests()\r\n\t\t\t\t.anyRequest().fullyAuthenticated()\r\n\t\t\t\t.and().httpBasic()\r\n\t\t\t\t.and().csrf().disable();\t\r\n\t}\r\n\t\r\n\t/**\r\n\t * Configure authentication to use User database table and Bcrypt to check passwords\r\n\t */\r\n\t@Override\r\n    protected void configure(final AuthenticationManagerBuilder auth) throws Exception {\r\n\t\tDaoAuthenticationProvider authProvider = new DaoAuthenticationProvider();\r\n\t    authProvider.setUserDetailsService(userDetailsService());\r\n\t    authProvider.setPasswordEncoder(new BCryptPasswordEncoder());\r\n\t    \r\n        auth.authenticationProvider(authProvider);\r\n    }\r\n\t\r\n\t/**\r\n\t * Define the user details spring security with a custom implementation.\r\n\t * This custom implementation will use User repository and will search for users that are only active \r\n\t */\r\n\t@Bean\r\n\tpublic UserDetailsService userDetailsService() {\r\n\t\treturn new UserDetailsService() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {\r\n\t\t\t\tUser user = userRepository.findByUsernameAndActive(username, true);\r\n\t\t\t\tif (user != null) {\r\n\t\t\t\t\t// Creates spring security User using CreditSesame user\r\n\t\t\t\t\treturn new org.springframework.security.core.userdetails.User(user.getUsername(),\r\n\t\t\t\t\t\t\tuser.getPassword(), true, true, true, true, AuthorityUtils.createAuthorityList(\"USER\"));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tlogger.error(\"Could not find any active user '{}'\", username );\r\n\t\t\t\tthrow new UsernameNotFoundException(\"Could not find any active user '\" + username + \"'\");\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n}`\r\n\r\nI started to think that this might be related to Tomcat. Will post asap the result with Jetty"}}
{"actor":{"display_login":"fedepia"}}