-
Notifications
You must be signed in to change notification settings - Fork 78
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
improve anonymization for accountId #2523
Conversation
🦋 Changeset detectedLatest commit: acc2388 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -24,7 +24,7 @@ export class AccountIdFetcher { | |||
new GetCallerIdentityCommand({}) | |||
); | |||
if (stsResponse && stsResponse.Account) { | |||
const accountIdBucket = Number(stsResponse.Account) / 100; | |||
const accountIdBucket = stsResponse.Account.slice(0, -2); | |||
this.accountId = uuidV5( | |||
accountIdBucket.toString(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
accountIdBucket.toString(), | |
accountIdBucket, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops, forgot to remove that
Changes
Follow up for #2519.
Improve anonymization for accountId in response to aws-amplify/amplify-cli#14113 (comment).
Corresponding docs PR, if applicable:
Validation
Added unit test to make sure accountIds fall into different buckets.
Checklist
run-e2e
label set.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.