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

Should create special Exception class with special Logging feature. #567

Open
shimono opened this issue Mar 18, 2020 · 0 comments
Open

Should create special Exception class with special Logging feature. #567

shimono opened this issue Mar 18, 2020 · 0 comments
Assignees

Comments

@shimono
Copy link
Member

shimono commented Mar 18, 2020

Overview

Introduce a new subclass of PersoniumCoreException and let it have the feature to have a logging different from the response.

Background

When access control mechanism with a Cell decides to shut the access,
based on the ACL settings and whatever, most of the code throw PersoniumCoreException with HTTP response status code 403 Forbidden and very simple message.

The message is intentionally made very simple for a security reason.
We do not want to give attackers information why the access is blocked.

Instead we need detailed logging on the server side so that app developers and Cell owners can know why the access was prohibited.

Howerver, currently the access block reasons are not sufficiently logged and many users are having difficulty finding the reason of access blockage.

We had had several attempts to improve this issue but never succeeded yet.

It is because the severity level of these exceptions are set at INFO as default and info level Exceptions does not leave detailed log at ExceptionMapper.

Effect of new Exception introduction

By introducing a special Exception class and let the access control related modules use the new exception, We can assure that the access denial reasons are logged as long as the new class is used.

@shimono shimono self-assigned this Mar 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant