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

cli: genpolicy logging: Add debug log level and repository reference to auth failure #1044

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

jmxnzo
Copy link
Contributor

@jmxnzo jmxnzo commented Dec 2, 2024

The PR includes the debug log level of genpolicy into the Contrast CLI. Thus the resulting mapping is:

Contrast info == Genpolicy warning
Contrast debug == Genpolicy info/debug

As well it patches the existing genpolicy error message in case of an authentication failure, to include the reference to the repository.

@jmxnzo jmxnzo added the no changelog PRs not listed in the release notes label Dec 2, 2024
@jmxnzo jmxnzo requested a review from burgerdev December 2, 2024 12:38
@jmxnzo jmxnzo requested a review from katexochen as a code owner December 2, 2024 12:38
@jmxnzo jmxnzo force-pushed the genpolicy-logging-jla branch 2 times, most recently from 24984c5 to c4f9bc9 Compare December 2, 2024 14:03
@katexochen
Copy link
Member

I guess it should also be possible to upstream that patch?

@jmxnzo jmxnzo force-pushed the genpolicy-logging-jla branch from c4f9bc9 to e94bb43 Compare December 2, 2024 14:09
@jmxnzo
Copy link
Contributor Author

jmxnzo commented Dec 2, 2024

I guess it should also be possible to upstream that patch?

I'm going to open an upstream issue and then finish the missing questions in the comment.

@jmxnzo jmxnzo force-pushed the genpolicy-logging-jla branch from e94bb43 to ab6269d Compare December 3, 2024 12:40
Copy link
Member

@katexochen katexochen left a comment

Choose a reason for hiding this comment

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

commit messages should be:

cli/genpolicy: include log-level 'debug' in Contrast logs
microsoft.genpolicy: log image reference on unauthorized access

packages/by-name/microsoft/genpolicy/package.nix Outdated Show resolved Hide resolved
packages/by-name/microsoft/genpolicy/package.nix Outdated Show resolved Hide resolved
cli/genpolicy/genpolicy.go Show resolved Hide resolved
@jmxnzo jmxnzo force-pushed the genpolicy-logging-jla branch 3 times, most recently from c513151 to 583466c Compare December 3, 2024 14:12
Copy link
Contributor

@burgerdev burgerdev left a comment

Choose a reason for hiding this comment

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

lgtm

@jmxnzo jmxnzo force-pushed the genpolicy-logging-jla branch from 583466c to 0509b20 Compare December 4, 2024 08:49
@jmxnzo jmxnzo force-pushed the genpolicy-logging-jla branch from 0509b20 to a75af8a Compare December 4, 2024 08:50
Copy link
Contributor

@burgerdev burgerdev left a comment

Choose a reason for hiding this comment

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

Thanks, I think the message is clear now!

@jmxnzo jmxnzo merged commit 1d5e7c8 into main Dec 4, 2024
11 checks passed
@jmxnzo jmxnzo deleted the genpolicy-logging-jla branch December 4, 2024 13:08
@katexochen katexochen added changelog PRs that should be part of the release notes and removed no changelog PRs not listed in the release notes labels Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog PRs that should be part of the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants