This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Is there a X-Restd-Insert nodes list

Hello,

I'm trying to add a LDAP server as an authentication backend for the UTM via API. It has to be under authentication/ldap, this I know. After creating it via the API I get a http 200, which means the call was successful, but the login doesn't work and it's not listed in the web frontend under Definitions & Users -> Authentication Services -> Servers

So I think I need to set the X-Restd-Insert header field and tried authentication.ldap & ldap.servers etc., but the API keeps telling me that's the node is invalid.

My question therefore is, exists a list of the nodes or is there a way to deviate the nodename from something as the API-UI is not working. 

Thank you for any help!

Regards,

Sebastian



This thread was automatically locked due to age.
  • Hallo Sebastian and welcome to the UTM Community!

    When you ask for a list of nodes, are you asking for:

    cc get auth servers

    Or for

    cc get_objects authentication |grep \'name

    Cheers - Bob

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Hello Bob,

    thx for the welcome!

    I'm sorry, there was a mistake in my description. When you login to the API and go to authentication->ldap and expand the post section, you see a description for the X-Restd-Insert parameter saying the following:

    Path and position (optional for arrays, required for hashes, not used for strings) of a node, where to insert the newly created object, format 'node-path [index]', e.g. array: 'packetfilter.rules 2', string: 'ha.aws.cloudwatch.profile', hash: 'auth.api_tokens myToken123'

    What I need is the path and position for the ldap servers. My goal is to create a ldap server for the user authentication for the login to the UTM via the API. I tried authentication.ldap ldap.server and similar values, but with every valuy I tried I got a response code 400 with the message "Invalid node 'authentication'.".
    Left empty the node is created, but not shown in the GUI under Users&Groups->Authentication->LDAP and the login with a LDAP user is not working.

    So this makes me believe that the X-Restd-Insert parameter needs to be set witha value. Sadly I can't figure out which is correct. So any help or suggestions are appreciated! And thanks in advance!

    Regards,

    Sebastian