Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-16045

Amster unable to show agents query result

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 6.0.0.1, 6.5.2, 6.5.2.3
    • Fix Version/s: None
    • Component/s: Amster
    • Labels:
    • Support Ticket IDs:

      Description

      Bug description

      The query command seems to be broken as while it is returning all agents configuration, it does not display out in Amster.

      How to reproduce the issue

      1. Create web agent called webagent ( Realms >  [Realm name] > Applications > Agents > Web > Add Web Agent)
      2. Start Amster with debug mode
      $ cd /path/to/Amster-6.5.2
      $ ./amster -d
      ..........
      am> connect -i  http://am.example.com:8080/openam
      ..........
      Sign in
      User Name: amadmin
      Password: ********
      ..........
      amster am.example.com:8080> 
      1. Query all agent configuration
      amster am.example.com:8080> query WebAgents --realm / --filter true 
      DEBUG [org.codehaus.groovy.tools.shell.InteractiveShellRunner] Read line: query WebAgents --realm / --filter true 
      DEBUG [org.codehaus.groovy.tools.shell.Groovysh] Executing command(query): org.forgerock.openam.amster.commands.QueryCommand@6e6d5d29; w/args: [WebAgents, --realm, /, --filter, true]
      ..........
      [main] DEBUG org.forgerock.sdk.org.apache.http.wire - http-outgoing-1 << "{"result":[{"_id":"webagent","_rev":"-378707371","ssoWebAgentConfig":{"secureCookies":false,"cookieName":"iPlanetDirectoryPro","cdsso":false,"cdssoCookieDomain":[""],"cdssoUrls":["http://am.example.com:8080/openam/cdcservlet"],"cdssoRedirectUri":"agent/cdsso-oauth2","cookieResetEnabled":false,"cookieResetList":[""]},"globalWebAgentConfig":{"configurationCleanupInterval":30,"auditLogLocation":"REMOTE","fqdnMapping":{},"notificationsEnabled":true,"remoteLogFilename":"amAgent_www_example_com_8080.log","remoteLogSendInterval":5,"ssoOnlyMode":false,"agentUriPrefix":"http://www.example.com:8080/amagent","configurationPollingInterval":60,"agentgroup":null,"fqdnCheck":false,"status":"Active","localAuditLogRotation":false,"webSocketConnectionIntervalInMinutes":30,"agentConfigChangeNotificationsEnabled":true,"userpassword":null,"debugLogRotation":true,"auditAccessType":"LOG_NONE","cdssoRootUrl":["agentRootURL=http://www.example.com:8080/"],"fqdnDefault":"www.example.com","agentNotificationUrl":"http://www.example.com:8080/UpdateAgentCacheServlet?shortcircuit=false","accessDeniedUrl":null,"localAuditRotationSize":52428800,"jwtName":"am-auth-jwt","debugRotationSize":10000000,"agentDebugLevel":"Error","repositoryLocation":"centralized"},"miscWebAgentConfig":{"anonymousUserId":"anonymous","ignorePreferredNamingUrl":true,"agentLocale":"en_US","encodeUrlSpecialCharacters":false,"ignoreServerCheck":false,"profileAttributesCookieMaxAge":300,"anonymousUserEnabled":false,"ignorePathInfo":false,"gotoParameterName":"goto","profileAttributesCookiePrefix":"HTTP_","encodeSpecialCharsInCookies":false,"encodeProfileAttributes":false,"caseInsensitiveUrlComparison":true},"advancedWebAgentConfig":{"overrideProxyHostAndPort":false,"postDataCachePeriod":10,"overrideRequestProtocol":false,"checkUserInDomino":false,"clientHostnameHeader":null,"ltpaTokenConfigurationname":"LtpaToken","idleSessionTimeoutUrl":null,"loadBalanced":false,"postDataPreservation":false,"authenticationType":null,"changeProtocolToHttps":false,"overrideRequestHost":false,"showPasswordInHeader":false,"customProperties":[],"useLtpaToken":false,"overrideRequestPort":false,"logonAndImpersonation":false,"filterConfiguredWithOwa":false,"ltpaTokenOrganizationName":null,"overrideNotificationUrl":false,"clientIpHeader":null,"ltpaTokenCookieName":"LtpaToken","filterPriority":"HIGH","replayPasswordKey":null},"applicationWebAgentConfig":{"profileAttributeMap":{},"profileAttributeFetchMode":"NONE","invertNotEnforcedUrls":false,"responseAttributeMap":{},"responseAttributeFetchMode":"NONE","sessionAttributeFetchMode":"NONE","continuousSecurityHeaders":{},"fetchAttributesForNotEnforcedUrls":false,"attributeMultiValueSeparator":"|","ignorePathInfoForNotEnforcedUrls":true,"continuousSecurityCookies":{},"clientIpValidation":false,"notEnforcedUrls":[""],"notEnforcedIps":[""],"sessionAttributeMap":{}},"amServicesWebAgent":{"userIdParameter":"UserToken","policyEvaluationApplication":"iPlanetAMWebAgentService","policyEvaluationRealm":"/","retrieveClientHostname":false,"amLogoutUrl":["http://am.example.com:8080/openam/UI/Logout"],"userIdParameterType":"session","amLoginUrl":[],"ssoCachePollingInterval":3,"agentConnectionTimeout":2,"policyCachePollingInterval":3,"logoutResetCookies":[""],"policyClockSkew":0,"fetchPoliciesFromRootResource":false,"primaryServerPollingPeriod":5,"applicationLogoutUrls":[""],"logoutRedirectUrl":null},"_type":{"_id":"WebAgent","name":"Web Agents","collection":true}}],"resultCount":1,"pagedResultsCookie":null,"totalPagedResultsPolicy":"EXACT","totalPagedResults":1,"remainingPagedResults":-1}"
      [main] DEBUG org.forgerock.sdk.org.apache.http.headers - http-outgoing-1 << HTTP/1.1 200 
      [main] DEBUG org.forgerock.sdk.org.apache.http.headers - http-outgoing-1 << X-Frame-Options: SAMEORIGIN
      [main] DEBUG org.forgerock.sdk.org.apache.http.headers - http-outgoing-1 << Cache-Control: no-cache
      [main] DEBUG org.forgerock.sdk.org.apache.http.headers - http-outgoing-1 << Content-API-Version: protocol=2.1,resource=1.0
      [main] DEBUG org.forgerock.sdk.org.apache.http.headers - http-outgoing-1 << Content-API-Version: resource=1.0
      [main] DEBUG org.forgerock.sdk.org.apache.http.headers - http-outgoing-1 << X-Content-Type-Options: nosniff
      [main] DEBUG org.forgerock.sdk.org.apache.http.headers - http-outgoing-1 << Content-Type: application/json;charset=UTF-8
      [main] DEBUG org.forgerock.sdk.org.apache.http.headers - http-outgoing-1 << Content-Length: 3597
      [main] DEBUG org.forgerock.sdk.org.apache.http.headers - http-outgoing-1 << Date: Fri, 20 Mar 2020 04:49:03 GMT
      [main] DEBUG org.forgerock.sdk.org.apache.http.impl.execchain.MainClientExec - Connection can be kept alive indefinitely
      

      Notice that the result of querying web agent is successful and return JSON.

      1. Exit Amster command
      amster am.example.com:8080> :x
      
      1. Start Amster command without debug 
      $ ./amster 
      am> connect -i  http://am.example.com:8080/openam
      Sign in 
      User Name: amadmin 
      Password: ********
      amster am.example.com:8080> 
      
      1. Query all agent configuration 
      amster am.example.com:8080> query WebAgents --realm / --filter true 
      
      
      Expected behaviour
      amster am.example.com:8080> query WebAgents --realm / --filter true 
      
      
      {"result":[{"_id":"webagent","_rev":"-378707371","ssoWebAgentConfig":{"secureCookies":false,"cookieName":"iPlanetDirectoryPro","cdsso":false,"cdssoCookieDomain":[""],"cdssoUrls":["http://am.example.com:8080/openam/cdcservlet"],"cdssoRedirectUri":"agent/cdsso-oauth2","cookieResetEnabled":false,"cookieResetList":[""]},"globalWebAgentConfig":{"configurationCleanupInterval":30,"auditLogLocation":"REMOTE","fqdnMapping":{},"notificationsEnabled":true,"remoteLogFilename":"amAgent_www_example_com_8080.log","remoteLogSendInterval":5,"ssoOnlyMode":false,"agentUriPrefix":"http://www.example.com:8080/amagent","configurationPollingInterval":60,"agentgroup":null,"fqdnCheck":false,"status":"Active","localAuditLogRotation":false,"webSocketConnectionIntervalInMinutes":30,"agentConfigChangeNotificationsEnabled":true,"userpassword":null,"debugLogRotation":true,"auditAccessType":"LOG_NONE","cdssoRootUrl":["agentRootURL=http://www.example.com:8080/"],"fqdnDefault":"www.example.com","agentNotificationUrl":"http://www.example.com:8080/UpdateAgentCacheServlet?shortcircuit=false","accessDeniedUrl":null,"localAuditRotationSize":52428800,"jwtName":"am-auth-jwt","debugRotationSize":10000000,"agentDebugLevel":"Error","repositoryLocation":"centralized"},"miscWebAgentConfig":{"anonymousUserId":"anonymous","ignorePreferredNamingUrl":true,"agentLocale":"en_US","encodeUrlSpecialCharacters":false,"ignoreServerCheck":false,"profileAttributesCookieMaxAge":300,"anonymousUserEnabled":false,"ignorePathInfo":false,"gotoParameterName":"goto","profileAttributesCookiePrefix":"HTTP_","encodeSpecialCharsInCookies":false,"encodeProfileAttributes":false,"caseInsensitiveUrlComparison":true},"advancedWebAgentConfig":{"overrideProxyHostAndPort":false,"postDataCachePeriod":10,"overrideRequestProtocol":false,"checkUserInDomino":false,"clientHostnameHeader":null,"ltpaTokenConfigurationname":"LtpaToken","idleSessionTimeoutUrl":null,"loadBalanced":false,"postDataPreservation":false,"authenticationType":null,"changeProtocolToHttps":false,"overrideRequestHost":false,"showPasswordInHeader":false,"customProperties":[],"useLtpaToken":false,"overrideRequestPort":false,"logonAndImpersonation":false,"filterConfiguredWithOwa":false,"ltpaTokenOrganizationName":null,"overrideNotificationUrl":false,"clientIpHeader":null,"ltpaTokenCookieName":"LtpaToken","filterPriority":"HIGH","replayPasswordKey":null},"applicationWebAgentConfig":{"profileAttributeMap":{},"profileAttributeFetchMode":"NONE","invertNotEnforcedUrls":false,"responseAttributeMap":{},"responseAttributeFetchMode":"NONE","sessionAttributeFetchMode":"NONE","continuousSecurityHeaders":{},"fetchAttributesForNotEnforcedUrls":false,"attributeMultiValueSeparator":"|","ignorePathInfoForNotEnforcedUrls":true,"continuousSecurityCookies":{},"clientIpValidation":false,"notEnforcedUrls":[""],"notEnforcedIps":[""],"sessionAttributeMap":{}},"amServicesWebAgent":{"userIdParameter":"UserToken","policyEvaluationApplication":"iPlanetAMWebAgentService","policyEvaluationRealm":"/","retrieveClientHostname":false,"amLogoutUrl":["http://am.example.com:8080/openam/UI/Logout"],"userIdParameterType":"session","amLoginUrl":[],"ssoCachePollingInterval":3,"agentConnectionTimeout":2,"policyCachePollingInterval":3,"logoutResetCookies":[""],"policyClockSkew":0,"fetchPoliciesFromRootResource":false,"primaryServerPollingPeriod":5,"applicationLogoutUrls":[""],"logoutRedirectUrl":null},"_type":{"_id":"WebAgent","name":"Web Agents","collection":true}}],"resultCount":1,"pagedResultsCookie":null,"totalPagedResultsPolicy":"EXACT","totalPagedResults":1,"remainingPagedResults":-1}
      
      Current behaviour
      amster am.example.com:8080> query WebAgents --realm / --filter true 
      ===> null
      amster am.example.com:8080> 
      

      The same behaviour is seen when querying OAuth2.0 clients, J2EE Agents, Remote Consent Agents, Soap STS Agents, Software Publisher and Trusted JWT Issuer agents.

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              wanning.tan WanNing Tan
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: