add template for Enhanced Secure Erasure
This commit is contained in:
parent
13605abbaf
commit
a5bf59c561
|
@ -191,7 +191,7 @@
|
|||
Performs <strong>1</strong> pass overwriting each sector with zeros and a final verification.
|
||||
Compliant with <strong>HMG Infosec Standard 5 Baseline</strong>.
|
||||
</p>
|
||||
<a href="{{ url_for('workbench.settings') }}?opt=erease_sectors"
|
||||
<a href="{{ url_for('workbench.settings') }}?opt=baseline_erease"
|
||||
class="btn btn-primary"
|
||||
style="width: 100%;">
|
||||
Download settings file
|
||||
|
@ -210,11 +210,11 @@
|
|||
Performs <strong>3</strong> passes overwriting every sector with zeros and ones, and final verification.
|
||||
Compliant with <strong>HMG Infosec Standard 5 Enhanced</strong>.
|
||||
</p>
|
||||
<span
|
||||
class="btn btn-secondary"
|
||||
<a href="{{ url_for('workbench.settings') }}?opt=enhanced_erease"
|
||||
class="btn btn-primary"
|
||||
style="width: 100%;">
|
||||
Download settings file
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -16,8 +16,7 @@ WB_ERASE_STEPS = 1
|
|||
WB_ERASE_LEADING_ZEROS = False
|
||||
|
||||
WB_DEBUG = True
|
||||
{% endif %}
|
||||
{% if erease_sectors %}
|
||||
{% elif baseline_erease %}
|
||||
DH_HOST = {{ host }}
|
||||
DH_DATABASE = {{ schema }}
|
||||
DEVICEHUB_URL = https://${DB_HOST}/${DB_DATABASE}/
|
||||
|
@ -27,7 +26,7 @@ WB_STRESS_TEST = 0
|
|||
WB_SMART_TEST = short
|
||||
|
||||
WB_ERASE = EraseSectors
|
||||
WB_ERASE_STEPS = 1
|
||||
WB_ERASE_STEPS = {{ erase_steps }}
|
||||
WB_ERASE_LEADING_ZEROS = True
|
||||
|
||||
WB_DEBUG = True
|
||||
|
|
|
@ -43,7 +43,13 @@ class SettingsView(GenericMixin):
|
|||
form_kangaroo.save()
|
||||
|
||||
self.opt = request.values.get('opt')
|
||||
if self.opt in ['register', 'erease_basic', 'erease_sectors']:
|
||||
options = [
|
||||
'register',
|
||||
'erease_basic',
|
||||
'baseline_erease',
|
||||
'enhanced_erease',
|
||||
]
|
||||
if self.opt in options:
|
||||
return self.download()
|
||||
|
||||
return flask.render_template(self.template_name, **self.context)
|
||||
|
@ -54,7 +60,7 @@ class SettingsView(GenericMixin):
|
|||
'token': self.get_token(),
|
||||
'url': url,
|
||||
'erease_basic': None,
|
||||
'erease_sectors': None,
|
||||
'baseline_erease': None,
|
||||
}
|
||||
# if is a v14 version
|
||||
# TODO when not use more v14, we can remove this if
|
||||
|
@ -63,10 +69,14 @@ class SettingsView(GenericMixin):
|
|||
self.wbContext['url'] = url
|
||||
self.wbContext['host'] = app.config['HOST']
|
||||
self.wbContext['schema'] = app.config['SCHEMA']
|
||||
|
||||
if self.opt == 'erease_basic':
|
||||
self.wbContext['erease_basic'] = True
|
||||
if self.opt == 'erease_sectors':
|
||||
self.wbContext['erease_sectors'] = True
|
||||
if self.opt in ['baseline_erease', 'enhanced_erease']:
|
||||
self.wbContext['baseline_erease'] = True
|
||||
self.wbContext['erase_steps'] = 1
|
||||
if self.opt == 'enhanced_erease':
|
||||
self.wbContext['erase_steps'] = 3
|
||||
|
||||
data = flask.render_template('workbench/wbSettings.ini', **self.wbContext)
|
||||
return self.response_download(data)
|
||||
|
|
Reference in New Issue