-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Method Security logging #10279
Improve Method Security logging #10279
Conversation
Those logs were producing too much noise on the console without adding much value. Issue spring-projectsgh-10247
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @marcusdacoregio! I've left feedback inline.
.../main/java/org/springframework/security/authorization/method/Jsr250AuthorizationManager.java
Outdated
Show resolved
Hide resolved
...ringframework/security/authorization/method/AuthorizationManagerBeforeMethodInterceptor.java
Outdated
Show resolved
Hide resolved
...ava/org/springframework/security/authorization/method/PostAuthorizeAuthorizationManager.java
Outdated
Show resolved
Hide resolved
1bcdf63
to
f245423
Compare
Thanks very much for your review @jzheaux. I've updated the PR and replied to this comment #10279 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @marcusdacoregio! I've left some inline feedback.
.../main/java/org/springframework/security/authorization/method/Jsr250AuthorizationManager.java
Outdated
Show resolved
Hide resolved
...ringframework/security/authorization/method/AuthorizationManagerBeforeMethodInterceptor.java
Outdated
Show resolved
Hide resolved
...ringframework/security/authorization/method/AuthorizationManagerBeforeMethodInterceptor.java
Outdated
Show resolved
Hide resolved
...ava/org/springframework/security/authorization/method/PostAuthorizeAuthorizationManager.java
Outdated
Show resolved
Hide resolved
f245423
to
28e7ffc
Compare
Thanks @jzheaux, nice suggestions. I updated the PR and it's ready for your review again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @marcusdacoregio! I've left some feedback inline.
In addition to that feedback, will you please separate out the work you are doing with custom AuthorizationDecision
s into a separate commit, resolving #9287 at the same time?
.../main/java/org/springframework/security/authorization/method/Jsr250AuthorizationManager.java
Outdated
Show resolved
Hide resolved
28e7ffc
to
910ad38
Compare
Thanks @jzheaux, I've updated the PR based on your suggestions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @marcusdacoregio. I've left feedback inline about the classes recently introduced.
...src/main/java/org/springframework/security/authorization/AuthorityAuthorizationDecision.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/springframework/security/authorization/AuthorityAuthorizationDecision.java
Outdated
Show resolved
Hide resolved
.../springframework/security/authorization/method/ExpressionAttributeAuthorizationDecision.java
Outdated
Show resolved
Hide resolved
...n/java/org/springframework/security/authorization/AuthorityReactiveAuthorizationManager.java
Show resolved
Hide resolved
.../src/main/java/org/springframework/security/authorization/AuthorityAuthorizationManager.java
Show resolved
Hide resolved
910ad38
to
3933c45
Compare
Hi @jzheaux , thanks for the review. The code is now updated. |
This PR removes the trace logs from the
PrePostAnnotationSecurityMetadataSource
which were producing too much noise in logs without adding much value.There is already some logs that provide value when the
@Pre/PostAuthorize
annotations are being used with@EnableGlobalMethodSecurity
:Additionally, it adds logs for when
@EnableMethodSecurity
is used with@Pre/PostAuthorize
,@Secured
and JSR-250@PermitAll
,@DenyAll
,@RolesAllowed
.Closes gh-10247