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

Create OAuth2 agent using REST service fails

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 13.0.0
    • Fix Version/s: 13.0.0
    • Component/s: None
    • Sprint:
      Sprint 95 - Team Tesla, Sprint 96 - Team Tesla

      Description

      Creating a new agent using the /json/agents service doesn't work.

      The following payload is sent to openamUrl/json/agents?_action=create

      {
        "username": "{{umaCClientId}}",
        "realm": "/",
        "com.forgerock.openam.oauth2provider.clientType": [
          "Confidential"
        ],
        "com.forgerock.openam.oauth2provider.accessToken": [],
        "com.forgerock.openam.oauth2provider.sectorIdentifierURI": [],
        "com.forgerock.openam.oauth2provider.jwtTokenLifeTime": [
          "0"
        ],
        "userpassword": [
          "{{umaCClientSecret}}"
        ],
        "com.forgerock.openam.oauth2provider.contacts": [
          "[0]="
        ],
        "com.forgerock.openam.oauth2provider.clientSessionURI": [],
        "com.forgerock.openam.oauth2provider.scopes": [
          "[0]=uma_authorization"
        ],
        "com.forgerock.openam.oauth2provider.responseTypes": [
          "[6]=code token id_token",
          "[0]=code",
          "[4]=token id_token",
          "[2]=id_token",
          "[3]=code token",
          "[1]=token",
          "[5]=code id_token"
        ],
        "com.forgerock.openam.oauth2provider.authorizationCodeLifeTime": [
          "0"
        ],
        "com.forgerock.openam.oauth2provider.description": [
          "[0]="
        ],
        "com.forgerock.openam.oauth2provider.accessTokenLifeTime": [
          "0"
        ],
        "com.forgerock.openam.oauth2provider.defaultMaxAgeEnabled": [
          "false"
        ],
        "com.forgerock.openam.oauth2provider.subjectType": [
          "Public"
        ],
        "agentgroup": [],
        "com.forgerock.openam.oauth2provider.postLogoutRedirectURI": [
          "[0]="
        ],
        "com.forgerock.openam.oauth2provider.refreshTokenLifeTime": [
          "0"
        ],
        "com.forgerock.openam.oauth2provider.defaultScopes": [
          "[0]="
        ],
        "com.forgerock.openam.oauth2provider.name": [
          "[0]="
        ],
        "AgentType": [
          "OAuth2Client"
        ],
        "com.forgerock.openam.oauth2provider.redirectionURIs": [
          "[0]="
        ],
        "com.forgerock.openam.oauth2provider.idTokenSignedResponseAlg": [
          "RS256"
        ],
        "com.forgerock.openam.oauth2provider.clientName": [
          "[0]="
        ],
        "com.forgerock.openam.oauth2provider.tokenEndPointAuthMethod": [
          "client_secret_basic"
        ],
        "universalid": [
          "id=fred,ou=agent,dc=openam,dc=forgerock,dc=org"
        ],
        "com.forgerock.openam.oauth2provider.defaultMaxAge": [
          "600"
        ],
        "sunIdentityServerDeviceStatus": [
          "Active"
        ],
        "com.forgerock.openam.oauth2provider.publicKeyLocation": [
          "x509"
        ],
        "com.forgerock.openam.oauth2provider.jwksURI": [],
        "com.forgerock.openam.oauth2provider.clientJwtPublicKey": []
      }

      This payload is taken direct from a GET from the same endpoint, of a manually created agent.

      The response returned is:

      {
        "code": 404,
        "reason": "Not Found",
        "message": "Plug-in com.sun.identity.idm.plugins.internal.AgentsRepo: Unable to create agent."
      }

        Attachments

          Activity

            People

            • Assignee:
              jamesphillpotts James Phillpotts
              Reporter:
              jamesphillpotts James Phillpotts
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: