{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/13183","repository_url":"https://api.github.com/repos/spring-projects/spring-boot","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/13183/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/13183/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/13183/events","html_url":"https://github.com/spring-projects/spring-boot/issues/13183","id":323267974,"number":13183,"title":"Support for adding an EndpointRequest request matcher for the actuator base path","user":{"login":"filiphr","id":6012094,"avatar_url":"https://avatars2.githubusercontent.com/u/6012094?v=4","gravatar_id":"","url":"https://api.github.com/users/filiphr","html_url":"https://github.com/filiphr","followers_url":"https://api.github.com/users/filiphr/followers","following_url":"https://api.github.com/users/filiphr/following{/other_user}","gists_url":"https://api.github.com/users/filiphr/gists{/gist_id}","starred_url":"https://api.github.com/users/filiphr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filiphr/subscriptions","organizations_url":"https://api.github.com/users/filiphr/orgs","repos_url":"https://api.github.com/users/filiphr/repos","events_url":"https://api.github.com/users/filiphr/events{/privacy}","received_events_url":"https://api.github.com/users/filiphr/received_events","type":"User","site_admin":false},"labels":[{"id":97741072,"url":"https://api.github.com/repos/spring-projects/spring-boot/labels/status:%20waiting-for-feedback","name":"status: waiting-for-feedback","color":"fef2c0","default":false},{"id":293438798,"url":"https://api.github.com/repos/spring-projects/spring-boot/labels/status:%20waiting-for-triage","name":"status: waiting-for-triage","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2018-05-15T15:24:53Z","updated_at":"2018-05-16T21:17:08Z","closed_at":null,"author_association":"NONE","body":"We are adding multiple Spring Security configurations and we want to have the actuator protected in it's own configuration. We are doing the following:\r\n\r\n```java\r\nhttp\r\n .requestMatcher(EndpointRequest.toAnyEndpoint())\r\n .authorizeRequests()\r\n .requestMatchers(EndpointRequest.to(InfoEndpoint.class, HealthEndpoint.class)).authenticated()\r\n .requestMatchers(EndpointRequest.toAnyEndpoint()).hasAnyAuthority(DefaultPrivileges.ACCESS_ADMIN)\r\n  .and().httpBasic();\r\n```\r\n\r\nIf I do `EndpointRequest.toLinks()` are used then only the `/actuator` is matched and not `/actuator/**`"},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/389668667","html_url":"https://github.com/spring-projects/spring-boot/issues/13183#issuecomment-389668667","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/13183","id":389668667,"user":{"login":"filiphr","id":6012094,"avatar_url":"https://avatars2.githubusercontent.com/u/6012094?v=4","gravatar_id":"","url":"https://api.github.com/users/filiphr","html_url":"https://github.com/filiphr","followers_url":"https://api.github.com/users/filiphr/followers","following_url":"https://api.github.com/users/filiphr/following{/other_user}","gists_url":"https://api.github.com/users/filiphr/gists{/gist_id}","starred_url":"https://api.github.com/users/filiphr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filiphr/subscriptions","organizations_url":"https://api.github.com/users/filiphr/orgs","repos_url":"https://api.github.com/users/filiphr/repos","events_url":"https://api.github.com/users/filiphr/events{/privacy}","received_events_url":"https://api.github.com/users/filiphr/received_events","type":"User","site_admin":false},"created_at":"2018-05-16T21:17:08Z","updated_at":"2018-05-16T21:17:08Z","author_association":"NONE","body":"I created a [demo project](https://github.com/filiphr/demo-actuator-security-performance) where one can pick between using a base path `AntMatcher` or the `EndpointRequest#toAnyEndpoint()`.\r\n\r\nI did some runs with 100000 iterations calling the greeting controller and I get\r\n* 4175 (3963) req/s when base path matcher is used\r\n* 3691 (3157) req/s when `EndpointReques#toAnyEndpoint()` is used\r\n\r\nThe numbers are computed by invoking the actuator metrics endpoint.\r\n\r\nFeel free to play around with the project. Both numbers are of course good and in a real world scenario they might defer, but I just wanted to show that it might make a difference."}}
{"actor":{"display_login":"filiphr"}}