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-17T07:05:01Z

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_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 -->-->
0register
kwargs:{'response_types': ['code token'], 'grant_types': ['authorization_code', 'implicit'], 'application_name': 'OIC test tool', 'application_type': 'web', 'redirect_uris': ['https://op.certification.openid.net:61240/authz_cb'], 'contacts': ['roland@example.com'], 'post_logout_redirect_uris': ['https://op.certification.openid.net:61240/logout'], 'url': 'https://isamfed.com:30443/mga/sps/oauth/oauth20/register/OIDCDefinition', 'jwks_uri': 'https://op.certification.openid.net:61240/static/jwks_61240.json', 'token_endpoint_auth_method': 'private_key_jwt'}
0RegistrationRequest
{
    "application_type": "web",
    "contacts": [
        "roland@example.com"
    ],
    "grant_types": [
        "authorization_code",
        "implicit"
    ],
    "jwks_uri": "https://op.certification.openid.net:61240/static/jwks_61240.json",
    "post_logout_redirect_uris": [
        "https://op.certification.openid.net:61240/logout"
    ],
    "redirect_uris": [
        "https://op.certification.openid.net:61240/authz_cb"
    ],
    "response_types": [
        "code token"
    ],
    "token_endpoint_auth_method": "private_key_jwt"
}
0http response
url:https://isamfed.com:30443/mga/sps/oauth/oauth20/register/OIDCDefinition status_code:200
0RegistrationResponse
{
    "application_type": "web",
    "client_id": "AcU79Y3NnGdzCWC4yfhe",
    "client_id_issued_at": 1560755098,
    "client_secret": "vb20BQKtbc9rsyIkZm1x",
    "client_secret_expires_at": 0,
    "contacts": [
        "roland@example.com"
    ],
    "grant_types": [
        "authorization_code",
        "implicit"
    ],
    "jwks_uri": "https://op.certification.openid.net:61240/static/jwks_61240.json",
    "post_logout_redirect_uris": [
        "https://op.certification.openid.net:61240/logout"
    ],
    "redirect_uris": [
        "https://op.certification.openid.net:61240/authz_cb"
    ],
    "registration_access_token": "VhxMAuSqjGxy4QPOtnBt",
    "registration_client_uri": "https://isamfed.com:30443/mga/sps/oauth/oauth20/register/OIDCDefinition?client_id=AcU79Y3NnGdzCWC4yfhe",
    "response_types": [
        "code",
        "token"
    ],
    "token_endpoint_auth_method": "private_key_jwt"
}
0phase<--<-- 3 --- Note -->-->
1phase<--<-- 4 --- AsyncAuthn -->-->
1AuthorizationRequest
{
    "client_id": "AcU79Y3NnGdzCWC4yfhe",
    "nonce": "GHZ1YI4cbBL1kChr",
    "redirect_uri": "https://op.certification.openid.net:61240/authz_cb",
    "response_type": "code token",
    "scope": "openid",
    "state": "U5oLUWMx7RMb59Gn"
}
1redirect urlhttps://isamfed.com:30443/mga/sps/oauth/oauth20/authorize?state=U5oLUWMx7RMb59Gn&nonce=GHZ1YI4cbBL1kChr&response_type=code+token&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61240%2Fauthz_cb&client_id=AcU79Y3NnGdzCWC4yfhe
1redirecthttps://isamfed.com:30443/mga/sps/oauth/oauth20/authorize?state=U5oLUWMx7RMb59Gn&nonce=GHZ1YI4cbBL1kChr&response_type=code+token&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61240%2Fauthz_cb&client_id=AcU79Y3NnGdzCWC4yfhe
1http args{}
2responseURL with fragment
2responseaccess_token=AyZtFJ35InLk8di86FsD&state=U5oLUWMx7RMb59Gn&expires_in=3599&token_type=bearer&code=bTRmj3YIozC4WukBOedCvcHcpW1fDc&scope=openid
2response{'access_token': 'AyZtFJ35InLk8di86FsD', 'state': 'U5oLUWMx7RMb59Gn', 'expires_in': 3599, 'token_type': 'bearer', 'code': 'bTRmj3YIozC4WukBOedCvcHcpW1fDc', 'scope': 'openid'}
2AuthorizationResponse
{
    "access_token": "AyZtFJ35InLk8di86FsD",
    "code": "bTRmj3YIozC4WukBOedCvcHcpW1fDc",
    "expires_in": 3599,
    "scope": "openid",
    "state": "U5oLUWMx7RMb59Gn",
    "token_type": "bearer"
}
2phase<--<-- 5 --- AccessToken -->-->
2requestop_args: {'state': 'U5oLUWMx7RMb59Gn'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61240/authz_cb'}
2do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61240/authz_cb', 'code': 'bTRmj3YIozC4WukBOedCvcHcpW1fDc', 'state': 'U5oLUWMx7RMb59Gn', 'grant_type': 'authorization_code', 'client_id': 'AcU79Y3NnGdzCWC4yfhe'}, 'state': 'U5oLUWMx7RMb59Gn', 'authn_method': 'private_key_jwt'}
2AccessTokenRequest
{
    "client_assertion": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiQWNVNzlZM05uR2R6Q1dDNHlmaGUiLCAic3ViIjogIkFjVTc5WTNObkdkekNXQzR5ZmhlIiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICI2V2ROSlhrWXlOS3RBUUltR0IySVY0UFd0OHc4Z3pZaCIsICJleHAiOiAxNTYwNzU1NzAwLCAiaWF0IjogMTU2MDc1NTEwMH0.Zj1Q_wXSnzUI4Bq7QzJWIscBRXVWr0JERrxVnkolHx5KD0FXIo-FTiYcdCstzP4gT_1075-7YygCSpDzHfEm-DoscJl-hSYbNIY3hqiCCB_MKhfnj_btbd4PKoMU-G3MUwOxRV_9LGZrXZIQTKV6Q7R4gYeXxMh1XuET6D3DCt0mFyZctYOUAqm8irgnOsMq-SZ-v7FaXlRMUYxFMvLYP5fD6j4xSlRQugirLvuNSMrO3Fc03kqPtfgQA4Dw1LthR0fUTchWh5uUy2CenBbhlum-Pq4Jwe3_HieVFVwnQeQHmlP2RHHWzCH31Ygj5qUnnFdVmIh3G7GUOsp4gG5G5Q",
    "client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
    "code": "bTRmj3YIozC4WukBOedCvcHcpW1fDc",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61240/authz_cb",
    "state": "U5oLUWMx7RMb59Gn"
}
2request_urlhttps://isamfed.com:30443/mga/sps/oauth/oauth20/token
2request_http_args{'headers': {'Content-Type': 'application/x-www-form-urlencoded'}}
2requestgrant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61240%2Fauthz_cb&code=bTRmj3YIozC4WukBOedCvcHcpW1fDc&state=U5oLUWMx7RMb59Gn&client_assertion=eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiQWNVNzlZM05uR2R6Q1dDNHlmaGUiLCAic3ViIjogIkFjVTc5WTNObkdkekNXQzR5ZmhlIiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICI2V2ROSlhrWXlOS3RBUUltR0IySVY0UFd0OHc4Z3pZaCIsICJleHAiOiAxNTYwNzU1NzAwLCAiaWF0IjogMTU2MDc1NTEwMH0.Zj1Q_wXSnzUI4Bq7QzJWIscBRXVWr0JERrxVnkolHx5KD0FXIo-FTiYcdCstzP4gT_1075-7YygCSpDzHfEm-DoscJl-hSYbNIY3hqiCCB_MKhfnj_btbd4PKoMU-G3MUwOxRV_9LGZrXZIQTKV6Q7R4gYeXxMh1XuET6D3DCt0mFyZctYOUAqm8irgnOsMq-SZ-v7FaXlRMUYxFMvLYP5fD6j4xSlRQugirLvuNSMrO3Fc03kqPtfgQA4Dw1LthR0fUTchWh5uUy2CenBbhlum-Pq4Jwe3_HieVFVwnQeQHmlP2RHHWzCH31Ygj5qUnnFdVmIh3G7GUOsp4gG5G5Q&client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer
2http response
url:https://isamfed.com:30443/mga/sps/oauth/oauth20/token status_code:200
2response{'access_token': 'AZNfrFeytV9jNTiArYsW', 'refresh_token': '69j9tGC9BcEvKzAQercYoJyxzZVAqbgrNSPcp0A7', 'scope': 'openid', 'id_token': 'eyJraWQiOiJfdWhQZGVHclRXeG9iRmVIMFhiempKcFJyenAzQ0I5bmtueDF5RlYxRy0wIiwiYWxnIjoiUlMyNTYifQ.eyJydF9oYXNoIjoieGxyS2pyTUpsQlQ1bWIwYkNGYkx0dyIsIm5vbmNlIjoiR0haMVlJNGNiQkwxa0NociIsImlhdCI6MTU2MDc1NTEwMCwiaXNzIjoiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My90ZXN0IiwiYXRfaGFzaCI6IllIcFZwRlQ1bEFyWVpFSHdza1NBZkEiLCJzdWIiOiJ0ZXN0dXNlciIsImV4cCI6MTU2MDc1ODUyMCwiYXVkIjoiQWNVNzlZM05uR2R6Q1dDNHlmaGUifQ.wHVKI9PXP-wZPL2LEkw2Yw7x5oum-wkqu1Kndl4H2I2xpbwcR8Ua2qrCzCUj7EULNm7b1B1oga_fzavKdsRp47gN6O0LH3LZ_Gvvgw8yuPH-4gm79FUll44Qi0MRaGPZVyCCAH1g8OKvrS7ecg2J2X1CRsZBNCaoIz1jFtPK_FONI1J0zOfyLGStbMaGv302u7Yu5hfXEdU5sy3cV-QVCmMCBQZ9wqI2TxVlYz7frs_Kgp8g8UwRA3UutwFhld7cJgJ4ulhRv7qhHo7OPQIjH1sSLApGjm1PzKWGUFe_WutFva6iSsg8Sffc5zJeTijoEB8FMIAHWxgDfuSXLMLYZw', 'token_type': 'bearer', 'expires_in': 3599}
3AccessTokenResponse
{
    "access_token": "AZNfrFeytV9jNTiArYsW",
    "expires_in": 3599,
    "id_token": {
        "at_hash": "YHpVpFT5lArYZEHwskSAfA",
        "aud": [
            "AcU79Y3NnGdzCWC4yfhe"
        ],
        "exp": 1560758520,
        "iat": 1560755100,
        "iss": "https://isamfed.com:30443/test",
        "nonce": "GHZ1YI4cbBL1kChr",
        "rt_hash": "xlrKjrMJlBT5mb0bCFbLtw",
        "sub": "testuser"
    },
    "refresh_token": "69j9tGC9BcEvKzAQercYoJyxzZVAqbgrNSPcp0A7",
    "scope": "openid",
    "token_type": "bearer"
}
3jws header{'kid': '_uhPdeGrTWxobFeH0XbzjJpRrzp3CB9nknx1yFV1G-0', 'alg': 'RS256'}
3phase<--<-- 6 --- AccessToken -->-->
3requestop_args: {'state': 'U5oLUWMx7RMb59Gn'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61240/authz_cb'}
3do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61240/authz_cb', 'code': 'bTRmj3YIozC4WukBOedCvcHcpW1fDc', 'state': 'U5oLUWMx7RMb59Gn', 'grant_type': 'authorization_code', 'client_id': 'AcU79Y3NnGdzCWC4yfhe'}, 'state': 'U5oLUWMx7RMb59Gn', 'authn_method': 'private_key_jwt'}
3AccessTokenRequest
{
    "client_assertion": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiQWNVNzlZM05uR2R6Q1dDNHlmaGUiLCAic3ViIjogIkFjVTc5WTNObkdkekNXQzR5ZmhlIiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICJ6aFNOVFF1Mm9pVVpycTJEaDNZWGR4QVg4VTZwVFVCYyIsICJleHAiOiAxNTYwNzU1NzAxLCAiaWF0IjogMTU2MDc1NTEwMX0.ZB2uaLtqh3e6COVw4pKKoIC54FJ3UTVHn4dMekR_KDjakQI7zHKIzTgS3C4py6CkfuaH2eUG4DNwIeqjQxujCAshm0fgDoFShMAR-Dm6vtUEDX-g27_RQqXVUG5HJxf6Hu0BXUCVB0Ttp4Qw8BlNa6lKc9I7CMKN8BhlxZ28ec3J057gPuJKCpRpmWEIzYLn4nm7zB-3IkIHpJFKIp1Bm4hQSj5WUnyH3mySE2mHcH-JIc8iVwiYR7MMLyGAUW1c6rzpB5wC0dPS4G32tLm-MuBD5fypcsbI5biMKUD-E_XbxPQWJnlwoMns1b8V_DykadIGFaRXS7Fs3VD_vkkixQ",
    "client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
    "code": "bTRmj3YIozC4WukBOedCvcHcpW1fDc",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61240/authz_cb",
    "state": "U5oLUWMx7RMb59Gn"
}
3request_urlhttps://isamfed.com:30443/mga/sps/oauth/oauth20/token
3request_http_args{'headers': {'Content-Type': 'application/x-www-form-urlencoded'}}
3requestgrant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61240%2Fauthz_cb&code=bTRmj3YIozC4WukBOedCvcHcpW1fDc&state=U5oLUWMx7RMb59Gn&client_assertion=eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiQWNVNzlZM05uR2R6Q1dDNHlmaGUiLCAic3ViIjogIkFjVTc5WTNObkdkekNXQzR5ZmhlIiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICJ6aFNOVFF1Mm9pVVpycTJEaDNZWGR4QVg4VTZwVFVCYyIsICJleHAiOiAxNTYwNzU1NzAxLCAiaWF0IjogMTU2MDc1NTEwMX0.ZB2uaLtqh3e6COVw4pKKoIC54FJ3UTVHn4dMekR_KDjakQI7zHKIzTgS3C4py6CkfuaH2eUG4DNwIeqjQxujCAshm0fgDoFShMAR-Dm6vtUEDX-g27_RQqXVUG5HJxf6Hu0BXUCVB0Ttp4Qw8BlNa6lKc9I7CMKN8BhlxZ28ec3J057gPuJKCpRpmWEIzYLn4nm7zB-3IkIHpJFKIp1Bm4hQSj5WUnyH3mySE2mHcH-JIc8iVwiYR7MMLyGAUW1c6rzpB5wC0dPS4G32tLm-MuBD5fypcsbI5biMKUD-E_XbxPQWJnlwoMns1b8V_DykadIGFaRXS7Fs3VD_vkkixQ&client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer
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