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

Drop the User EID object if the all the ID values are empty #3859

Open
Pubmatic-Supriya-Patil opened this issue Aug 14, 2024 · 3 comments
Open
Labels

Comments

@Pubmatic-Supriya-Patil
Copy link
Contributor

Prebid Server has validation on the user EIDS object where User.Id is a required field. There can be situations where the publisher has set a macro in the GAM tag for the User.Id field. For some requests, it's possible that this macro value is missing. Instead of returning a bad request, we can add a check to remove the Id field if it is not present.
Example
Valid EID:[{"source":"uidapi.com","uids":[{"id":"AgAACYa0cG2jcVcM42xG"}]}]
Invalid EID: [{"source":"uidapi.com","uids":[{"id":""}]}]
So with this, problem is like if we have mix of valid and invalid id's for same source then its returning invalid request.
Example: [{"source":"uidapi.com","uids":[{"id":""}, {"id":"AgAACYa0cG2jcVcM42xG"}]}, {"source":"liveramp.com","uids":[{"id":"AgAACYa0cG2jcVcM42xG"}]}, {"source":"yahoo.com","uids":[{"id":""},{"id":""}]}]

Here expectation is like valid id's should get considerd and invalid Id's can be dropped.

Example: [{"source":"uidapi.com","uids":[{"id":""}, {"id":"AgAACYa0cG2jcVcM42xG"}]}, {"source":"liveramp.com","uids":[{"id":"AgAACYa0cG2jcVcM42xG"}]}, {"source":"yahoo.com","uids":[{"id":""},{"id":""}]}]

After adding new logic to drop invalid ID's it should return valid ID's only like below

[{"source":"uidapi.com","uids":[{"id":"AgAACYa0cG2jcVcM42xG"}]}{"source":"liveramp.com","uids":[{"id":"AgAACYa0cG2jcVcM42xG"}]}]

If No valid id present then drop complete EIDS object
Example: [{"source":"uidapi.com","uids":[{"id":""}]}]

@bretg
Copy link
Contributor

bretg commented Aug 14, 2024

Discussed in committee. This sounds fine except that we'd also like warnings to be emitted when in debug mode:

  • "removed EID uidapi.com due to empty ID"
  • "removed empty EID array"

Received a clarification question:

do we need to add warning for each remove EID if eventually we remove the whole EIDs array?

I would say 'yes', there could be a series of warnings:

  • "removed EID X due to empty ID"
  • "removed EID Y due to empty ID"
  • "removed EID Z due to empty ID"
  • "removed empty EID array"

@Pubmatic-Supriya-Patil
Copy link
Contributor Author

PR: #3891

@bretg
Copy link
Contributor

bretg commented Oct 8, 2024

Done with PBS-Java 3.13

@bretg bretg added the PBS-Go label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Ready for Dev
Development

No branches or pull requests

2 participants