Skip to content

Add an algorithm for setting the agent certificate serial number - #293

Merged
markafoltz merged 5 commits into
mainfrom
issue-280-serial
Feb 28, 2024
Merged

markafoltz merged 5 commits into
mainfrom
issue-280-serial

Conversation

@markafoltz

@markafoltz markafoltz commented Sep 7, 2022 •

Copy link
Copy Markdown
Contributor

This addresses Issue #276: Agent Certificate has a circular dependency on itself

We can't use the certificate fingerprint as the serial number, because the serial number is embedded in the certificate itself.

X.509 requires every certificate from the same issuer to have a unique (not necessarily consecutive) serial number.

This PR adds a simple algorithm to generate a unique per-agent serial number per certificate. Even if an agent generates a new certificate once per hour, the counter would take almost 500,000 years to overflow :-P


Preview | Diff

@markafoltz markafoltz added the F2F label Sep 7, 2022
@markafoltz
markafoltz requested a review from chrisn September 7, 2022 21:59
@markafoltz

Copy link
Copy Markdown
Contributor Author

Feel free to review now in advance of TPAC.

@markafoltz

Copy link
Copy Markdown
Contributor Author

baylesj@, do you mind taking a look?

@anssiko

anssiko commented Mar 6, 2023

Copy link
Copy Markdown
Member

PTAL @baylesj I suppose :)

@markafoltz markafoltz linked an issue Sep 11, 2023 that may be closed by this pull request
@markafoltz markafoltz added v1-spec security-tracker Group bringing to attention of security, or tracked by the security Group but not needing response. labels Sep 11, 2023
@backkem

backkem commented Sep 29, 2023

Copy link
Copy Markdown
Contributor

Is the same comment not relevant to the Subject Name? It is defined as CN = <fp>._openscreen._udp.

Comment thread index.bs Resolved

@baylesj baylesj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM % feedback.

@backkem

backkem commented Oct 13, 2023 •

Copy link
Copy Markdown
Contributor

The use of <fp> in the subject name is no issue? Is there a way to set this field after calculation of the fingerprint?

@markafoltz

Copy link
Copy Markdown
Contributor Author

Is the same comment not relevant to the Subject Name? It is defined as CN = <fp>._openscreen._udp.

Yes, that is also an issue, thank you for pointing that out. We won't be able to close Issue #276 until we address that.

@markafoltz

Copy link
Copy Markdown
Contributor Author

PTAL @baylesj, I will have to come up with a separate proposal to fix the subject name.

@markafoltz
markafoltz merged commit 21b7b45 into main Feb 28, 2024
@markafoltz
markafoltz deleted the issue-280-serial branch February 28, 2024 17:41
@markafoltz

Copy link
Copy Markdown
Contributor Author

Went ahead and merged this as comments have been addressed. Please let me know if there are other comments @baylesj

github-actions Bot added a commit that referenced this pull request Feb 28, 2024
SHA: 21b7b45
Reason: push, by mfoltzgoogle

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

F2F security-tracker Group bringing to attention of security, or tracked by the security Group but not needing response. v1-spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants