Closed Bug 1650787 Opened 5 years ago Closed 5 years ago

Implement the JWE metric type

Categories

(Data Platform and Tools :: Glean: SDK, enhancement, P1)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mdroettboom, Assigned: brizental)

References

Details

Attachments

(5 files)

Now that bug 1634468 is approved, we can proceed with the implementation as designed in the document

Priority: P3 → P2
Whiteboard: [telemetry:glean-rs:m?]
Assignee: nobody → brizental
Type: defect → enhancement
Priority: P2 → P1

How far should I go with the validation for each element of the JWE? What I am checking right now:

  1. I check the whole value has 5 elements separated by . (thus, I also check that we have 4 .);
  2. I check that each element has a maximum of 1024 characters;
  3. I check that each element is valid BASE64URL.

With this, a string such as "...." validates correctly, which doesn't seem right. Or is that good enough?

Should I be validating each field separately, each having it's own constraints?

Flags: needinfo?(alessio.placitelli)

(In reply to Beatriz Rizental from comment #1)

With this, a string such as "...." validates correctly, which doesn't seem right. Or is that good enough?

I believe that the JWE spec does not allow for all the fields to be empty. If that's the case, I'd only add a check for that.

Flags: needinfo?(alessio.placitelli)

If I understand the spec correctly, only header and cipher_text must not be empty. I'll add a check for that.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Depends on: 1634468
See Also: → 1663763
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: