|
|
e3ffab |
From 0d1c2e1039758c1c11fb60299f571013f3572842 Mon Sep 17 00:00:00 2001
|
|
|
e3ffab |
From: Nathaniel McCallum <npmccallum@redhat.com>
|
|
|
e3ffab |
Date: Thu, 6 Nov 2014 15:19:01 -0500
|
|
|
e3ffab |
Subject: [PATCH] Improve otptoken help messages
|
|
|
e3ffab |
|
|
|
e3ffab |
https://fedorahosted.org/freeipa/ticket/4689
|
|
|
e3ffab |
|
|
|
e3ffab |
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
|
|
|
e3ffab |
---
|
|
|
e3ffab |
ipalib/plugins/otptoken.py | 18 +++++++++++++++++-
|
|
|
e3ffab |
1 file changed, 17 insertions(+), 1 deletion(-)
|
|
|
e3ffab |
|
|
|
e3ffab |
diff --git a/ipalib/plugins/otptoken.py b/ipalib/plugins/otptoken.py
|
|
|
e3ffab |
index 2b5f1c5fb83341d392e165a3507f5076820f1d3a..77366bafe7a102f5d2c048ac3d5f7d9948ed7fe4 100644
|
|
|
e3ffab |
--- a/ipalib/plugins/otptoken.py
|
|
|
e3ffab |
+++ b/ipalib/plugins/otptoken.py
|
|
|
e3ffab |
@@ -153,6 +153,7 @@ class otptoken(LDAPObject):
|
|
|
e3ffab |
),
|
|
|
e3ffab |
StrEnum('type?',
|
|
|
e3ffab |
label=_('Type'),
|
|
|
e3ffab |
+ doc=_('Type of the token'),
|
|
|
e3ffab |
default=u'totp',
|
|
|
e3ffab |
autofill=True,
|
|
|
e3ffab |
values=tuple(TOKEN_TYPES.keys() + [x.upper() for x in TOKEN_TYPES]),
|
|
|
e3ffab |
@@ -161,42 +162,52 @@ class otptoken(LDAPObject):
|
|
|
e3ffab |
Str('description?',
|
|
|
e3ffab |
cli_name='desc',
|
|
|
e3ffab |
label=_('Description'),
|
|
|
e3ffab |
+ doc=_('Token description (informational only)'),
|
|
|
e3ffab |
),
|
|
|
e3ffab |
Str('ipatokenowner?',
|
|
|
e3ffab |
cli_name='owner',
|
|
|
e3ffab |
label=_('Owner'),
|
|
|
e3ffab |
+ doc=_('Assigned user of the token (default: self)'),
|
|
|
e3ffab |
),
|
|
|
e3ffab |
Str('managedby_user?',
|
|
|
e3ffab |
label=_('Manager'),
|
|
|
e3ffab |
+ doc=_('Assigned manager of the token (default: self)'),
|
|
|
e3ffab |
flags=['no_create', 'no_update', 'no_search'],
|
|
|
e3ffab |
),
|
|
|
e3ffab |
Bool('ipatokendisabled?',
|
|
|
e3ffab |
cli_name='disabled',
|
|
|
e3ffab |
- label=_('Disabled state')
|
|
|
e3ffab |
+ label=_('Disabled'),
|
|
|
e3ffab |
+ doc=_('Mark the token as disabled (default: false)')
|
|
|
e3ffab |
),
|
|
|
e3ffab |
DateTime('ipatokennotbefore?',
|
|
|
e3ffab |
cli_name='not_before',
|
|
|
e3ffab |
label=_('Validity start'),
|
|
|
e3ffab |
+ doc=_('First date/time the token can be used'),
|
|
|
e3ffab |
),
|
|
|
e3ffab |
DateTime('ipatokennotafter?',
|
|
|
e3ffab |
cli_name='not_after',
|
|
|
e3ffab |
label=_('Validity end'),
|
|
|
e3ffab |
+ doc=_('Last date/time the token can be used'),
|
|
|
e3ffab |
),
|
|
|
e3ffab |
Str('ipatokenvendor?',
|
|
|
e3ffab |
cli_name='vendor',
|
|
|
e3ffab |
label=_('Vendor'),
|
|
|
e3ffab |
+ doc=_('Token vendor name (informational only)'),
|
|
|
e3ffab |
),
|
|
|
e3ffab |
Str('ipatokenmodel?',
|
|
|
e3ffab |
cli_name='model',
|
|
|
e3ffab |
label=_('Model'),
|
|
|
e3ffab |
+ doc=_('Token model (informational only)'),
|
|
|
e3ffab |
),
|
|
|
e3ffab |
Str('ipatokenserial?',
|
|
|
e3ffab |
cli_name='serial',
|
|
|
e3ffab |
label=_('Serial'),
|
|
|
e3ffab |
+ doc=_('Token serial (informational only)'),
|
|
|
e3ffab |
),
|
|
|
e3ffab |
OTPTokenKey('ipatokenotpkey?',
|
|
|
e3ffab |
cli_name='key',
|
|
|
e3ffab |
label=_('Key'),
|
|
|
e3ffab |
+ doc=_('Token secret (Base32; default: random)'),
|
|
|
e3ffab |
default_from=lambda: os.urandom(KEY_LENGTH),
|
|
|
e3ffab |
autofill=True,
|
|
|
e3ffab |
flags=('no_display', 'no_update', 'no_search'),
|
|
|
e3ffab |
@@ -204,6 +215,7 @@ class otptoken(LDAPObject):
|
|
|
e3ffab |
StrEnum('ipatokenotpalgorithm?',
|
|
|
e3ffab |
cli_name='algo',
|
|
|
e3ffab |
label=_('Algorithm'),
|
|
|
e3ffab |
+ doc=_('Token hash algorithm'),
|
|
|
e3ffab |
default=u'sha1',
|
|
|
e3ffab |
autofill=True,
|
|
|
e3ffab |
flags=('no_update'),
|
|
|
e3ffab |
@@ -212,6 +224,7 @@ class otptoken(LDAPObject):
|
|
|
e3ffab |
IntEnum('ipatokenotpdigits?',
|
|
|
e3ffab |
cli_name='digits',
|
|
|
e3ffab |
label=_('Digits'),
|
|
|
e3ffab |
+ doc=_('Number of digits each token code will have'),
|
|
|
e3ffab |
values=(6, 8),
|
|
|
e3ffab |
default=6,
|
|
|
e3ffab |
autofill=True,
|
|
|
e3ffab |
@@ -220,6 +233,7 @@ class otptoken(LDAPObject):
|
|
|
e3ffab |
Int('ipatokentotpclockoffset?',
|
|
|
e3ffab |
cli_name='offset',
|
|
|
e3ffab |
label=_('Clock offset'),
|
|
|
e3ffab |
+ doc=_('TOTP token / FreeIPA server time difference'),
|
|
|
e3ffab |
default=0,
|
|
|
e3ffab |
autofill=True,
|
|
|
e3ffab |
flags=('no_update'),
|
|
|
e3ffab |
@@ -227,6 +241,7 @@ class otptoken(LDAPObject):
|
|
|
e3ffab |
Int('ipatokentotptimestep?',
|
|
|
e3ffab |
cli_name='interval',
|
|
|
e3ffab |
label=_('Clock interval'),
|
|
|
e3ffab |
+ doc=_('Length of TOTP token code validity'),
|
|
|
e3ffab |
default=30,
|
|
|
e3ffab |
autofill=True,
|
|
|
e3ffab |
minvalue=5,
|
|
|
e3ffab |
@@ -235,6 +250,7 @@ class otptoken(LDAPObject):
|
|
|
e3ffab |
Int('ipatokenhotpcounter?',
|
|
|
e3ffab |
cli_name='counter',
|
|
|
e3ffab |
label=_('Counter'),
|
|
|
e3ffab |
+ doc=_('Initial counter for the HOTP token'),
|
|
|
e3ffab |
default=0,
|
|
|
e3ffab |
autofill=True,
|
|
|
e3ffab |
minvalue=0,
|
|
|
e3ffab |
--
|
|
|
e3ffab |
2.1.0
|
|
|
e3ffab |
|