Test Info

Issuerhttps://isamfed.com:30443/test
Profile[]
Test IDOP-OAuth-2nd
Test descriptionTrying to use authorization code twice should result in an error
Timestamp2019-06-18T04:19:52Z

Conditions


check-http-error-response: status=OK [Checks that an error code is either 400 or 401 which are the only ones accepted by OAuth2/OIDC.]
verify-response: status=OK [Checks that the last response was one of a possible set of OpenID Connect Responses]
Done: status=OK

Trace Output

0phase<--<-- 0 --- Webfinger -->-->
0not expected to doWebFinger
0phase<--<-- 1 --- Discovery -->-->
0provider_config
kwargs:{'issuer': 'https://isamfed.com:30443/test'}
0http response
url:https://isamfed.com:30443/test/.well-known/openid-configuration status_code:200
0ProviderConfigurationResponse
{
    "authorization_endpoint": "https://isamfed.com:30443/mga/sps/oauth/oauth20/authorize",
    "claims_parameter_supported": false,
    "claims_supported": [
        "realmName",
        "preferred_username",
        "given_name",
        "uid",
        "upn",
        "groupIds",
        "employee_id",
        "name",
        "tenantId",
        "mobile_number",
        "department",
        "job_title",
        "family_name",
        "email"
    ],
    "device_authorize_endpoint": "https://isamfed.com:30443/mga/sps/oauth/oauth20/device_authorize",
    "grant_types_supported": [
        "urn:ietf:params:oauth:grant-type:jwt-bearer",
        "implicit",
        "urn:ietf:params:oauth:grant-type:saml2-bearer",
        "urn:ietf:params:oauth:grant-type:device_code",
        "client_credentials",
        "password",
        "authorization_code",
        "refresh_token"
    ],
    "id_token_encryption_alg_values_supported": [
        "A128KW"
    ],
    "id_token_encryption_enc_values_supported": [
        "A128CBC-HS256"
    ],
    "id_token_signing_alg_values_supported": [
        "RS256"
    ],
    "introspect_endpoint": "https://isamfed.com:30443/mga/sps/oauth/oauth20/introspect",
    "issuer": "https://isamfed.com:30443/test",
    "jwks_uri": "https://isamfed.com:30443/mga/sps/jwks",
    "name": "OIDCDefinition",
    "poc": "https://isamfed.com:30443/mga/",
    "registration_endpoint": "https://isamfed.com:30443/mga/sps/oauth/oauth20/register/OIDCDefinition",
    "request_parameter_supported": true,
    "request_uri_parameter_supported": true,
    "require_request_uri_registration": false,
    "response_modes_supported": [
        "fragment",
        "form_post"
    ],
    "response_types_supported": [
        "token",
        "id_token",
        "token id_token",
        "code",
        "code id_token",
        "code token id_token",
        "code token",
        "none"
    ],
    "revocation_endpoint": "https://isamfed.com:30443/mga/sps/oauth/oauth20/revoke",
    "subject_types_supported": [
        "public"
    ],
    "token_endpoint": "https://isamfed.com:30443/mga/sps/oauth/oauth20/token",
    "token_endpoint_auth_methods_supported": [
        "private_key_jwt",
        "client_secret_post",
        "client_secret_basic"
    ],
    "user_authorize_endpoint": "https://isamfed.com:30443/mga/sps/oauth/oauth20/user_authorize",
    "userinfo_endpoint": "https://isamfed.com:30443/mga/sps/oauth/oauth20/userinfo",
    "userinfo_signing_alg_values_supported": [
        "RS256"
    ],
    "version": "3.0"
}
0phase<--<-- 2 --- Registration -->-->
0not expected to doDynamic registration
0phase<--<-- 3 --- Note -->-->
1phase<--<-- 4 --- AsyncAuthn -->-->
1AuthorizationRequest
{
    "client_id": "clientID",
    "nonce": "NyUBMQ1a8jEBfZOn",
    "redirect_uri": "https://op.certification.openid.net:61772/authz_cb",
    "response_type": "code id_token",
    "scope": "openid",
    "state": "KWkHZuw7njS7Y6rA"
}
1redirect urlhttps://isamfed.com:30443/mga/sps/oauth/oauth20/authorize?state=KWkHZuw7njS7Y6rA&nonce=NyUBMQ1a8jEBfZOn&response_type=code+id_token&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61772%2Fauthz_cb&client_id=clientID
1redirecthttps://isamfed.com:30443/mga/sps/oauth/oauth20/authorize?state=KWkHZuw7njS7Y6rA&nonce=NyUBMQ1a8jEBfZOn&response_type=code+id_token&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61772%2Fauthz_cb&client_id=clientID
2http args{}
2responseURL with fragment
2responseid_token=eyJhbGciOiJBMTI4S1ciLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiY3R5IjoiSldUIn0.YwiNPNN6yRp6IJY-8qOBLUggS48pffY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zBWlJj'}
2AuthorizationResponse
{
    "code": "nTcnfyVadOz0jfaSRXn5zAxMzBWlJj",
    "id_token": {
        "aud": [
            "clientID"
        ],
        "c_hash": "as69VMkrfBnG9wcJuWqk8g",
        "exp": 1560835010,
        "iat": 1560831590,
        "iss": "https://isamfed.com:30443/test",
        "nonce": "NyUBMQ1a8jEBfZOn",
        "sub": "testuser"
    },
    "state": "KWkHZuw7njS7Y6rA"
}
2phase<--<-- 5 --- AccessToken -->-->
2requestop_args: {'state': 'KWkHZuw7njS7Y6rA'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61772/authz_cb'}
2do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61772/authz_cb', 'code': 'nTcnfyVadOz0jfaSRXn5zAxMzBWlJj', 'state': 'KWkHZuw7njS7Y6rA', 'grant_type': 'authorization_code', 'client_id': 'clientID'}, 'state': 'KWkHZuw7njS7Y6rA', 'authn_method': 'client_secret_basic'}
2AccessTokenRequest
{
    "code": "nTcnfyVadOz0jfaSRXn5zAxMzBWlJj",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61772/authz_cb",
    "state": "KWkHZuw7njS7Y6rA"
}
2request_urlhttps://isamfed.com:30443/mga/sps/oauth/oauth20/token
2request_http_args{'headers': {'Authorization': 'Basic Y2xpZW50SUQ6Y2xpZW50U2VjcmV0', 'Content-Type': 'application/x-www-form-urlencoded'}}
2requestgrant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61772%2Fauthz_cb&code=nTcnfyVadOz0jfaSRXn5zAxMzBWlJj&state=KWkHZuw7njS7Y6rA
2http response
url:https://isamfed.com:30443/mga/sps/oauth/oauth20/token status_code:200
2response{'access_token': 'wuSYcIRus2wFn1geQcCj', 'refresh_token': 'NQodb222AKECavPFZIJNQOuvnjajT4fyfIC3iC0Z', 'scope': 'openid', 'id_token': 'eyJhbGciOiJBMTI4S1ciLCJlbmMiOiJBMTI4Q0JDLUhTMj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0u5m1Dn0Z_Mk7kUaA', 'token_type': 'bearer', 'expires_in': 3599}
2AccessTokenResponse
{
    "access_token": "wuSYcIRus2wFn1geQcCj",
    "expires_in": 3599,
    "id_token": {
        "at_hash": "0JTlw0vayd0UGKfBJwwnFA",
        "aud": [
            "clientID"
        ],
        "exp": 1560835011,
        "iat": 1560831591,
        "iss": "https://isamfed.com:30443/test",
        "nonce": "NyUBMQ1a8jEBfZOn",
        "rt_hash": "XDw966St3kDHXLi7AeFQYQ",
        "sub": "testuser"
    },
    "refresh_token": "NQodb222AKECavPFZIJNQOuvnjajT4fyfIC3iC0Z",
    "scope": "openid",
    "token_type": "bearer"
}
2jws header{'kid': '_uhPdeGrTWxobFeH0XbzjJpRrzp3CB9nknx1yFV1G-0', 'alg': 'RS256'}
2jwe header{'alg': 'A128KW', 'enc': 'A128CBC-HS256', 'cty': 'JWT'}
2phase<--<-- 6 --- AccessToken -->-->
2requestop_args: {'state': 'KWkHZuw7njS7Y6rA'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61772/authz_cb'}
2do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61772/authz_cb', 'code': 'nTcnfyVadOz0jfaSRXn5zAxMzBWlJj', 'state': 'KWkHZuw7njS7Y6rA', 'grant_type': 'authorization_code', 'client_id': 'clientID'}, 'state': 'KWkHZuw7njS7Y6rA', 'authn_method': 'client_secret_basic'}
2AccessTokenRequest
{
    "code": "nTcnfyVadOz0jfaSRXn5zAxMzBWlJj",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61772/authz_cb",
    "state": "KWkHZuw7njS7Y6rA"
}
2request_urlhttps://isamfed.com:30443/mga/sps/oauth/oauth20/token
2request_http_args{'headers': {'Authorization': 'Basic Y2xpZW50SUQ6Y2xpZW50U2VjcmV0', 'Content-Type': 'application/x-www-form-urlencoded'}}
2requestgrant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61772%2Fauthz_cb&code=nTcnfyVadOz0jfaSRXn5zAxMzBWlJj&state=KWkHZuw7njS7Y6rA
3http response
url:https://isamfed.com:30443/mga/sps/oauth/oauth20/token status_code:400 message:{"error_description":"FBTOAU211E The [authorization_grant] received of type [authorization_code] does not exist.","error":"invalid_grant"}
3response{'error_description': 'FBTOAU211E The [authorization_grant] received of type [authorization_code] does not exist.', 'error': 'invalid_grant'}
3eventGot expected error
3TokenErrorResponse
{
    "error": "invalid_grant",
    "error_description": "FBTOAU211E The [authorization_grant] received of type [authorization_code] does not exist."
}
3phase<--<-- 7 --- Done -->-->
3end
3assertionCheckHTTPErrorResponse
3conditioncheck-http-error-response: status=OK [Checks that an error code is either 400 or 401 which are the only ones accepted by OAuth2/OIDC.]
3assertionVerifyResponse
3conditionverify-response: status=OK [Checks that the last response was one of a possible set of OpenID Connect Responses]
3conditionDone: status=OK

Result

PASSED