[
https://issues.apache.org/jira/browse/DIRKRB-226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14517048#comment-14517048
]
Lin Chen commented on DIRKRB-226:
---------------------------------
Hi Wei, thanks for contribution, some questions:
1. It seems the codes are useless below:
{code}
+ @Override
+ public KrbIdentity updateIdentity(KrbIdentity identity) {
+ return super.updateIdentity(identity);
+ }
{code}
2. When asking reply about whether to rename the principal, using {{Scanner}}
is OK. Maybe we do not need use both {{Console}} and {{Scanner}}.
3. Would you please help to refine the way of parsing options by using
KadminOption? Just Like DIRKRB-225. And KadminOption was added in DIRKRB-240.
4. In some codes such as {{if(commands.length!=4)}}, maybe it will be better to
add space around the equal sign, just like {{if(commands.length != 4)}}
5. In the codes below:
{code}
+ KrbIdentity verifyIdentity = backend.getIdentity(newPrincipalName);
+ System.err.println("Principal rename failed! Principal \"" +
verifyIdentity.getPrincipalName() + "\" is already exist.");
+ return ;
{code}
A judgement is lost here? The judgement is like:
{code}
if (verifyIdentity != null) {
System.err.println("....... is already exist.");
}
{code}
6.
{code}
+ backend.deleteIdentity(oldPrincipalName);
+
+ identity.setPrincipalName(newPrincipalName);
+ identity.setPrincipal(new PrincipalName(newPrincipalName));
+ backend.updateIdentity(identity);
{code}
If a identity is not exists, it can not be updated. So maybe we need
{{addIdentity}} here?
> Enhance kadmin to supoort rename principal
> ------------------------------------------
>
> Key: DIRKRB-226
> URL: https://issues.apache.org/jira/browse/DIRKRB-226
> Project: Directory Kerberos
> Issue Type: New Feature
> Reporter: Jiajia Li
> Assignee: Wei Zhou
> Attachments: DIRKRB-226-V1.patch
>
>
> Enhance kadmin tool to supoort rename principal
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)