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

Task/add access matches (about users, headers, path. .. ) to access Logger #544

Merged
merged 35 commits into from
Oct 11, 2024

Conversation

AlvaroVega
Copy link
Member

@AlvaroVega AlvaroVega commented Oct 7, 2024

#541

Add to access logger info about:

  • User name
  • URL request path
  • request query
  • request body

Add Access match configuration in a file with a watchdog for updates

Check access match by

  • Users
  • Headers (service, subservice, origin)
  • SubPaths
  • Subqueries
  • Body strings
  • Doc about usage

@AlvaroVega AlvaroVega changed the title [WIP] Task/add access match [WIP] Task/add access matches (about users, headers, path. .. ) to access Logger Oct 8, 2024
@AlvaroVega AlvaroVega changed the title [WIP] Task/add access matches (about users, headers, path. .. ) to access Logger Task/add access matches (about users, headers, path. .. ) to access Logger Oct 8, 2024
@AlvaroVega AlvaroVega marked this pull request as ready for review October 10, 2024 08:53
@AlvaroVega AlvaroVega requested a review from fgalan October 10, 2024 08:57
@AlvaroVega
Copy link
Member Author

@rg2011

CHANGES_NEXT_RELEASE Outdated Show resolved Hide resolved
Co-authored-by: Fermín Galán Márquez <[email protected]>
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
CHANGES_NEXT_RELEASE Outdated Show resolved Hide resolved
operations.md Outdated Show resolved Hide resolved
Copy link
Member

@fgalan fgalan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fgalan fgalan merged commit 342152a into master Oct 11, 2024
6 of 7 checks passed
@fgalan fgalan deleted the task/add_access_match branch October 11, 2024 10:47
' | SubService=' + req.subService +
' | Action=' + req.action +
' | Path=' + req.path +
' | Query=' + JSON.stringify(req.query) +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En el fichero lib/middleware/proxy.js se trunca el body a 100 caracteres ( ' | Body=' + JSON.stringify(req.body).slice(0, 100) + // not all body), y aquí no, ¿cual es el motivo?

Copy link
Contributor

@rg2011 rg2011 Oct 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hablado con Álvaro, por lo visto se loga el body entero cuando hay error, y solo una parte cuando no lo hay. NTC

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

El body se trunca a 100 caracteres en caso de acceso valido y se deja entero en caso de error

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Faltaba documentarlo: #545

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

Successfully merging this pull request may close these issues.

3 participants