Re: [Freeipa-devel] [PATCH] Add support for account unlocking

2011-01-28 Thread Jan Zelený
Rob Crittenden rcrit...@redhat.com wrote:
 Jan Zelený wrote:
  Jan Zelenyjzel...@redhat.com  wrote:
  This patch adds command ipa user-unlock and some LDAP modifications
  which are required by Kerberos for unlocking to work.
  
  Ticket:
  https://fedorahosted.org/freeipa/ticket/344
  
  Jan
  
  Just a reminder that this patch needs a review.
  
  Thanks
  Jan
 
 This doesn't apply against master due to some changes to delegations.
 Can you rebase and set the aci name to 'permission:Unlock user accounts.
 
 I did manage to test this and it works as expected, I just don't want to
 mangle the rebase.
 
 rob

The patch is rebased, I also added the change to API.txt

Jan
From 3844e0d8fba330948e150e5938b72758ee252207 Mon Sep 17 00:00:00 2001
From: Jan Zeleny jzel...@redhat.com
Date: Fri, 21 Jan 2011 03:07:53 -0500
Subject: [PATCH] Add support for account unlocking

This patch adds command ipa user-unlock and some LDAP modifications
which are required by Kerberos for unlocking to work.

Ticket:
https://fedorahosted.org/freeipa/ticket/344
---
 API.txt|6 ++
 install/share/60kerberos.ldif  |4 +++-
 install/share/default-aci.ldif |2 +-
 install/share/delegation.ldif  |   10 ++
 ipalib/plugins/user.py |   24 
 5 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/API.txt b/API.txt
index 42ba61f48dad4bdcaaa8e28c84e62c2607017ed6..703978f576986eed868e4eb4b3956938cd58b470 100644
--- a/API.txt
+++ b/API.txt
@@ -2614,3 +2614,9 @@ option: Str('version?', exclude='webui', flags=['no_option', 'no_output'])
 output: Output('summary', (type 'unicode', type 'NoneType'), 'User-friendly description of action performed')
 output: Entry('result', type 'dict', Gettext('A dictionary representing an LDAP entry', domain='ipa', localedir=None))
 output: Output('value', type 'unicode', The primary_key value of the entry, e.g. 'jdoe' for a user)
+command: user_unlock
+args: 1,0,3
+arg: Str('uid', attribute=True, cli_name='login', default_from=DefaultFrom(lambda, 'givenname', 'sn'), label=Gettext('User login', domain='ipa', localedir=None), maxlength=255, multivalue=False, normalizer=lambda, pattern='^[a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,252}[a-zA-Z0-9_.$-]?$', pattern_errmsg='may only include letters, numbers, _, -, . and $', primary_key=True, query=True, required=True)
+output: Output('summary', (type 'unicode', type 'NoneType'), 'User-friendly description of action performed')
+output: Output('result', type 'bool', 'True means the operation was successful')
+output: Output('value', type 'unicode', The primary_key value of the entry, e.g. 'jdoe' for a user)
diff --git a/install/share/60kerberos.ldif b/install/share/60kerberos.ldif
index f08329c48cbcd00ce9641582a13e8c6c118dac7c..72800d2426b776f2db119159187cad688eb9 100644
--- a/install/share/60kerberos.ldif
+++ b/install/share/60kerberos.ldif
@@ -254,6 +254,8 @@ attributetypes: ( 2.16.840.1.113719.1.301.4.52.1 NAME 'krbObjectReferences' EQUA
 # the additional principal objects and stand alone principal 
 # objects (krbPrincipal) can be created.
 attributetypes: ( 2.16.840.1.113719.1.301.4.53.1 NAME 'krbPrincContainerRef' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12)
+# The time at which administrator unlocked the account
+attributetypes: ( 1.3.6.1.4.1.5322.21.2.5 NAME 'krbLastAdminUnlock' EQUALITY generalizedTimeMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE)
 
 
 # 		Object Class Definitions   #
@@ -282,7 +284,7 @@ objectClasses: ( 2.16.840.1.113719.1.301.6.4.1 NAME 'krbKdcService' SUP ( krbSer
 objectClasses: ( 2.16.840.1.113719.1.301.6.5.1 NAME 'krbPwdService' SUP ( krbService ) )
 ## The principal data auxiliary class. Holds principal information
 ## and is used to store principal information for Person, Service objects.
-objectClasses: ( 2.16.840.1.113719.1.301.6.8.1 NAME 'krbPrincipalAux' AUXILIARY MAY ( krbPrincipalName $ krbCanonicalName $ krbUPEnabled $ krbPrincipalKey $ krbTicketPolicyReference $ krbPrincipalExpiration $ krbPasswordExpiration $ krbPwdPolicyReference $ krbPrincipalType $ krbPwdHistory $ krbLastPwdChange $ krbPrincipalAliases $ krbLastSuccessfulAuth $ krbLastFailedAuth $ krbLoginFailedCount $ krbExtraData ) )
+objectClasses: ( 2.16.840.1.113719.1.301.6.8.1 NAME 'krbPrincipalAux' AUXILIARY MAY ( krbPrincipalName $ krbCanonicalName $ krbUPEnabled $ krbPrincipalKey $ krbTicketPolicyReference $ krbPrincipalExpiration $ krbPasswordExpiration $ krbPwdPolicyReference $ krbPrincipalType $ krbPwdHistory $ krbLastPwdChange $ krbPrincipalAliases $ krbLastSuccessfulAuth $ krbLastFailedAuth $ krbLoginFailedCount $ krbExtraData $ krbLastAdminUnlock ) )
 ## This class is used to create additional principals and stand alone principals.
 objectClasses: ( 

Re: [Freeipa-devel] [PATCH] Add support for account unlocking

2011-01-28 Thread Rob Crittenden

Jan Zelený wrote:

Rob Crittendenrcrit...@redhat.com  wrote:

Jan Zelený wrote:

Jan Zelenyjzel...@redhat.com   wrote:

This patch adds command ipa user-unlock and some LDAP modifications
which are required by Kerberos for unlocking to work.

Ticket:
https://fedorahosted.org/freeipa/ticket/344

Jan


Just a reminder that this patch needs a review.

Thanks
Jan


This doesn't apply against master due to some changes to delegations.
Can you rebase and set the aci name to 'permission:Unlock user accounts.

I did manage to test this and it works as expected, I just don't want to
mangle the rebase.

rob


The patch is rebased, I also added the change to API.txt

Jan


ack, pushed to master

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] Add support for account unlocking

2011-01-27 Thread Rob Crittenden

Jan Zelený wrote:

Jan Zelenyjzel...@redhat.com  wrote:

This patch adds command ipa user-unlock and some LDAP modifications
which are required by Kerberos for unlocking to work.

Ticket:
https://fedorahosted.org/freeipa/ticket/344

Jan


Just a reminder that this patch needs a review.

Thanks
Jan


This doesn't apply against master due to some changes to delegations. 
Can you rebase and set the aci name to 'permission:Unlock user accounts.


I did manage to test this and it works as expected, I just don't want to 
mangle the rebase.


rob

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] Add support for account unlocking

2011-01-26 Thread Jan Zelený
Jan Zeleny jzel...@redhat.com wrote:
 This patch adds command ipa user-unlock and some LDAP modifications
 which are required by Kerberos for unlocking to work.
 
 Ticket:
 https://fedorahosted.org/freeipa/ticket/344
 
 Jan

Just a reminder that this patch needs a review.

Thanks
Jan

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel