Microsoft Virtualization Discussions

Attempt to use Install-NcCecurityCertificate failing with authentication error

korns

I'm working with a customer who is starting to use the toolkit to install certiicates. I looked at the code and I can re-create the problem with a pretty simple example below. Where-as Get-NcSercurityCertificate works (i.e; display existing cert's, the Install-SecurityCerticate fails indicating authentication error. My code sample and run time results are below. It demonstrates the credentials are good since the Get-NcSecurityCertificate works but the subsequent Install-NcSecurityCerrtificate fails with credential error. I am hoping this is easily re-created by anyone. Any ideas?

 

PowerShell and Toolkit versions are:

======

PS C:\scripts> $psversiontable

 

Name                           Value                                                                                        

----                           -----                                                                                        

PSVersion                      4.0                                                                                          

WSManStackVersion              3.0                                                                                          

SerializationVersion           1.1.0.1                                                                                      

CLRVersion                     4.0.30319.17929                                                                              

BuildVersion                   6.3.9600.16406                                                                               

PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}                                                                         

PSRemotingProtocolVersion      2.2                                                                                          

 

PS C:\scripts> Get-NaToolkitVersion

 

Major  Minor  Build  Revision

-----  -----  -----  --------

3      2      0      65      

 

PS C:\scripts>  

 

====== code to reproduce problem =====

 

$cred = get-credential

 

Connect-NcController -name hq-stor -vserver hq-vs1 -cred $cred

 

Get-NcSecurityCertificate

 

$certificate = "-----BEGIN CERTIFICATE-----

MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU

MBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFs

IFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290

MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzELMAkGA1UEBhMCU0Ux

FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h

bCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9v

dDCCASIXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXb3SCAQEwDQYJKoZIhvcN

AQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZlj7DYd7usQWxH

YINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5

6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvC

Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX

c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a

mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=

-----END CERTIFICATE-----"

 

Install-NcSecurityCertificate -Controller hq-stor -vserver hq-vs1 -Type server_chain -certificate $certificate 

 

====== run-time results ======

 

PS C:\scripts> C:\scripts\secCertTest.ps1

cmdlet Get-Credential at command pipeline position 1

Supply values for the following parameters:

 

Name                 Address           Vserver              Version                                                         

----                 -------           -------              -------                                                         

hq-stor              192.168.126.230   hq-vs1               NetApp Release 8.2 Cluster-Mode: Tue May 21 05:47:21 PDT 2013   

 

CertificateAuthority    : hq-vs1.cert

CommonName              : hq-vs1.cert

Country                 : US

EmailAddress            : 

ExpirationDate          : 1445442557

ExpirationDateDT        : 10/21/2015 10:49:17 AM

ExpireDays              : 

HashFunction            : sha256

Locality                : 

NcController            : hq-stor

Organization            : 

OrganizationUnit        : 

Protocol                : ssl

PublicCertificate       : -----BEGIN CERTIFICATE-----

                          MIIEDDCCAvSgAwIBAgIEVEaAfTANBgkqhkiG9w0BAQsFADBgMRQwEgYDVQQDEwto

                          cS12czEuY2VydDELMAkGA1UEBhMCVVMxCTAHBgNVBAgTADEJMAcGA1UEBxMAMQkw

                          BwYDVQQKEwAxCTAHBgNVBAsTADEPMA0GCSqGSIb3DQEJARYAMB4XDTE0MTAyMTE1

                          NDkxN1oXDTE1MTAyMTE1NDkxN1owYDEUMBIGA1UEAxMLaHEtdnMxLmNlcnQxCzAJ

                          BgNVBAYTAlVTMQkwBwYDVQQIEwAxCTAHBgNVBAcTADEJMAcGA1UEChMAMQkwBwYD

                          VQQLEwAxDzANBgkqhkiG9w0BCQEWADCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC

                          AQoCggEBALJjaBZxQR/ZCTzgYPCBFMr6u49Ad7ESgagUzivOTkefUFbEjQagmAC8

                          nDbcfyzyG72+JgzSqmJ1oCVH+JjreW+LujNRBeTupW6bAbNU9nbdkH9WQFQnhPD5

                          iKclIBvv5sH/UrPyVev3C9ZF786doh9Up1R8RfKlXNy8iCdrP9u27PnW/8wth53m

                          VTbIkFhvyZspcnSKjBpKyrk1atsVMsQzygah772nvgEAQ1P+qfk0njPSMgO+3Wh+

                          wLBQdmuEm1XtncS7lxZH2OR6qU19yU4wL4yqrxSRDV68f+nKHt9WVoktOADGXs18

                          1yKCRB/0W6F3FBj3vQO5J5uhIVtTN2cCAwEAAaOBzTCByjAMBgNVHRMEBTADAQH/

                          MAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQUyhWNy1OGGzCTdEezIckOBosYNoUwgY0G

                          A1UdIwSBhTCBgoAUyhWNy1OGGzCTdEezIckOBosYNoWhZKRiMGAxFDASBgNVBAMT

                          C2hxLXZzMS5jZXJ0MQswCQYDVQQGEwJVUzEJMAcGA1UECBMAMQkwBwYDVQQHEwAx

                          CTAHBgNVBAoTADEJMAcGA1UECxMAMQ8wDQYJKoZIhvcNAQkBFgCCBFRGgH0wDQYJ

                          KoZIhvcNAQELBQADggEBAAe+CQXzLU1fdh233BF9AEpDaf2DVvPihXNIrnL4nRDu

                          q/fKdINxe4kBRiLfQfDztKeNDg/n09ykBn5l0/JqqVEzLBMlpQQ5BZGVuZBQysiU

                          6otzmfmZokRlJ3qomYFIqVlr9x6y1bQqBTViYMs7IlVcyDVJEVwCKmavo+WComwv

                          cjDVXXmZVcxlBLpCHgtsPsB8JgbHIxddkoAkqJNDvsp+Wd0mueNevonT3Xm3J1Ks

                          IyGn/W01g8WnA89du7/pYCTQzV/Lef1wPaUotcz0LfoffSK6Mg0YaS2ipAEUMN1W

                          vCKo5hMyoFnJCWhggh1Fiw2qIdPQF7PkMVqL37xFwxs=

                          -----END CERTIFICATE-----

                          

SerialNumber            : 5446807D

Size                    : 2048

StartDate               : 1413906557

StartDateDT             : 10/21/2014 10:49:17 AM

State                   : 

Type                    : server

Vserver                 : hq-vs1

ExpirationDateSpecified : True

ExpireDaysSpecified     : False

StartDateSpecified      : True

 

Install-NcSecurityCertificate : Incorrect credentials for hq-stor.

At C:\scripts\secCertTest.ps1:23 char:1

+ Install-NcSecurityCertificate -Controller hq-stor -vserver hq-vs1 -Type server_c ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidOperation: (hq-stor:NcController) [Install-NcSecurityCertificate], NaAuthException

    + FullyQualifiedErrorId : ApiException,DataONTAP.C.PowerShell.SDK.Cmdlets.SecurityCertificate.InstallNcSecurityCertific 

   ate

  

 

 

 

0 REPLIES 0
Announcements
Register for Insight 2021 Digital

INSIGHT 2021 Digital: Meet the Specialists 2

On October 20-22, gear up for a fully digital, totally immersive virtual experience with a downright legendary lineup of world-renowned specialists. Tune in for visionary conversations, solution deep dives, technical sessions and more.

NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public