Skip to content

[Feature Request / Contribution Proposal] working with internet drafts #112

Open

Description

@beltram

Hi, and first of all thanks for the crate, it great, love it.

When working with internet drafts there are very often a lot of pending/requested IANA codepoints that are not within the private range and hence cannot be used within the ClaimSetBuilder which is a very convenient way to build a Cose object.

One have to resort to do the CBOR serialization by hand on the side to bypass this line.

My proposal is to add another variants like such:

pub enum RegisteredLabelWithPrivate<T: EnumI64 + WithPrivateRange> {
    PrivateUse(i64),
    InternetDraft(T),
    Assigned(T),
    Text(String),
}

#[derive(Clone, Debug, Eq, PartialEq)]
pub enum RegisteredLabel<T: EnumI64> {
    InternetDraft(T),
    Assigned(T),
    Text(String),
}

And an associated ClaimSetBuilder::internet_draft_claim that would let pass arbitrary labels.

What do you think ?

Activity

  1. added a commit that references this issue on Sep 15, 2025
    dc85df4
  2. daviddrysdale commented on Sep 15, 2025

    @daviddrysdale
    Contributor

    Which draft IANA codepoints do you need?

    If the draft is reasonably stable it might be easiest just to update the enum values to include the draft values, albeit with a risk that a future change in the value would necessitate a breaking change to the crate. For example, we're likely to add (0dd34d7) the draft values for ML-DSA.

    The other alternative is to change the RegisteredLabel types as you suggest. I had a go in #114, and it does result in a fair amount of non-back-compatible change.

  3. beltram commented on Sep 15, 2025

    @beltram
    Author

    Hi @daviddrysdale thanks for having a look.

    I have 2 drafts on top of my mind for which I required this:

    • StatusList, pretty mature AFAIK. Just 1 claim.
    • OIDC claims, WGLC should happen fairly soon as well. 19 claims this time 😅
  4. daviddrysdale commented on Sep 16, 2025

    @daviddrysdale
    Contributor

    Looks like there's 3 now?

    • OIDC claims, WGLC should happen fairly soon as well. 19 claims this time 😅

    The datatracker for that one still seems early/unstable – IESG state is just "I-D Exists"?

  5. beltram commented on Sep 16, 2025

    @beltram
    Author

    Looks like there's 3 now?

    Yes right, 3 indeed.

    • OIDC claims, WGLC should happen fairly soon as well. 19 claims this time 😅

    The datatracker for that one still seems early/unstable – IESG state is just "I-D Exists"?

    This one is mine, I can assure you WGLC is close ;)

    Anyway, my issue is more about the next time I'll be implementing a draft, the issue will still be there. If adding an Unassigned variant and merging that in the next major release of the crate could be done that would be awesome 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions