Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-16-2009, 02:54 PM
Loyal Member
 
Posts: 88
Default SOAP for generating Preauth key??

Hello

I would like to know if there is a SOAP call that can generate the Preauthkey for a domain, I know we can run zmprov> gdpak <domain>, but we would like to automate this process. I already tried to call a soap method GenerateDomainPreAuthKey but it returns
"Erro:unknown document: ns1:GenerateDomainPreAuthKey"

Thanks for any help

[]s
Reply With Quote
  #2 (permalink)  
Old 07-17-2009, 01:22 AM
Moderator
 
Posts: 7,928
Default

[SOLVED] Another PHP Preauth example
__________________
Reply With Quote
  #3 (permalink)  
Old 07-07-2010, 10:34 AM
Junior Member
 
Posts: 5
Default

I don't think you answered bonadio's question. To me, it doesn't seem that he/she is asking HOW to pre auth, rather they're asking how to generate a PREAUTH KEY for a given domain via a SOAP request so that they CAN pre auth.

I too would like to know the answer. Please be direct and concise.

The doc at Preauth - Zimbra :: Wiki DOES NOT answer the question. It simply says to run the zmprov command which I don't know how to do. I am using the ZCS NOT the desktop version and would like to ultimately set up an API for my company so we can integrate calendaring functionality into our site for our users.
Reply With Quote
  #4 (permalink)  
Old 07-07-2010, 05:25 PM
Junior Member
 
Posts: 7
Default

I don't think it's possible yet.. it would be insecure either...

Index of /pub/zimbra/zimbra/trunk/branches/EDISON/ZimbraServer/docs
I've checked preAuth.txt and the soap files, there's no hint for it. It is also not possible to generate it with the webinterface, so i also cannot fetch soap information this way...

But may'be a PHP-shell interface can help you?
gunthor's zimbraControl at gunthor - GitHub

it's not a complete package, but the shell-part works fine!

have fun
Gunthor
Reply With Quote
  #5 (permalink)  
Old 07-07-2010, 05:35 PM
Junior Member
 
Posts: 7
Default

okay, i give up! sry for distrubing you, i didn't want to spam here, i thought it could help

Last edited by gunthor; 07-07-2010 at 05:40 PM..
Reply With Quote
  #6 (permalink)  
Old 07-08-2010, 12:00 AM
Zimbra Consultant & Moderator
 
Posts: 20,316
Default

Quote:
Originally Posted by gunthor View Post
okay, i give up! sry for distrubing you, i didn't want to spam here, i thought it could help
All you had to do was wait for your post to be approved.
__________________
Regards


Bill
Reply With Quote
  #7 (permalink)  
Old 07-08-2010, 12:42 AM
Moderator
 
Posts: 7,928
Default

That artictle tells you exactly what to do
Code:
su - zimbra
zmprov gdpak <domain_name>
__________________
Reply With Quote
  #8 (permalink)  
Old 04-29-2011, 03:03 PM
Junior Member
 
Posts: 7
Default

This is using zmprov.

Is there a way to do it via SOAP?

I have added the --debug flag to this call and see the following, but unsure what the key should be in the zimbraPreAuthKeyNode, or is it just generating it for me, and not possible to do via SOAP?

Here is the example (only snipping out pertinant parts)

zmprov --debug gdpak jeffzz798.com

<ModifyDomainRequest xmlns="urn:zimbraAdmin">
<id>4a693890-7643-40d9-abe2-3d310ff02409</id>
<a n="zimbraPreAuthKey">513e2eff591e343dd6e8397c7237c d6618f51b702f5a4c46fe08d1730114271e</a>
</ModifyDomainRequest>


preAuthKey: 513e2eff591e343dd6e8397c7237cd6618f51b702f5a4c46fe 08d1730114271e

Anyone done this successfully?


Quote:
Originally Posted by uxbod View Post
That artictle tells you exactly what to do
Code:
su - zimbra
zmprov gdpak <domain_name>
Reply With Quote
  #9 (permalink)  
Old 04-29-2011, 07:00 PM
Intermediate Member
 
Posts: 15
Question

I am also eager to know this answer. Especially how to solve unknown-document issue, which constantly happens when using the soap api!
Reply With Quote
  #10 (permalink)  
Old 04-30-2011, 09:07 AM
Project Contributor
 
Posts: 92
Default

I have never done this before.
But maybe you can generate zimbraPreAuthKey for a domain like this:

Quote:
try {
java.security.SecureRandom random = java.security.SecureRandom.getInstance("SHA1PRNG") ;
byte[] key = new byte[32];
random.nextBytes(key);
return new String(org.apache.commons.codec.binary.Hex.encodeH ex(key));
} catch (NoSuchAlgorithmException e) {
throw ServiceException.FAILURE("unable to initialize SecureRandom", e);
}
And you send

Quote:
<ModifyDomainRequest xmlns="urn:zimbraAdmin">
<id>4a693890-7643-40d9-abe2-3d310ff02409</id>
<a n="zimbraPreAuthKey">513e2eff591e343dd6e8397c723 7c d6618f51b702f5a4c46fe08d1730114271e</a>
</ModifyDomainRequest>
That seems all "zmprov gdpak" do for you inside.

I hope this might help you.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.