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

Enhanced Logging #144

Closed
tommathee opened this issue May 9, 2024 · 2 comments
Closed

Enhanced Logging #144

tommathee opened this issue May 9, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@tommathee
Copy link

Example: Currently, the OWASP Application Gateway effectively redirects HTTP requests to HTTPS as part of its security protocol. However, no logs are generated for these redirection events. Enhanced logging for these actions would greatly improve the ability to monitor and verify the redirection process.

Observed Behavior:

  • HTTP requests are redirected to HTTPS.
  • No logs are produced to confirm or detail the redirection process.

Expected Behavior:

  • HTTP requests are redirected to HTTPS.
  • Detailed logs should be generated for each redirection event, capturing information such as the original HTTP request and the HTTPS URL to which it was redirected.

Suggested Enhancement:

I propose implementing detailed logging not only for HTTP to HTTPS redirections within the gateway, but all possible functionalities. This would involve capturing and reporting key data about each redirection event in the gateway's logs.

Proposed Log Format for HTTPS redirection:
INFO - Response status code 301 Moved Permanently for GET http://xxx.com
INFO - Redirecting to https://xxx.com (HTTP to HTTPS Redirection Rule applied)

@Padi-owasp Padi-owasp self-assigned this May 11, 2024
@Padi-owasp Padi-owasp added the enhancement New feature or request label May 11, 2024
@Padi-owasp
Copy link
Member

That should be possible to do in the next iteration -> around Q3/24.

@Padi-owasp
Copy link
Member

Padi-owasp commented Jun 7, 2024

This option is already available. In Fact logs are written on debug level (which is for most cases preferred in this case). To enable Redirect logging just add the following section to the application.yaml file:

logging:
  level:
    root: WARN
    org:
      owasp: INFO
    oag.filters.spring.HttpRedirectFilter: DEBUG

I'll add a documentation section for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants