Skip to content
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

Failed Authorization Policy Details in Logs #7789

Closed
stap123 opened this issue Feb 21, 2019 · 4 comments
Closed

Failed Authorization Policy Details in Logs #7789

stap123 opened this issue Feb 21, 2019 · 4 comments
Assignees
Labels
area-auth Includes: Authn, Authz, OAuth, OIDC, Bearer Done This issue has been fixed

Comments

@stap123
Copy link

stap123 commented Feb 21, 2019

Would it be possible to have a feature where instead of the DefaultAuthorizationService logging a message saying Authorization Failed it gave a little more context to the failure.

Maybe something like saying Authorization Failed for Policy: "Policy Name" or Authorization Failed for Role: "Role Name" etc.

When you're building a complex application you can easily have many Authorize conditions being applied and it can be quite derived to find out what specifically failed.

@blowdart
Copy link
Contributor

@HaoK seems reasonable. Can we sneak this into 3.0?

@blowdart blowdart added the area-auth Includes: Authn, Authz, OAuth, OIDC, Bearer label Feb 21, 2019
@Eilon Eilon added this to the 3.0.0-preview6 milestone Mar 26, 2019
@Eilon Eilon added the help wanted Up for grabs. We would accept a PR to help resolve this issue label Apr 18, 2019
@Eilon Eilon modified the milestones: 3.0.0-preview6, Backlog Apr 18, 2019
@huysentruitw
Copy link
Contributor

How do we see this?

  • Should each Requirement class override ToString?
  • Do we add a method to IAuthorizationRequirement interface?
  • Do we add a private method to LoggingExtensions for building the message?
  • Other?

Also, are these error messages localized?

@xperiandri
Copy link

How to figure out what is wrong? I have such issue and I don't know even where to look 🤯

@HaoK
Copy link
Member

HaoK commented Oct 25, 2019

Thanks for helping with this @wu-yafeng !

@HaoK HaoK closed this as completed Oct 25, 2019
@HaoK HaoK added Done This issue has been fixed and removed help wanted Up for grabs. We would accept a PR to help resolve this issue labels Oct 25, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-auth Includes: Authn, Authz, OAuth, OIDC, Bearer Done This issue has been fixed
Projects
None yet
Development

No branches or pull requests

6 participants