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

Show injected headers in 'info' log level #110

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Subreptivus
Copy link
Contributor

By default debug loglevel is showing a lot of secret content, but we would like to get injected headers values for audit purposes.

@travisghansen
Copy link
Owner

Have you tried verbose? I prefer not to use info in looping type scenarios.

In the bigger picture, it may be a good idea to implement a sort of logging feature where each log statement has some sort of key and then let the level of all keys be configurable at run time.

I should also document what each of the levels means because mentally I have pretty specific usage scenarios for each. And then audit the usages...

@Subreptivus
Copy link
Contributor Author

Yes I did, but still plenty of unnecessary information is there.
I'll briefly explain how we're using it. In custom header we're injecting username, and then pushing those parts of the EAS logs to central logging system to be able to find out who were logging in to which cluster. We don't want to expose much in the logs and in the same time we don't want to have huge log for without real need.
I don't see it as looping scenario as it's shown only once per pipeline, it's pretty much the same as showing which plugin is in use and how this pipeline was ended.

But it's not a big deal, there are not such frequent updates (btw one of the recent ones with merging jwt and oidc flows is very cool) so I can keep that in my fork, and prepare custom images just for us.

@travisghansen
Copy link
Owner

Yeah glad the oidc features in jwt is helpful! The new single logout stuff is pretty cool as well.

By looping in this context I mean there are n+1 due to the fact that there could be any number of injected headers (vs a log entry showing the summation of all injected headers after the loop has run).

It’s a cool use-case though. For now build a custom image and I’ll come up with a more comprehensive solution that will allow fine-grain control across the board for all logging statements.

@travisghansen
Copy link
Owner

I don’t think we can put injected headers into info due to sensitive headers as well (I had some pretty strict criteria about the level that would allow any kind of sensitive data get logged. I would have to review to see if it was debug or verbose).

It looks like there are some other features/fixes in here we should incorporate. Want to break those out into a separate PR?

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.

None yet

2 participants