SOAP Help

General help on how to use Cerberus. Questions on how a particular feature works, how to use feature x with feature y... Please read the "How to use this forum" article before posting.
Post Reply
StLaurie
New User
Posts: 6
Joined: Thu Apr 27, 2017 7:38 pm

SOAP Help

Post by StLaurie » Thu Sep 20, 2018 2:24 am

I am trying to use Powershell to connect to the SOAP API of Cerberus but am stumped on how to do it. All the documentation I see online says I should use the following:

Code: Select all

$CerberusFtpSvc  = New-WebServiceProxy -Uri "https://localhost:10001/wsdl/Cerberus.wsdl"
If I try this I get the error

Code: Select all

The HTML document does not contain Web service discovery information.
I have tried Credential parameters and Class & Namespace parameters to no avail.
I have tried different URLs to try and 'find' the .wsdl file. (some sites use Files/wsdl/, ive also tried webadmin/admin/wsdl/)

I think once I get the connection to the SOAP service I should be alright, but I just can't figure that part out :/

Cheers,
Laurie

pacman
Senior User
Posts: 187
Joined: Thu Apr 28, 2016 1:54 pm

Re: SOAP Help

Post by pacman » Fri Sep 21, 2018 4:17 pm

Hi

You may want to access the WSDL and XSD directly on disk and not use the URL.

It's in this folder:
C:\Program Files\Cerberus LLC\Cerberus FTP Server\webadmin\admin\wsdl

You can always copy that to your local development machine and process it that way.

https://social.technet.microsoft.com/Fo ... powershell

The above link has some pretty good information about PowerShell and Cerberus

StLaurie
New User
Posts: 6
Joined: Thu Apr 27, 2017 7:38 pm

Re: SOAP Help

Post by StLaurie » Mon Sep 24, 2018 12:37 am

Thanks for that, I wasn't sure if I was doing it right. Knowing I was headed in the right direction helped!

I was able to connect and then i changed the url property of the new PowerShell object to the server hostname (even if it was run on the local machine).
so:

Code: Select all

$CerberusFtpSvc = New-WebServiceProxy -Uri "C:\Program Files\Cerberus LLC\Cerberus FTP Server\webadmin\admin\wsdl\Cerberus.wsdl" -Class CerberusFtp -Namespace CerberusFTPService -Credential $Cred
$CerberusFtpSvc.Url = 'https://<SERVERHOSTNAME>:10001/service/cerberusftpservice'
After this everything else fell into place.
$Cred = The SOAP Admin Username/Password as a Powershell object, i.e.:

Code: Select all

$cred = Get-Credential
I am now navigating around the many property and methods available to me.

Thanks again.

StLaurie
New User
Posts: 6
Joined: Thu Apr 27, 2017 7:38 pm

Re: SOAP Help

Post by StLaurie » Tue Nov 13, 2018 6:46 pm

I've managed to get quite far with the SOAP API which is great however I have hit a road block:

I am not sure if the API can manipulate AD Users.

I am trying to assign Cerberus Groups to AD Users, but cannot find any way to list AD Users or their group assignments.
I don't think it's possible which is a massive bummer!

Cheers

pacman
Senior User
Posts: 187
Joined: Thu Apr 28, 2016 1:54 pm

Re: SOAP Help

Post by pacman » Tue Nov 20, 2018 10:16 am

Managing Active Directory (AD) and LDAP users work very differently and aren't easily done at this time using the SOAP API.

AD and LDAP users are authenticated directly against their respective AD and LDAP server using the default configuration specified on the AD Users and LDAP Users pages. They don't exist as user accounts in Cerberus.

You can customize individual AD and LDAP users by mapping them in the Cerberus UI to a Cerberus group. That would override the default AD or LDAP configuration and apply the settings and virtual directories from that mapped Cerberus group to the AD user.

We don't have a SOAP API call to manage these mappings at this time. There are only the GetAuthenticationList and SetAuthenticationList calls that retrieve an XML block of those sources and mappings. Our application can easily manipulate that data, but it would have to be parsed and manipulated at the XML level by an API user.

We have plans to add individual APIs to manage mapping AD and LDAP users to Cerberus groups through the API, but those calls aren't in place yet.

I wish I had a better answer for you. It's certainly possible using the XML set and retrieval methods, but not at all ideal.

Post Reply