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

Hexadecimal certificate serial number in entity alias metadata would be great #27248

Open
stormshield-gt opened this issue May 28, 2024 · 0 comments
Labels
auth/cert Authentication - certificates enhancement

Comments

@stormshield-gt
Copy link

Is your feature request related to a problem? Please describe.

When using TLS authentication with the metadata of entity aliases activated with enable_identity_alias_metadata, the serial number is returned as a string representation of its decimal value.
For instance "207720964414718439776028734852258731377870138924".

Here is the following code that does that:

"serial_number": clientCerts[0].SerialNumber.String(),

This representation is not very convenient to use, because all the endpoints of the PKI API take the hexadecimal representation of the serial number separated with colon.
We can still recreate this representation at the client side, but because the integer is bigger than u128, for most of the programming languages, we must use an external library to parse it. As supply chain attacks are a big concern for me, I would like to have the fewest dependency as possible.

Describe the solution you'd like

Would you be OK to return the hexadecimal representation directly?
I think it's just a matter of calling this function

func GetHexFormatted(buf []byte, sep string) string {

Describe alternatives you've considered

Adding an external library at the client side and build the hexadecimal representation from here.

@heatherezell heatherezell added auth/cert Authentication - certificates enhancement labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth/cert Authentication - certificates enhancement
Projects
None yet
Development

No branches or pull requests

2 participants