Adding a Reference type using Rest post/put request timesout

This topic contains 8 replies, has 3 voices, and was last updated by Profile photo of bhonnegowda bhonnegowda 1 month ago.

  • Author
    Posts
  • #14719
    Profile photo of bhonnegowda bhonnegowda 
    Participant

    here is a part of my rest2ldap configuration,

    "frapi:opendj:rest2ldap:group:1.0": {
                "superType": "frapi:opendj:rest2ldap:object:1.0",
                "objectClasses": [ "groupOfUniqueNames" ],
                "properties": {
                    "_id": {
                        "type": "simple",
                        "ldapAttribute": "cn",
                        "isRequired": true,
                        "writability": "createOnly"
                    },
                    "displayName": {
                        "type": "simple",
                        "ldapAttribute": "cn",
                        "isRequired": true,
                        "writability": "readOnly"
                    },
                    "description": {
                        "type": "simple"
                    },
                    "members": {
                        "type": "reference",
                        "ldapAttribute": "uniqueMember",
                        "baseDn": "ou=people,dc={application},dc=division,dc=company,dc=com",
                        "primaryKey": "uid",
                        "isMultiValued": true,
                        "mapper": {
                            "type": "object",
                            "properties": {
                                "_id": {
                                    "type": "simple",
                                    "ldapAttribute": "uid",
                                    "isRequired": true
                                },
                                "displayName": {
                                    "type": "simple",
                                    "ldapAttribute": "cn",
                                    "writability": "readOnlyDiscardWrites"
                                }
                            }
                        }
                    }
                }
            }

    it works, if i am creating a group with following,

    {
    "_id": "group1",
    "description": "Sample Description"
    }

    if i add the reference type property members, the rest call does not respond.

    {
    "_id": "group1",
    "description": "Sample Description",
    "members": ["uid:abc,ou=people,dc=app1,dc=division,dc=company,dc=com"]
    }

    Also, i have enabled http-access logs. How do i see logs for this timing out/hanging. i just cannot debug anything related to rest2ldap.

    #14741
    Profile photo of bhonnegowda bhonnegowda 
    Participant

    I read this in the “Update” Rest documentation,
    When updating a resource, include all the attributes to be retained. Omitting an attribute in the resource amounts to deleting the attribute unless it is not under the control of your application. Attributes not under the control of your application include private and read-only attributes.

    In addition, virtual attributes and relationship references might not be under the control of your application.

    So, does this mean i cannot update references using REST?

    #14745
    Profile photo of bhonnegowda bhonnegowda 
    Participant

    anybody???

    #14768
    Profile photo of Rogerio Rondini Rogerio Rondini 
    Participant

    So..

    If your code is really as below, there is a typo in the member DN.

    Note “uid:abc” but the correct is “uid=abc”.

    {
    "_id": "group1",
    "description": "Sample Description",
    "members": ["uid:abc,ou=people,dc=app1,dc=division,dc=company,dc=com"]
    }
    #14771
    Profile photo of bhonnegowda bhonnegowda 
    Participant

    oops sorry for the typo. Also, how do i debug these logs?

    #14772
    Profile photo of Rogerio Rondini Rogerio Rondini 
    Participant

    So..

    You need to enable “http-access” log and/or enable debug level.
    Please, take a look into the following links..

    https://backstage.forgerock.com/docs/opendj/3/admin-guide#log-common-audit-http-csv
    https://backstage.forgerock.com/docs/opendj/3/admin-guide#troubleshoot-enable-debug-logging

    At,
    Rogerio.

    #14773
    Profile photo of bhonnegowda bhonnegowda 
    Participant

    i have already done this. when i try using either postman or curl. it just never responds. any other requests i make dont respond either. this is so annoying.

    #14831
    Profile photo of Ludo Ludo 
    Moderator

    Try to enable access logging of OpenDJ internal operations. When you running your rest query, you will then be able to see the LDAP internal operations that are triggered and identify the one that is not responding.

    #14872
    Profile photo of bhonnegowda bhonnegowda 
    Participant

    Thanks ludo for your response.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.

©2017 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your username and password

Lost your password?

Forgot your details?