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

Implement audit logging #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

quark-zju
Copy link
Contributor

As with #24, if the HTTP content is controlled by other team, we probably want to log every HTTP responses, for being able to audit them later.

This patch add an option to log all HTTP requests and responses to a specified directory. Inspired by git, responses are gzipped and stored using their SHA1 as filenames. They can be easily handled with zcat, zless, zgrep, etc.

If the HTTP content is controlled by other team, we probably want
to audit every HTTP responses, later.

This patch allows us to log all HTTP requests and responses.
Inspired by git, responses are gzipped and stored using their SHA1
as filenames.
@crayfishx
Copy link
Owner

Shouldn't this be more of a generic Hiera function rather than the job of an individual back end?

@quark-zju
Copy link
Contributor Author

No. As previously explained, remote HTTP(s) data (http backend) is controlled by "untrusted" team. Data from other backends are managed by a trusted team. Therefore only remote HTTP(s) responses should be audited.

@crayfishx
Copy link
Owner

Im not sure that there are going to be many use cases to make this part of the HTTP back end - and it does seem like people wanting to audit lookups may wish to do so with a variety of backends - have you thought about putting this logic into it's own backend, a pseudo backend called 'audit' that always returns nill - you can then add options to hiera.yaml to define what gets audited - that would seem to solve your issue and also make the functionality available to all users of all backends.

Thoughts?

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

Successfully merging this pull request may close these issues.

2 participants