-
Notifications
You must be signed in to change notification settings - Fork 17
Added v4 UIDs #1989
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
base: main
Are you sure you want to change the base?
Added v4 UIDs #1989
Conversation
cc3ddd3
to
6613350
Compare
2d8cf28
to
c702d41
Compare
writing key id as 3 bytes big endian format
…rator into gdm-UID2-5837-v4-uid
796e211
to
baecb11
Compare
advertisingId = TokenUtils.getAdvertisingIdV4(firstLevelHashIdentity.identityScope, firstLevelHashIdentity.identityType, env, firstLevelHashIdentity.id, key); | ||
incrementAdvertisingIdVersionCounter("v4"); | ||
} catch (Exception e) { | ||
LOGGER.error("Exception when generating V4 advertising ID", e); |
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.
This should throw and result in a 500? Will something else up the stack throw if advertisingId is null?
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.
Updated it to throw a RuntimeException
instead, similarly to v2/v3, which eventually results in a 500 HTTP error response
|
||
private byte[] getPreviousAdvertisingId(UserIdentity firstLevelHashIdentity, SaltEntry rotatingSalt, Instant asOf) { | ||
private void incrementAdvertisingIdVersionCounter(String version) { | ||
Counter.builder("uid2_raw_uid_version_total") |
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.
Can you prebuild the counters and map version ints to them? Registering has overhead and this builder causes unnecessary allocations
v4 UID generation
v4TokenUtils.java
v4TokenUtilsTest.java
v2/v3 vs v4 UID logic
TokenUtils.java
UIDOperatorService.java
UIDOperatorVerticleTest.java
Identity enum parity
IdentityEnvironment.java
IdentityScope.java
IdentityType.java
IdentityVersion.java
TokenUtils.java
Other formatting changes