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

Implement RFC8738 IP Identifier Validation Support #12

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Leo1003
Copy link

@Leo1003 Leo1003 commented Nov 27, 2024

Here is the PR for supporting RFC8738 IP Identifier Validation Support.

I added a new type called ChallengeIdentifier to ensure consistency of comparing different types of identifiers.

I also added some Python typing to make the codes clearer and make editor auto completion to work correctly.

I haven't tested it yet, so I mark this PR as WIP.

Close: #11

@uedvt359
Copy link
Contributor

uedvt359 commented Nov 27, 2024 via email

@Leo1003
Copy link
Author

Leo1003 commented Nov 28, 2024

I know your concern and requirements now and I have a clue about how to design that.

However, I am a little bit confuse about how not to break the backend API interface. Or we just pass all the value as str and let the backend to test if they are IP address or not.

  • as far as i can see, the rfc only allows ip addresses, not networks!

The cryptography library said it can return network type (I am also confused about that), therefore, I added the conversion for that case.

@Leo1003
Copy link
Author

Leo1003 commented Nov 28, 2024

The cryptography library said it can return network type (I am also confused about that), therefore, I added the conversion for that case.

I found that cryptography support decode/encode ipaddress general name with netmask in pyca/cryptography/src/rust/src/x509/common.rs#L277

Since the CSR is parsed from user upload data, we should handle it by either converting it to ipaddress or returning an error to user.

@uedvt359
Copy link
Contributor

uedvt359 commented Nov 28, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RFC 8738 IP Identifier Validation Support
2 participants