Many fixes to authority/certificate extensions pages (#659)

* Aligning certificate creation between authority and certificate workflows
* Correctly missing and mis-named fields in schemas
* Re-ordering KeyUsage and ExtendedKeyUsage for consistency and clarity
* Adding client authentication to the authority options.

* Missing blank lines for pyflakes linting

* Updating tests for new fields/names/typos
This commit is contained in:
Neil Schelly 2017-01-18 17:31:17 -05:00 committed by kevgliss
parent 02cfb2d877
commit f353956353
4 changed files with 58 additions and 36 deletions

View File

@ -191,6 +191,8 @@ class KeyUsageSchema(BaseExtensionSchema):
use_key_encipherment = fields.Boolean() use_key_encipherment = fields.Boolean()
use_digital_signature = fields.Boolean() use_digital_signature = fields.Boolean()
use_non_repudiation = fields.Boolean() use_non_repudiation = fields.Boolean()
use_key_agreement = fields.Boolean()
use_key_cert_sign = fields.Boolean()
class ExtendedKeyUsageSchema(BaseExtensionSchema): class ExtendedKeyUsageSchema(BaseExtensionSchema):
@ -199,8 +201,10 @@ class ExtendedKeyUsageSchema(BaseExtensionSchema):
use_eap_over_lan = fields.Boolean() use_eap_over_lan = fields.Boolean()
use_eap_over_ppp = fields.Boolean() use_eap_over_ppp = fields.Boolean()
use_ocsp_signing = fields.Boolean() use_ocsp_signing = fields.Boolean()
use_smart_card_authentication = fields.Boolean() use_smart_card_logon = fields.Boolean()
use_timestamping = fields.Boolean() use_timestamping = fields.Boolean()
use_code_signing = fields.Boolean()
use_email_protection = fields.Boolean()
class SubjectKeyIdentifierSchema(BaseExtensionSchema): class SubjectKeyIdentifierSchema(BaseExtensionSchema):

View File

@ -55,16 +55,11 @@
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" ng-model="authority.extensions.keyUsage.useKeyAgreement">Key Agreement <input type="checkbox" ng-model="authority.extensions.keyUsage.useKeyCertSign">Key Certificate Signature
</label> </label>
</div> </div>
</div> </div>
<div class="col-sm-3"> <div class="col-sm-3">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="authority.extensions.keyUsage.useKeyCertSign">Key Certificate Signature
</label>
</div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" ng-model="authority.extensions.keyUsage.useCRLSign">CRL Sign <input type="checkbox" ng-model="authority.extensions.keyUsage.useCRLSign">CRL Sign
@ -72,14 +67,19 @@
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" ng-model="authority.extensions.keyUsage.useKeyAgreement">Key Agreement
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" ng-model="authority.extensions.keyUsage.useEncipherOnly">Encipher Only <input type="checkbox" ng-model="authority.extensions.keyUsage.useEncipherOnly">Encipher Only
</label> </label>
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" ng-model="authority.extensions.keyUsage.useDecipherOnly">Decipher Only <input type="checkbox" ng-model="authority.extensions.keyUsage.useDecipherOnly">Decipher Only
</label> </label>
</div> </div>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -94,21 +94,31 @@
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" ng-model="authority.extensions.extendedKeyUsage.useEmail">Email <input type="checkbox" ng-model="authority.extensions.extendedKeyUsage.useClientAuthentication">Client Authentication
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" ng-model="authority.extensions.extendedKeyUsage.useEmailProtection">Email Protection
</label> </label>
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" ng-model="authority.extensions.extendedKeyUsage.useTimestamping">Timestamping <input type="checkbox" ng-model="authority.extensions.extendedKeyUsage.useTimestamping">Timestamping
</label> </label>
<div class="checkbox"> </div>
<label> <div class="checkbox">
<input type="checkbox" ng-model="authority.extensions.extendedKeyUsage.useEapOverLAN">EAP Over LAN <label>
</label> <input type="checkbox" ng-model="authority.extensions.extendedKeyUsage.useCodeSigning">Code Signing
</div> </label>
</div> </div>
</div> </div>
<div class="col-sm-3"> <div class="col-sm-3">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="authority.extensions.extendedKeyUsage.useEapOverLAN">EAP Over LAN
</label>
</div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" ng-model="authority.extensions.extendedKeyUsage.useEapOverPPP">EAP Over PPP <input type="checkbox" ng-model="authority.extensions.extendedKeyUsage.useEapOverPPP">EAP Over PPP
@ -116,7 +126,7 @@
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" ng-model="authority.extensions.extendedKeyUsage.useSmartCardLogon">Smartcard Logon <input type="checkbox" ng-model="authority.extensions.extendedKeyUsage.useSmartCardLogon">Smart Card Logon
</label> </label>
</div> </div>
<div class="checkbox"> <div class="checkbox">
@ -150,7 +160,7 @@
<div class="col-sm-10"> <div class="col-sm-10">
<div class="checkbox"> <div class="checkbox">
<label tooltip-trigger="mouseenter" tooltip-placement="top" uib-tooltip="Ask CA to include/not include AIA extension" > <label tooltip-trigger="mouseenter" tooltip-placement="top" uib-tooltip="Ask CA to include/not include AIA extension" >
<input type="checkbox" ng-model="authority.extensions.authorityInfoAccess.includeAIA">Include AIA <input type="checkbox" ng-model="authority.extensions.certificateInfoAccess.includeAIA">Include AIA
</label> </label>
</div> </div>
</div> </div>

View File

@ -97,19 +97,19 @@
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" ng-model="certificate.extensions.keyUsage.useKeyAgreement">Key Agreement <input type="checkbox" ng-model="certificate.extensions.keyUsage.useKeyCertSign">Key Certificate Signature
</label> </label>
</div> </div>
</div> </div>
<div class="col-sm-3"> <div class="col-sm-3">
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" ng-model="certificate.extensions.keyUsage.useKeyCertSign">Key Certificate Signature <input type="checkbox" ng-model="certificate.extensions.keyUsage.useCRLSign">CRL Sign
</label> </label>
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" ng-model="certificate.extensions.keyUsage.useCRLSign">CRL Sign <input type="checkbox" ng-model="certificate.extensions.keyUsage.useKeyAgreement">Key Agreement
</label> </label>
</div> </div>
<div class="checkbox"> <div class="checkbox">
@ -143,21 +143,26 @@
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" ng-model="certificate.extensions.extendedKeyUsage.useEmail">Email <input type="checkbox" ng-model="certificate.extensions.extendedKeyUsage.useEmailProtection">Email Protection
</label> </label>
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" ng-model="certificate.extensions.extendedKeyUsage.useTimestamping">Timestamping <input type="checkbox" ng-model="certificate.extensions.extendedKeyUsage.useTimestamping">Timestamping
</label> </label>
<div class="checkbox">
<label>
<input type="checkbox" ng-model="certificate.extensions.extendedKeyUsage.useEapOverLAN">EAP Over LAN
</label>
</div>
</div> </div>
<div class="checkbox">
<label>
<input type="checkbox" ng-model="certificate.extensions.extendedKeyUsage.useCodeSigning">Code Signing
</label>
</div>
</div> </div>
<div class="col-sm-3"> <div class="col-sm-3">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="certificate.extensions.extendedKeyUsage.useEapOverLAN">EAP Over LAN
</label>
</div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" ng-model="certificate.extensions.extendedKeyUsage.useEapOverPPP">EAP Over PPP <input type="checkbox" ng-model="certificate.extensions.extendedKeyUsage.useEapOverPPP">EAP Over PPP
@ -165,8 +170,7 @@
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" ng-model="certificate.extensions.extendedKeyUsage.useSmartCardLogon">Smartcard <input type="checkbox" ng-model="certificate.extensions.extendedKeyUsage.useSmartCardLogon">Smart Card Logon
Logon
</label> </label>
</div> </div>
<div class="checkbox"> <div class="checkbox">

View File

@ -307,8 +307,10 @@ def test_extended_key_usage_schema():
'useEapOverLAN': True, 'useEapOverLAN': True,
'useEapOverPPP': True, 'useEapOverPPP': True,
'useOCSPSigning': True, 'useOCSPSigning': True,
'useSmartCardAuthentication': True, 'useSmartCardLogon': True,
'useTimestamping': True 'useTimestamping': True,
'useCodeSigning': True,
'useEmailProtection': True
} }
data, errors = ExtendedKeyUsageSchema().load(input_data) data, errors = ExtendedKeyUsageSchema().load(input_data)
@ -320,8 +322,10 @@ def test_extended_key_usage_schema():
'use_eap_over_lan': True, 'use_eap_over_lan': True,
'use_eap_over_ppp': True, 'use_eap_over_ppp': True,
'use_ocsp_signing': True, 'use_ocsp_signing': True,
'use_smart_card_authentication': True, 'use_smart_card_logon': True,
'use_timestamping': True 'use_timestamping': True,
'use_code_signing': True,
'use_email_protection': True
} }