Skip to content

Commit

Permalink
fix(logs): remove invalid data protection data identifier (#27388)
Browse files Browse the repository at this point in the history
### Notes 
`DataIdentifier.PHONENUMBER` is not a valid identifier (this can be verified in AWS Console), this should be removed to avoid confusion. Adding this identifier will cause `An error occurred (InvalidParameterException) when calling the PutDataProtectionPolicy operation: arn:aws:dataprotection::aws:data-identifier/PhoneNumber is not a valid Data Identifier`.

Note: I am an SDE on CloudWatch Logs, this was brought up by a user, please message kvcg@ internally for questions regarding this PR. 

### Testing
Unit tests passing in `aws-logs/test/loggroup.test.ts`.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
kchg committed Oct 5, 2023
1 parent 8b20c11 commit 4db166d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions allowed-breaking-changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -226,3 +226,6 @@ base-types:aws-cdk-lib.aws_autoscaling.CronOptions
removed:aws-cdk-lib.aws_autoscaling.CronOptions.timeZone
removed:aws-cdk-lib.aws_autoscaling.CronOptions.year
removed:aws-cdk-lib.aws_backup.BackupPlanRuleProps.schedule

# This data identifer was added by mistake; it had never worked.
removed:aws-cdk-lib.aws_logs.DataIdentifier.PHONENUMBER
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ export class DataIdentifier {
public static readonly PERMANENTRESIDENCENUMBER_CA = new DataIdentifier('PermanentResidenceNumber-CA');
public static readonly PERSONALHEALTHNUMBER_CA = new DataIdentifier('PersonalHealthNumber-CA');
public static readonly PGPPRIVATEKEY = new DataIdentifier('PgpPrivateKey');
public static readonly PHONENUMBER = new DataIdentifier('PhoneNumber');
public static readonly PHONENUMBER_BR = new DataIdentifier('PhoneNumber-BR');
public static readonly PHONENUMBER_DE = new DataIdentifier('PhoneNumber-DE');
public static readonly PHONENUMBER_ES = new DataIdentifier('PhoneNumber-ES');
Expand Down
1 change: 0 additions & 1 deletion packages/aws-cdk-lib/awslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,6 @@
"docs-public-apis:aws-cdk-lib.aws_logs.DataIdentifier.PERMANENTRESIDENCENUMBER_CA",
"docs-public-apis:aws-cdk-lib.aws_logs.DataIdentifier.PERSONALHEALTHNUMBER_CA",
"docs-public-apis:aws-cdk-lib.aws_logs.DataIdentifier.PGPPRIVATEKEY",
"docs-public-apis:aws-cdk-lib.aws_logs.DataIdentifier.PHONENUMBER",
"docs-public-apis:aws-cdk-lib.aws_logs.DataIdentifier.PHONENUMBER_BR",
"docs-public-apis:aws-cdk-lib.aws_logs.DataIdentifier.PHONENUMBER_DE",
"docs-public-apis:aws-cdk-lib.aws_logs.DataIdentifier.PHONENUMBER_ES",
Expand Down

0 comments on commit 4db166d

Please sign in to comment.