{"id":17132183,"url":"https://github.com/bitsofinfo/spring-boot-pre-authorize-issue-01","last_synced_at":"2025-03-24T05:18:38.890Z","repository":{"id":146759342,"uuid":"65327883","full_name":"bitsofinfo/spring-boot-pre-authorize-issue-01","owner":"bitsofinfo","description":"https://github.com/spring-projects/spring-security/issues/4020","archived":false,"fork":false,"pushed_at":"2016-08-12T00:27:21.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-29T11:12:55.513Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitsofinfo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-09T20:59:33.000Z","updated_at":"2016-08-12T00:27:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"c45a492b-57b4-47e5-b85e-482348cb4eb2","html_url":"https://github.com/bitsofinfo/spring-boot-pre-authorize-issue-01","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsofinfo%2Fspring-boot-pre-authorize-issue-01","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsofinfo%2Fspring-boot-pre-authorize-issue-01/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsofinfo%2Fspring-boot-pre-authorize-issue-01/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsofinfo%2Fspring-boot-pre-authorize-issue-01/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitsofinfo","download_url":"https://codeload.github.com/bitsofinfo/spring-boot-pre-authorize-issue-01/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245212311,"owners_count":20578443,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T19:26:18.557Z","updated_at":"2025-03-24T05:18:38.869Z","avatar_url":"https://github.com/bitsofinfo.png","language":"Java","readme":"# spring-boot-pre-authorize-issue-01\n\nhttps://github.com/spring-projects/spring-security/issues/4020\n\nhttps://gitter.im/spring-projects/spring-security?at=57a9d71346610f17394b8ed5\n\nIn `Application.java`\n\nUncomment the block below for have `@PreAuthorize` annotations defined in `TestRecordRepository`\n**NOT be evaluated** (unexpected)\n\nComment out the block, and `@PreAuthorize` annotations in `TestRecordRepository` will work as expected\n\nSee: `MyPermissionEvaluator.java` which will be executed as evidence of the\n`@PreAuthorize` annotations working or not (prints to STDOUT)\n\n```\n@Autowired\nprivate TestRecordRepository testRecordRepository;\n```\n\n\n```\n./gradlew bootRun\n```\n\nTo invoke, hit `http://localhost:8080/testrecords/search/findByFirstname?fn=1`\n\nIf the `@PreAuthorize` annotations are being evaluated you will see entries like the following\non the console stdout on each request:\n\n```\nhasPermission() org.springframework.security.authentication.AnonymousAuthenticationToken@9055c2bc: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@b364: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: null; Granted Authorities: ROLE_ANONYMOUS target: 1 perm:READ\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitsofinfo%2Fspring-boot-pre-authorize-issue-01","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitsofinfo%2Fspring-boot-pre-authorize-issue-01","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitsofinfo%2Fspring-boot-pre-authorize-issue-01/lists"}