dell / iDRAC-Redfish-Scripting

Python and PowerShell scripting for Dell EMC PowerEdge iDRAC REST API with DMTF Redfish
GNU General Public License v2.0
608 stars 279 forks source link

Invoke-GenerateCsrREDFISH Missing Subject Alternative Name? #272

Closed ryan-peterson3 closed 1 year ago

ryan-peterson3 commented 1 year ago

It seems this Cmdlet is missing the Subject Alternative Name field required by modern browsers? What am I missing here?

texroemer commented 1 year ago

Hi @ryan-peterson3

Subject alt name is an optional parameter for generating CSR but it was a miss in the cmdlet for supporting it. I updated the cmdlet with support for passing in subject alt name.

Example of running updated cmdlet:

PS C:\> .\Invoke-GenerateCsrREDFISH -idrac_ip 192.168.0.120 -idrac_username root -idrac_password calvin -generate_csr -city Austin -state Texas -country US -commonname Test -org Dell -orgunit Dell -email "test@dell.com" -subject_alt_name "test99altname.example.com, test88altname.example.com"

- INFO, generating CSR for iDRAC 192.168.0.120
- PASS, POST command passed to generate CSR, status code 202 returned
- INFO, CSR generated file

-----BEGIN CERTIFICATE REQUEST-----
MIIDKjCCAhICAQAwezELMAkGA1UEBhMCVVMxDjAMBgNVBAgMBVRleGFzMQ8wDQYD
VQQHDAZBdXN0aW4xDTALBgNVBAoMBERlbGwxDTALBgNVBAsMBERlbGwxDTALBgNV
BAMMBFRlc3QxHjAcBgkqhkiG9w0BCQEWD3BlcnNvbkBkZWxsLmNvbTCCASIwDQYJ
KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMwix3BrqVrMOH+404cyPRUaeHjT9hFy
GqhW2AhXuCfg8MVDumCrV45flWd3anWo0UlLL+X9VT1j/n0X0z8eE6FKAmfziwrp
e8QYby/812q0HHbVFOJXYqJG4QfHi+ruUDXhmAbssQax1KCosctep31Sbo++gfaB
4ETg7eeWba0GAo0Oy7jc2KNsSFkHXt9aEGNPiJReKkWej3XWgiVR4EOLU/0OdItr
C9L45ThhtSWGZjSDzFElfdaMuv4Dcz7GXSuXetc1hcCdgeIMHDEpIVDKkP0EyIa2
mK1OOZmc9oRxI3DAA87wUfot/AGdTOMAoggaty3VareCsG9DMNGt1c0CAwEAAaBq
MGgGCSqGSIb3DQEJDjFbMFkwCQYDVR0TBAIwADALBgNVHQ8EBAMCBeAwPwYDVR0R
BDgwNoIZdGVzdDk5YWx0bmFtZS5leGFtcGxlLmNvbYIZdGVzdDg4YWx0bmFtZS5l
eGFtcGxlLmNvbTANBgkqhkiG9w0BAQsFAAOCAQEAngWjCwYylIKwDiDYrdOYEj7q
XMr55msuYeH6DWEjc7Cu1vlk6auAacytEpVKldswz8ByWA5TkuX/tJGa+1/lnDa7
lNoLnBCsmshmDuWMOG0t2nH53oFIWBpiHWfI4hkZcBClondIjK+3KE0OrFS9jY6H
K4bZABT1qT6F1pvpcbjULPDTKbUVkk7BEtgyG3Kga733I3f+I3UpaPi6lNRdojVL
VRm/UobHQ9M5zLG10HCMgu8N8mo5Col78bOKGLd5AlYOSx48FCBwblrfFIHcxw==
-----END CERTIFICATE REQUEST-----

- INFO, CSR content also copied to file 'idrac_generated_csr.txt'

Thanks Tex

ryan-peterson3 commented 1 year ago

Thank you! Would be great if the PSGallery could be updated too.

texroemer commented 1 year ago

Updated cmdlet was also pushed to PSGallery yesterday.

image

Thanks Tex

ryan-peterson3 commented 1 year ago

Okay thanks. I may need to get that one specifically. I was updating the larger module with all the cmdlets: update-module idracredfishsupport

texroemer commented 1 year ago

IdracRedfishSupport also updated and just confirmed new version is posted.

image

ryan-peterson3 commented 1 year ago

Thank you again! It updated successfully.