1*afc8a799Smiramurali23<loader loading="loading"></loader> 2*afc8a799Smiramurali23<div id="configuration-cert"> 3*afc8a799Smiramurali23 <div class="row column"> 4*afc8a799Smiramurali23 <h1>SSL certificates</h1> 5*afc8a799Smiramurali23 </div> 6*afc8a799Smiramurali23 <div ng-repeat="certificate in certificates | filter:{isExpiring:true}" class="row column"> 7*afc8a799Smiramurali23 <div class="small-12 alert alert-warning" role="alert"> 8*afc8a799Smiramurali23 <icon file="icon-warning.svg" aria-hidden="true"></icon> 9*afc8a799Smiramurali23 The uploaded {{certificate.name}} is expiring in {{getDays(certificate.ValidNotAfter) === 0 ? 'less than one day!' : getDays(certificate.ValidNotAfter) 10*afc8a799Smiramurali23 + ' days!'}} Consider replacing it with a new certificate. 11*afc8a799Smiramurali23 </div> 12*afc8a799Smiramurali23 </div> 13*afc8a799Smiramurali23 <div ng-repeat="certificate in certificates|filter:{isExpired:true}" class="row column"> 14*afc8a799Smiramurali23 <div class="small-12 alert alert-danger" role="alert"> 15*afc8a799Smiramurali23 <div class="icon__critical inline"></div> The uploaded {{certificate.name}} has expired! Consider replacing it with a new certificate. 16*afc8a799Smiramurali23 </div> 17*afc8a799Smiramurali23 </div> 18*afc8a799Smiramurali23 <div class="row column"> 19*afc8a799Smiramurali23 <button type="button" class="btn btn-tertiary" ng-disabled="availableCertificateTypes.length === 0" ng-click="addCertificateModal=true"> 20*afc8a799Smiramurali23 <icon class="icon-add" file="icon-plus.svg"></icon> 21*afc8a799Smiramurali23 Add new certificate 22*afc8a799Smiramurali23 </button> 23*afc8a799Smiramurali23 <button type="button" class="btn btn-tertiary" ng-click="addCSRModal=true"> 24*afc8a799Smiramurali23 <icon class="icon-add" file="icon-plus.svg"></icon> 25*afc8a799Smiramurali23 Generate CSR 26*afc8a799Smiramurali23 </button> 27*afc8a799Smiramurali23 </div> 28*afc8a799Smiramurali23 <div class="row column"> 29*afc8a799Smiramurali23 <div class="small-12 certificate__table"> 30*afc8a799Smiramurali23 <div class="table__row-header"> 31*afc8a799Smiramurali23 <div class="row column"> 32*afc8a799Smiramurali23 <div class="certificate__type-header"> 33*afc8a799Smiramurali23 Certificate 34*afc8a799Smiramurali23 </div> 35*afc8a799Smiramurali23 <div class="certificate__issue-header"> 36*afc8a799Smiramurali23 Issued by 37*afc8a799Smiramurali23 </div> 38*afc8a799Smiramurali23 <div class="certificate__issue-header"> 39*afc8a799Smiramurali23 Issued to 40*afc8a799Smiramurali23 </div> 41*afc8a799Smiramurali23 <div class="certificate__date-header"> 42*afc8a799Smiramurali23 Valid from 43*afc8a799Smiramurali23 </div> 44*afc8a799Smiramurali23 <div class="certificate__status-header"> 45*afc8a799Smiramurali23 </div> 46*afc8a799Smiramurali23 <div class="certificate__date-header"> 47*afc8a799Smiramurali23 Valid until 48*afc8a799Smiramurali23 </div> 49*afc8a799Smiramurali23 </div> 50*afc8a799Smiramurali23 </div> 51*afc8a799Smiramurali23 <div ng-if="certificates.length < 1" class="empty__logs">There have been no certificates added.</div> 52*afc8a799Smiramurali23 <div ng-repeat="certificate in certificates"> 53*afc8a799Smiramurali23 <certificate cert="certificate" reload="loadCertificates()" )></certificate> 54*afc8a799Smiramurali23 </div> 55*afc8a799Smiramurali23 </div> 56*afc8a799Smiramurali23 </div> 57*afc8a799Smiramurali23 <section class="modal add__certificate__modal" aria-hidden="true" role="dialog" ng-class="{'active': addCertificateModal}"> 58*afc8a799Smiramurali23 <form name="add__cert__form" id="add__cert__form" ng-class="{'submitted': submitted}"> 59*afc8a799Smiramurali23 <div class="modal__content"> 60*afc8a799Smiramurali23 <button class="certificate__close-modal" ng-click="addCertificateModal = false; add__cert__form.$setUntouched()"> 61*afc8a799Smiramurali23 <icon aria-hidden="true" file="icon-close.svg"> 62*afc8a799Smiramurali23 </button> 63*afc8a799Smiramurali23 <h2 class="page-header">Add new certificate</h2> 64*afc8a799Smiramurali23 <div class="row column add-certificate__section "> 65*afc8a799Smiramurali23 <div class="small-12"> 66*afc8a799Smiramurali23 <label for="cert__type">Certificate type</label> 67*afc8a799Smiramurali23 <select id="cert__type" name="cert__type" ng-model="newCertificate.selectedType" required> 68*afc8a799Smiramurali23 <option class="courier-bold" ng-value="">Select an option</option> 69*afc8a799Smiramurali23 <option class="courier-bold" ng-value="type" ng-repeat="type in availableCertificateTypes"> 70*afc8a799Smiramurali23 {{type.name}}</option> 71*afc8a799Smiramurali23 </select> 72*afc8a799Smiramurali23 <div ng-messages="add__cert__form.cert__type.$error" class="form-error" ng-class="{'visible' : add__cert__form.cert__type.$touched || submitted }"> 73*afc8a799Smiramurali23 <p ng-message="required">Field is required</p> 74*afc8a799Smiramurali23 </div> 75*afc8a799Smiramurali23 </div> 76*afc8a799Smiramurali23 </div> 77*afc8a799Smiramurali23 <div class="row column add-certificate__section"> 78*afc8a799Smiramurali23 <div class="small-12"> 79*afc8a799Smiramurali23 <label class="select__new-label" for="upload_cert_new">Certificate file</label> 80*afc8a799Smiramurali23 </div> 81*afc8a799Smiramurali23 <div class="row column file__upload add-certificate__section "> 82*afc8a799Smiramurali23 <label for='upload_cert_new'> 83*afc8a799Smiramurali23 <input name="upload_cert_new" id="upload_cert_new" type="file" file="newCertificate.file" class="hide" /> 84*afc8a799Smiramurali23 <span class="btn btn-secondary select__new-button">Choose file</span> 85*afc8a799Smiramurali23 </label> 86*afc8a799Smiramurali23 </div> 87*afc8a799Smiramurali23 <div class="row column add-certificate__section "> 88*afc8a799Smiramurali23 <div ng-if="newCertificate.file" class="small-7 file__name"> 89*afc8a799Smiramurali23 <span>{{newCertificate.file.name}}</span> 90*afc8a799Smiramurali23 <icon file="icon-close.svg" ng-if="newCertificate.file.name" ng-click="newCertificate.file = '';" class="float-right"></icon> 91*afc8a799Smiramurali23 </div> 92*afc8a799Smiramurali23 </div> 93*afc8a799Smiramurali23 </div> 94*afc8a799Smiramurali23 </div> 95*afc8a799Smiramurali23 <div class="modal__button-wrapper"> 96*afc8a799Smiramurali23 <button class="btn btn-secondary" ng-click="addCertificateModal = false; newCertificate={};add__cert__form.$setUntouched();">Cancel</button> 97*afc8a799Smiramurali23 <button class="btn btn-primary" ng-disabled="add__cert__form.$invalid || !newCertificate.file" ng-click="submitted = true; uploadCertificate();">Save</button> 98*afc8a799Smiramurali23 </div> 99*afc8a799Smiramurali23 </form> 100*afc8a799Smiramurali23 </section> 101*afc8a799Smiramurali23 102*afc8a799Smiramurali23 <section class="modal add-csr__modal" aria-hidden="true" role="dialog" ng-class="{'active': addCSRModal}"> 103*afc8a799Smiramurali23 <!--Close button for displaying CSR Code, we need a close button within form to reset form validation correctly--> 104*afc8a799Smiramurali23 <button class="certificate__close-modal" ng-click="resetCSRModal();" ng-if="displayCSRCode==true"> 105*afc8a799Smiramurali23 <icon aria-hidden="true" file="icon-close.svg"> 106*afc8a799Smiramurali23 </button> 107*afc8a799Smiramurali23 108*afc8a799Smiramurali23 <!-- CSR Code display content--> 109*afc8a799Smiramurali23 110*afc8a799Smiramurali23 <div ng-if="displayCSRCode==true"> 111*afc8a799Smiramurali23 <h2 class="page-header">Certificate Signing Request (CSR)</h2> 112*afc8a799Smiramurali23 <div class="modal__content add-csr__container"> 113*afc8a799Smiramurali23 <span id="csrCode" class="add-csr__container-csr-code">{{csrCode}}</span> 114*afc8a799Smiramurali23 </div> 115*afc8a799Smiramurali23 <div class="modal__button-wrapper"> 116*afc8a799Smiramurali23 <button class="btn btn-secondary" clipboard text="csrCode" on-copied="copySuccess(event)" on-error="copyfailed(err)"> 117*afc8a799Smiramurali23 <span ng-if="!copied">Copy</span> 118*afc8a799Smiramurali23 <span ng-if="copied"> 119*afc8a799Smiramurali23 <icon aria-hidden="true" file="icon-check.svg"></icon> 120*afc8a799Smiramurali23 <span>Copied</span> 121*afc8a799Smiramurali23 </span> 122*afc8a799Smiramurali23 </button> 123*afc8a799Smiramurali23 <button class="btn btn-primary" ng-click="addCSRModal = false;"> 124*afc8a799Smiramurali23 <a ng-href="data:text/json;charset=utf-8,{{csrCode}}" download="csrCode.txt" class="add-csr__text-download"> 125*afc8a799Smiramurali23 Download</a> 126*afc8a799Smiramurali23 </button> 127*afc8a799Smiramurali23 </div> 128*afc8a799Smiramurali23 129*afc8a799Smiramurali23 </div> 130*afc8a799Smiramurali23 131*afc8a799Smiramurali23 132*afc8a799Smiramurali23 133*afc8a799Smiramurali23 <form name="add__csr__form" id="add__csr__form" novalidate ng-if="displayCSRCode==false"> 134*afc8a799Smiramurali23 <div class="modal__content add-csr__container"> 135*afc8a799Smiramurali23 <button class="certificate__close-modal" ng-click="resetCSRModal(); add__csr__form.$setUntouched()"> 136*afc8a799Smiramurali23 <icon aria-hidden="true" file="icon-close.svg"> 137*afc8a799Smiramurali23 </button> 138*afc8a799Smiramurali23 <h2 class="page-header">Generate a Certificate Signing Request (CSR)</h2> 139*afc8a799Smiramurali23 <div class="row"> 140*afc8a799Smiramurali23 <fieldset class="column medium-8 add-csr__section"> 141*afc8a799Smiramurali23 <legend class="add-csr__section-title">General</legend> 142*afc8a799Smiramurali23 <div class="row"> 143*afc8a799Smiramurali23 <div class="column medium-6"> 144*afc8a799Smiramurali23 <label for="cert__type" class="add-csr__label">Certificate Type *</label> 145*afc8a799Smiramurali23 <select class="add-csr__select" id="cert__type" name="cert__type" ng-model="newCSR.certificateCollection" required> 146*afc8a799Smiramurali23 <option class="courier-bold" ng-value="default" ng-model="selectOption">Select an option</option> 147*afc8a799Smiramurali23 <!-- Do not show CA certificate as an option. Only a certificate authority can generate a CA certificate (known as TrustStore Certificate in Redfish) --> 148*afc8a799Smiramurali23 <option class="courier-bold" ng-value="type" ng-repeat="type in allCertificateTypes" ng-if="type.Description !== 'TrustStore Certificate'"> 149*afc8a799Smiramurali23 {{type.name}}</option> 150*afc8a799Smiramurali23 </select> 151*afc8a799Smiramurali23 <div ng-messages="add__csr__form.cert__type.$error" class="form-error" ng-class="{'visible' : add__csr__form.cert__type.$touched}"> 152*afc8a799Smiramurali23 <p ng-message="required">Field is required</p> 153*afc8a799Smiramurali23 </div> 154*afc8a799Smiramurali23 </div> 155*afc8a799Smiramurali23 <div class="column medium-6"> 156*afc8a799Smiramurali23 <label for="countryCode" class="add-csr__label">Country *</label> 157*afc8a799Smiramurali23 <select class="add-csr__select" id="countryCode" name="countryCode" ng-model="newCSR.countryCode" required> 158*afc8a799Smiramurali23 <option class="courier-bold" ng-value="" ng-model="selectOption">Select an option</option> 159*afc8a799Smiramurali23 <option class="courier-bold" ng-value="country" ng-repeat="country in countryList">{{country.Name}} 160*afc8a799Smiramurali23 </option> 161*afc8a799Smiramurali23 </select> 162*afc8a799Smiramurali23 <div ng-messages="add__csr__form.countryCode.$error" class="form-error" ng-class="{'visible' : add__csr__form.countryCode.$touched}"> 163*afc8a799Smiramurali23 <p ng-message="required">Field is required</p> 164*afc8a799Smiramurali23 </div> 165*afc8a799Smiramurali23 </div> 166*afc8a799Smiramurali23 167*afc8a799Smiramurali23 <div class="column medium-6"> 168*afc8a799Smiramurali23 <label for="state" class="add-csr__label">State *</label> 169*afc8a799Smiramurali23 <input class="add-csr__input" ng-model="newCSR.state" type="text" id="state" name="state" required></input> 170*afc8a799Smiramurali23 <div ng-messages="add__csr__form.state.$error" class="form-error" ng-class="{'visible' : add__csr__form.state.$touched}"> 171*afc8a799Smiramurali23 <p ng-message="required">Field is required</p> 172*afc8a799Smiramurali23 </div> 173*afc8a799Smiramurali23 </div> 174*afc8a799Smiramurali23 175*afc8a799Smiramurali23 <div class="column medium-6"> 176*afc8a799Smiramurali23 <label for="city" class="add-csr__label">City *</label> 177*afc8a799Smiramurali23 <input class="add-csr__input" id="city" name="city" ng-model="newCSR.city" type="text" required></input> 178*afc8a799Smiramurali23 <div ng-messages="add__csr__form.city.$error" class="form-error" ng-class="{'visible' : add__csr__form.city.$touched}"> 179*afc8a799Smiramurali23 <p ng-message="required">Field is required</p> 180*afc8a799Smiramurali23 </div> 181*afc8a799Smiramurali23 </div> 182*afc8a799Smiramurali23 183*afc8a799Smiramurali23 <div class="column medium-6"> 184*afc8a799Smiramurali23 <label for="companyName" class="add-csr__label">Company Name *</label> 185*afc8a799Smiramurali23 <input class="add-csr__input" type="text" ng-model="newCSR.organization" id="companyName" name="companyName" required></input> 186*afc8a799Smiramurali23 <div ng-messages="add__csr__form.companyName.$error" class="form-error" ng-class="{'visible' : add__csr__form.companyName.$touched}"> 187*afc8a799Smiramurali23 <p ng-message="required">Field is required</p> 188*afc8a799Smiramurali23 </div> 189*afc8a799Smiramurali23 </div> 190*afc8a799Smiramurali23 191*afc8a799Smiramurali23 <div class="column medium-6"> 192*afc8a799Smiramurali23 <label for="companyUnit" class="add-csr__label">Company Unit *</label> 193*afc8a799Smiramurali23 <input class="add-csr__input" ng-model="newCSR.companyUnit" name="companyUnit" id="companyUnit" type="text" required></input> 194*afc8a799Smiramurali23 <div ng-messages="add__csr__form.companyUnit.$error" class="form-error" ng-class="{'visible' : add__csr__form.companyUnit.$touched}"> 195*afc8a799Smiramurali23 <p ng-message="required">Field is required</p> 196*afc8a799Smiramurali23 </div> 197*afc8a799Smiramurali23 </div> 198*afc8a799Smiramurali23 199*afc8a799Smiramurali23 <div class="column medium-6"> 200*afc8a799Smiramurali23 <label for="commonName" class="add-csr__label">Common Name *</label> 201*afc8a799Smiramurali23 <input class="add-csr__input" ng-model="newCSR.commonName" name="commonName" type="text" id="commonName" required></input> 202*afc8a799Smiramurali23 <div ng-messages="add__csr__form.commonName.$error" class="form-error" ng-class="{'visible' : add__csr__form.commonName.$touched}"> 203*afc8a799Smiramurali23 <p ng-message="required">Field is required</p> 204*afc8a799Smiramurali23 </div> 205*afc8a799Smiramurali23 </div> 206*afc8a799Smiramurali23 207*afc8a799Smiramurali23 <div class="column medium-6"> 208*afc8a799Smiramurali23 <label for="challengePassword" class="add-csr__label">Challenge Password</label> 209*afc8a799Smiramurali23 <input class="add-csr__input-no-validation" id="challengePassword" ng-model="newCSR.challengePassword" type="text"></input> 210*afc8a799Smiramurali23 </div> 211*afc8a799Smiramurali23 212*afc8a799Smiramurali23 <div class="column medium-6"> 213*afc8a799Smiramurali23 <label for="contactPerson" class="add-csr__label">Contact Person</label> 214*afc8a799Smiramurali23 <input class="add-csr__input-no-validation" id="contactPerson" ng-model="newCSR.contactPerson" type="text"></input> 215*afc8a799Smiramurali23 </div> 216*afc8a799Smiramurali23 217*afc8a799Smiramurali23 <div class="column medium-6"> 218*afc8a799Smiramurali23 <label for="emailAddress" class="add-csr__label">Email Address</label> 219*afc8a799Smiramurali23 <input class="add-csr__input-no-validation" id="emailAddress" ng-model="newCSR.emailAddress" type="text"></input> 220*afc8a799Smiramurali23 </div> 221*afc8a799Smiramurali23 222*afc8a799Smiramurali23 <div class="column medium-6"> 223*afc8a799Smiramurali23 <div> 224*afc8a799Smiramurali23 <label id="alternate-name-label" for="alternateName" class="add-csr__label">Alternate Name</label> 225*afc8a799Smiramurali23 <input class="add-csr__input-no-validation" ng-model="newCSR.firstAlternativeName" id="alternateName" name="alternativeName" 226*afc8a799Smiramurali23 type="text"></input> 227*afc8a799Smiramurali23 </div> 228*afc8a799Smiramurali23 <div class="add-csr__additional-alt-names" ng-repeat="name in names"> 229*afc8a799Smiramurali23 <input id="alternate-name-input-{{$index}}" aria-describedby="alternate-name-label" class="add-csr__input-no-validation" 230*afc8a799Smiramurali23 ng-model="name.Value" type="text"></input> 231*afc8a799Smiramurali23 <button aria-label="Delete alternate name field" aria-controls="alternate-name-input-{{$index}}" class="btn btn-tertiary add-csr__alt-name-delete-btn" 232*afc8a799Smiramurali23 ng-click="deleteOptionalRow($index)" ng-disabled="multiSelected"> 233*afc8a799Smiramurali23 <icon aria-hidden="true" file="icon-trashcan.svg"> 234*afc8a799Smiramurali23 </button> 235*afc8a799Smiramurali23 </div> 236*afc8a799Smiramurali23 </div> 237*afc8a799Smiramurali23 238*afc8a799Smiramurali23 <div class="column medium-6"> 239*afc8a799Smiramurali23 <button class="btn btn-tertiary add-csr__alt-name-add-btn" ng-click="addOptionalRow()"> 240*afc8a799Smiramurali23 <icon file="icon-plus.svg"></icon> 241*afc8a799Smiramurali23 Add another alternate name 242*afc8a799Smiramurali23 </button> 243*afc8a799Smiramurali23 </div> 244*afc8a799Smiramurali23 </div> 245*afc8a799Smiramurali23 </fieldset> 246*afc8a799Smiramurali23 247*afc8a799Smiramurali23 <fieldset class="column medium-4 add-csr__section add-csr__section--border "> 248*afc8a799Smiramurali23 <legend class="add-csr__section-title">Private key</legend> 249*afc8a799Smiramurali23 <div class="add-csr__container-private-key"> 250*afc8a799Smiramurali23 <div class="add-csr__content-private-key"> 251*afc8a799Smiramurali23 <label for="keyPairAlgorithm" class="add-csr__label">Key Pair Algorithm *</label> 252*afc8a799Smiramurali23 <select class="add-csr__select" ng-model="newCSR.keyPairAlgorithm" id="keyPairAlgorithm" name="keyPairAlgorithm" required> 253*afc8a799Smiramurali23 <option class="courier-bold" ng-value="" ng-model="selectOption">Select an option</option> 254*afc8a799Smiramurali23 <option class="courier-bold" ng-value="data" ng-repeat="data in keyPairAlgorithm">{{data}}</option> 255*afc8a799Smiramurali23 </select> 256*afc8a799Smiramurali23 <div ng-messages="add__csr__form.keyPairAlgorithm.$error" class="form-error" ng-class="{'visible' : add__csr__form.keyPairAlgorithm.$touched}"> 257*afc8a799Smiramurali23 <p ng-message="required">Field is required</p> 258*afc8a799Smiramurali23 </div> 259*afc8a799Smiramurali23 260*afc8a799Smiramurali23 <div ng-if="newCSR.keyPairAlgorithm == 'EC'"> 261*afc8a799Smiramurali23 <label for="keyCurveId" class="add-csr__label">Key Curve ID</label> 262*afc8a799Smiramurali23 <select class="add-csr__select" ng-model="newCSR.keyCurveId" id="keyCurveId" name="keyCurveId" required> 263*afc8a799Smiramurali23 <option class="courier-bold" ng-value="">None</option> 264*afc8a799Smiramurali23 <option class="courier-bold" ng-value="data" ng-repeat="data in keyCurveId">{{data}}</option> 265*afc8a799Smiramurali23 </select> 266*afc8a799Smiramurali23 <div ng-messages="add__csr__form.keyCurveId.$error" class="form-error" ng-class="{'visible' : add__csr__form.keyCurveId.$touched}"> 267*afc8a799Smiramurali23 <p ng-message="required">Field is required</p> 268*afc8a799Smiramurali23 </div> 269*afc8a799Smiramurali23 </div> 270*afc8a799Smiramurali23 271*afc8a799Smiramurali23 272*afc8a799Smiramurali23 <div ng-if="newCSR.keyPairAlgorithm =='RSA'"> 273*afc8a799Smiramurali23 <label for="keyBitLength" class="add-csr__label">Key Bit Length *</label> 274*afc8a799Smiramurali23 <select class="add-csr__select" ng-model="newCSR.keyBitLength" id="keyBitLength" name="keyBitLength" required> 275*afc8a799Smiramurali23 <option class="courier-bold" ng-value="">Select an option</option> 276*afc8a799Smiramurali23 <option class="courier-bold" ng-value="data" ng-repeat="data in keyBitLength">{{data}}</option> 277*afc8a799Smiramurali23 </select> 278*afc8a799Smiramurali23 <div ng-messages="add__csr__form.keyBitLength.$error" class="form-error" ng-class="{'visible' : add__csr__form.keyBitLength.$touched}"> 279*afc8a799Smiramurali23 <p ng-message="required">Field is required</p> 280*afc8a799Smiramurali23 </div> 281*afc8a799Smiramurali23 </div> 282*afc8a799Smiramurali23 283*afc8a799Smiramurali23 </div> 284*afc8a799Smiramurali23 </fieldset> 285*afc8a799Smiramurali23 </div> 286*afc8a799Smiramurali23 </div> 287*afc8a799Smiramurali23 <div class="modal__button-wrapper"> 288*afc8a799Smiramurali23 <button class="btn btn-secondary" ng-click="resetCSRModal();add__csr__form.$setUntouched();">Cancel</button> 289*afc8a799Smiramurali23 <button class="btn btn-primary" ng-click="csrSubmitted = true; getCSRCode();add__csr__form.$setUntouched();" ng-disabled="add__csr__form.$invalid">Generate CSR</button> 290*afc8a799Smiramurali23 </div> 291*afc8a799Smiramurali23 </div> 292*afc8a799Smiramurali23 </form> 293*afc8a799Smiramurali23 </section> 294*afc8a799Smiramurali23 <div class="modal-overlay" tabindex="-1" ng-class="{'active': addCertificateModal || addCSRModal}"></div>