-
Notifications
You must be signed in to change notification settings - Fork 38
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
Fix fips compliance 272 #273
Conversation
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.
LGTM, @iliapolo what do you think?
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.
I take my "LGTM" back... we won't be able to change how uniqueId calculates hashes because it will break all CDK code that uses this property to create stable names.
As part of #250, I think we need to basically soft-deprecate uniqueId
in favor of something more ubiquitous and then we can use a different hash algorithm.
@eladb Interesting, I was afraid that might be the case. Ultimately, I think this is an issue where what we want is the |
So, a couple of options come to mind for me:
Thoughts? |
@rix0rrr @RomainMuller @njlynch Interested on your take here |
I noted it in the issue, but we've got a workaround script to unblock our team on this, so feel free to discuss as needed. Whatever fix feels right to the team should be fine with us once it's ready, and I'll be happy to verify it in our FIPS environment. |
The `uniqueId` property has a few issues: 1. It uses MD5 which is not FIPS-compliant (fixes #273) 2. They have variable length of up to 255 chars which may not be suitable in certain domains (e.g. k8s label names are limited to 63 characters). 3. The human-readable portion of `uniqueId` is sometimes confusing and in many cases does not offer sufficient value. 4. Their charset might be restrictive or too broad for certain domains. To that end, we introduce `node.addr` as an alternative to `uniqueId`. It returns a 42 character hexadecimal, lowercase and opaque address for a construct which is unique within the tree (app). The address is calculated using SHA-1 which is FIPS-compliant. For example: c83a2846e506bcc5f10682b564084bca2d275709ee Similar to `uniqueId`, `addr` intentionally skips any path components called `default` (case insensitive) to allow refactoring of construct trees which preserve names within the tree.
Superseded by #314 |
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
This fixes #272
I have verified that when used in a FIPS enabled cluster, we no longer see the reported issue.