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

Adding methods to allow to get UUIDs with random MAC address #63

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

alessandrozucca
Copy link

@alessandrozucca alessandrozucca commented Oct 25, 2017

Added two methods that allow to get a UUID v1/v2 with a randomised MAC address.

In the existing NewV1() and NewV2() the MAC address is only randomised when the network card is not found.

NewV1RandomMAC()
NewV2RandomMAC()

Reasons:
We want to use UUID v1 so that the timestamp can be used to find the right partition quickly (when a table is partitioned by time)

At the same time we don't want to expose the MAC address for security reasons.

#64

@coveralls
Copy link

coveralls commented Oct 25, 2017

Coverage Status

Coverage increased (+0.4%) to 96.939% when pulling bcea4fa on intelligentpos:IPL-147/random-mac-address into 5bf94b6 on satori:master.

@alessandrozucca alessandrozucca changed the title Random mac address Adding methods to allow to get UUIDs with random MAC address Oct 25, 2017
@coveralls
Copy link

coveralls commented Oct 25, 2017

Coverage Status

Coverage increased (+0.4%) to 96.939% when pulling e9aca44 on intelligentpos:IPL-147/random-mac-address into 5bf94b6 on satori:master.

@coveralls
Copy link

coveralls commented Oct 26, 2017

Coverage Status

Coverage increased (+0.4%) to 96.939% when pulling d80f1d2 on intelligentpos:IPL-147/random-mac-address into 5bf94b6 on satori:master.

Copy link

@geototti21 geototti21 left a comment

Choose a reason for hiding this comment

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

Looks very useful

@docmerlin
Copy link

This is great, its especially necessary when in docker containers on separate machines not in some sort of orchestration setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants