register a ressource in openam default store

This topic has 0 replies, 1 voice, and was last updated 5 years, 1 month ago by abarry.

  • Author
    Posts
  • #18513
     abarry
    Participant

    Hello,
    I’m struggling with registring a ressource for some user. I’m following this guide : https://backstage.forgerock.com/docs/am/5/uma-guide/ and I’m able to acquire the Protection API Token (PAT) and the access_token. But I’m getting this error when I try to register the resource in openam :

    Caused by: org.forgerock.openam.cts.exceptions.QueryFailedException: 
    CTS: Failed to complete query:
          DN: dc=test,dc=com
        Conn: PooledConnection(/192.168.25.3:46084->openam.test.com/192.168.25.3:50389)
      Filter: (&(&(&(&(coreTokenString06=Photo Album)(coreTokenString02=agent1)(coreTokenString04=pierre))(coreTokenString03=/openLDAP))(coreTokenType=RESOURCE_SET))(objectClass=frCoreToken))
    	at org.forgerock.openam.sm.datalayer.impl.ldap.LdapSearchHandler.performSearch(LdapSearchHandler.java:62)
    	at org.forgerock.openam.sm.datalayer.impl.ldap.LdapQueryBuilder.getEntries(LdapQueryBuilder.java:147)
    	at org.forgerock.openam.sm.datalayer.impl.ldap.LdapQueryBuilder.access$000(LdapQueryBuilder.java:51)
    	at org.forgerock.openam.sm.datalayer.impl.ldap.LdapQueryBuilder$EntryIterator.next(LdapQueryBuilder.java:274)
    	... 92 more
    Caused by: org.forgerock.opendj.ldap.EntryNotFoundException: No Such Entry: The entry dc=test,dc=com specified as the search base does not exist in the Directory Server
    	at org.forgerock.opendj.ldap.LdapException.newLdapException(LdapException.java:195)
    	at org.forgerock.opendj.ldap.spi.ResultLdapPromiseImpl.setResultOrError(ResultLdapPromiseImpl.java:124)
    	at org.forgerock.opendj.grizzly.LdapClientFilter.setFinalResult(LdapClientFilter.java:86)
    	at org.forgerock.opendj.grizzly.LdapClientFilter.handleRead(LdapClientFilter.java:327)
    	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
    	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
    	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
    	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
    	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)

    I’m using this query to register the ressource :

    curl \
     --request POST \
     --header "Content-Type: application/json" \
     --header "Authorization: Bearer f137ef16-1994-41c0-b088-758529f55ded" \
     --data \
     '{
         "name" : "Photo Album",
         "uri" : "https://cdn.pixabay.com/photo/2013/06/23/19/47/rose-140853_960_720.jpg",
         "scopes" : [
             "view",
         ],
         "labels" : [
             "3D",
             "VIP"
         ],
     }' \
     http://openam.test.com:8080/openam/oauth2/resource_set/?realm=/openLDAP

    I got the authorization from user pierre who is registred in a ldap server. And in the openam configuration I choose Default Token Store as store mode parameter.
    I don’t understand why this issue : Caused by: org.forgerock.opendj.ldap.EntryNotFoundException: No Such Entry: The entry dc=test,dc=com because I’m using openam to store the ressource (not ldap) and the user pierre can already connect successfully to openam.
    Thank you in advance for your help.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

©2022 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 credentials

Forgot your details?