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

add config variable to explicitly ignore AWS credentials #8530

Merged
merged 3 commits into from Jul 17, 2023

Conversation

thrau
Copy link
Member

@thrau thrau commented Jun 19, 2023

quick fix for #8225 and #8380

i'd like to get some input from @dfangl and @viren-nadkarni whether this makes sense and is something we can expand on.

@thrau thrau requested a review from dfangl June 19, 2023 20:40
@thrau thrau added the semver: patch Non-breaking changes which can be included in patch releases label Jun 19, 2023
@coveralls
Copy link

coveralls commented Jun 19, 2023

Coverage Status

coverage: 82.293% (+0.01%) from 82.28% when pulling e606e8b on squelch-aws-credentials-logs into 3a6a330 on master.

@github-actions
Copy link

github-actions bot commented Jun 19, 2023

LocalStack Community integration with Pro

       2 files         2 suites   1h 35m 17s ⏱️
2 239 tests 1 896 ✔️ 343 💤 0
2 240 runs  1 896 ✔️ 344 💤 0

Results for commit e606e8b.

♻️ This comment has been updated with latest results.

@@ -103,9 +103,10 @@ def get_account_id_from_access_key_id(access_key_id: str) -> str:
if not config.PARITY_AWS_ACCESS_KEY_ID:
# If AWS_ACCESS_KEY_ID has production AWS credentials, ignore them
if access_key_id.startswith("ASIA") or access_key_id.startswith("AKIA"):
LOG.warning(
Copy link
Member

Choose a reason for hiding this comment

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

I would prefer changing the log level here to debug than adding yet another config option which simply supresses a single log message.

Copy link
Member Author

Choose a reason for hiding this comment

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

Also ok for me

Copy link
Member

Choose a reason for hiding this comment

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

Hard to say, I think. People are using DEBUG=1 very often, so it might still spam them. Then, on the other hand, I think warning is the correct log level, as it is something unexpected happening, not just some site note to a expected flow.

I am okay with either way. I agree with this approach not scaling in the future but on the other hand it does not really fit the "debug" logs.

In any case, I think it only solves #8380, and not the other issue (we need to investigate where these "production" credentials come from there).

@dfangl dfangl self-assigned this Jul 13, 2023
@dfangl dfangl added this to the 2.2 milestone Jul 13, 2023
@dfangl dfangl force-pushed the squelch-aws-credentials-logs branch from 630f19b to e606e8b Compare July 17, 2023 10:31
@dfangl dfangl requested review from viren-nadkarni and removed request for dfangl July 17, 2023 10:31
Copy link
Member

@viren-nadkarni viren-nadkarni left a comment

Choose a reason for hiding this comment

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

LGTM!

We can revisit this if this is still an issue for the users.

@thrau thrau merged commit de2629d into master Jul 17, 2023
25 checks passed
@thrau thrau deleted the squelch-aws-credentials-logs branch July 17, 2023 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants