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-17T15:45:54Z

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": [
        "RSA-OAEP-256"
    ],
    "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 -->-->
0register
kwargs:{'response_types': ['code'], 'grant_types': ['authorization_code'], 'application_name': 'OIC test tool', 'application_type': 'web', 'redirect_uris': ['https://op.certification.openid.net:61583/authz_cb'], 'contacts': ['roland@example.com'], 'post_logout_redirect_uris': ['https://op.certification.openid.net:61583/logout'], 'url': 'https://isamfed.com:30443/mga/sps/oauth/oauth20/register/OIDCDefinition', 'jwks_uri': 'https://op.certification.openid.net:61583/static/jwks_61583.json', 'token_endpoint_auth_method': 'private_key_jwt'}
0RegistrationRequest
{
    "application_type": "web",
    "contacts": [
        "roland@example.com"
    ],
    "grant_types": [
        "authorization_code"
    ],
    "jwks_uri": "https://op.certification.openid.net:61583/static/jwks_61583.json",
    "post_logout_redirect_uris": [
        "https://op.certification.openid.net:61583/logout"
    ],
    "redirect_uris": [
        "https://op.certification.openid.net:61583/authz_cb"
    ],
    "response_types": [
        "code"
    ],
    "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": "dyXegQn3fhopeHw32yvR",
    "client_id_issued_at": 1560786351,
    "client_secret": "U46T0HIqbdJonr9i5vAv",
    "client_secret_expires_at": 0,
    "contacts": [
        "roland@example.com"
    ],
    "grant_types": [
        "authorization_code"
    ],
    "jwks_uri": "https://op.certification.openid.net:61583/static/jwks_61583.json",
    "post_logout_redirect_uris": [
        "https://op.certification.openid.net:61583/logout"
    ],
    "redirect_uris": [
        "https://op.certification.openid.net:61583/authz_cb"
    ],
    "registration_access_token": "9MXoxTRfSAj39GuXQqOI",
    "registration_client_uri": "https://isamfed.com:30443/mga/sps/oauth/oauth20/register/OIDCDefinition?client_id=dyXegQn3fhopeHw32yvR",
    "response_types": [
        "code"
    ],
    "token_endpoint_auth_method": "private_key_jwt"
}
0phase<--<-- 3 --- Note -->-->
1phase<--<-- 4 --- AsyncAuthn -->-->
1AuthorizationRequest
{
    "client_id": "dyXegQn3fhopeHw32yvR",
    "nonce": "nCftXTqJzziBB0PA",
    "redirect_uri": "https://op.certification.openid.net:61583/authz_cb",
    "response_type": "code",
    "scope": "openid",
    "state": "SA57F1aO0TAKFeok"
}
1redirect urlhttps://isamfed.com:30443/mga/sps/oauth/oauth20/authorize?state=SA57F1aO0TAKFeok&nonce=nCftXTqJzziBB0PA&response_type=code&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61583%2Fauthz_cb&client_id=dyXegQn3fhopeHw32yvR
1redirecthttps://isamfed.com:30443/mga/sps/oauth/oauth20/authorize?state=SA57F1aO0TAKFeok&nonce=nCftXTqJzziBB0PA&response_type=code&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61583%2Fauthz_cb&client_id=dyXegQn3fhopeHw32yvR
2responseResponse URL with query part
2response{'state': 'SA57F1aO0TAKFeok', 'code': 'crL9PJnZCfXtGuLvXOW6bl45kLbNlV'}
2response{'state': 'SA57F1aO0TAKFeok', 'code': 'crL9PJnZCfXtGuLvXOW6bl45kLbNlV'}
2AuthorizationResponse
{
    "code": "crL9PJnZCfXtGuLvXOW6bl45kLbNlV",
    "state": "SA57F1aO0TAKFeok"
}
2phase<--<-- 5 --- AccessToken -->-->
2requestop_args: {'state': 'SA57F1aO0TAKFeok'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61583/authz_cb'}
2do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61583/authz_cb', 'code': 'crL9PJnZCfXtGuLvXOW6bl45kLbNlV', 'state': 'SA57F1aO0TAKFeok', 'grant_type': 'authorization_code', 'client_id': 'dyXegQn3fhopeHw32yvR'}, 'state': 'SA57F1aO0TAKFeok', 'authn_method': 'private_key_jwt'}
2AccessTokenRequest
{
    "client_assertion": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiZHlYZWdRbjNmaG9wZUh3MzJ5dlIiLCAic3ViIjogImR5WGVnUW4zZmhvcGVIdzMyeXZSIiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICIwdEpCeDgydW1QNkcyWmVRM1phQlp6dkVNNFNOdlpFMiIsICJleHAiOiAxNTYwNzg2OTUzLCAiaWF0IjogMTU2MDc4NjM1M30.xCTV_4bXwwIwoim-YKXdUp3veJb3qk7zTPESI4UkUDGoUvdqTa81bjvC_eJ9cCYrnwAezWAZWljzMGlrwYaVDSrlZCKdftF7hyDt_JMN4HByae3iFxyCgX77jEM1B9XQ0fSP6qlhO_pZFoz5NZLWjhrHPR9PxsNJ6LNDYUSDNU2ued0NakpHqH-zX8LDTJqwz4PJBke2MQhp9if2VRZ_fGujRXh1cJI9E_o5WEdp3oIL1tvKi2simxA5BSLz7_DPeMi6nvN2z99rWdGr58WwG2aEOuJjbg31hFP6kaosvEdhs1kew7fPpOqaxpXqh3STWNAvaRdV4x23C9oMIVMVjw",
    "client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
    "code": "crL9PJnZCfXtGuLvXOW6bl45kLbNlV",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61583/authz_cb",
    "state": "SA57F1aO0TAKFeok"
}
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%3A61583%2Fauthz_cb&code=crL9PJnZCfXtGuLvXOW6bl45kLbNlV&state=SA57F1aO0TAKFeok&client_assertion=eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiZHlYZWdRbjNmaG9wZUh3MzJ5dlIiLCAic3ViIjogImR5WGVnUW4zZmhvcGVIdzMyeXZSIiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICIwdEpCeDgydW1QNkcyWmVRM1phQlp6dkVNNFNOdlpFMiIsICJleHAiOiAxNTYwNzg2OTUzLCAiaWF0IjogMTU2MDc4NjM1M30.xCTV_4bXwwIwoim-YKXdUp3veJb3qk7zTPESI4UkUDGoUvdqTa81bjvC_eJ9cCYrnwAezWAZWljzMGlrwYaVDSrlZCKdftF7hyDt_JMN4HByae3iFxyCgX77jEM1B9XQ0fSP6qlhO_pZFoz5NZLWjhrHPR9PxsNJ6LNDYUSDNU2ued0NakpHqH-zX8LDTJqwz4PJBke2MQhp9if2VRZ_fGujRXh1cJI9E_o5WEdp3oIL1tvKi2simxA5BSLz7_DPeMi6nvN2z99rWdGr58WwG2aEOuJjbg31hFP6kaosvEdhs1kew7fPpOqaxpXqh3STWNAvaRdV4x23C9oMIVMVjw&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': '1068i0nSRX7aUEv3F0Hh', 'refresh_token': '2NYvNruQ9EbwHT4HF2dXDid01Fs8xGJ6sVRYjRQS', 'scope': 'openid', 'id_token': 'eyJhbGciOiJSU0EtT0FFUC0yNTYiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2Iiwia2lkIjoiZ3RINHYzWXIyUXFMcmVCU3owQnlRUTh2a2Y4ZUZvMUtJaXQzcy0zQmJ3dyIsImN0eSI6IkpXVCJ9.gwRA8Dci3Aqe1N6grwreYRPPDcON8Ceovj1-Zhxo2N4H599JgrXKz-hzw496xj4Qh-glyTRP4JpAph7czqmA6Vfi_BwMl0QCBEGkHpyrI-0_omodGYUoTYAWE0OvxoAPxZ7JljnmiqAhYeospHj3ny6jE-pR2jKqeayKxbzFKqCaxh_x6yGjcOqwts1FDhaJONbBWkkOXfTG2FbwMT21hYFt-IBMH3Ay_JnARoQP3tnQIJ-U3cjFeTBunIlkm3nuGp_gBSWMLnY5tVZOerf3y38K1qnbQQpidVgxUjPk0xaVgb-kMqVQhfsj3v47of_wqKSp_vXl62QcfDhzyrHSMw.MzYzIy6x6QpyOfCScnngog.RlO850oFGytzDF1AXfQCcMI2HuwDWTSUcSGZVZ_4vi9zs30zisHV6xBnq6e1o5cZc9S8S0g_QjNDA7qD-NamhqwcRJ8zep-ALpo4gPkky-l7B4iC3sDEJTe6rVXqp5KnXOW5bKyLIH7Dox4bGHZxTxD0lotbNVFi8fAKMciZ9ALYvhLyTHuMABnHMGsy3DbTDmAqA2O3W_smsmo7yqqx8CAQwcXl-bHy89qMGnBjvT6vtAn1PSzRZ6_h4t0ssMy_De7xt4cLIVJ80XuxgyAeMaUsGlckv_2sqnlxwmpBxxWjH7LTyg2apNPTQf_DyLy7nSIxf6wFqyDncQrBNz-uNcXsghCcABrg7ATy535lkrAUbtnO_XxQZ_1HNpCYqAh3Dk6Ez9u2g1kuvr9Q3Vo66iHGQhpGXj3KrbJ7s_gsM0cb_KapTz2X0ZDz78UINPYRQRk4TX-qtktaX5cNnQn34ei8XcwcLKFT_26gU_gzz6R7E4WWdyqYduyUyocJVwgnqIiiH7Wg_3bgcuuYfjJP31S4s5XrRPAzhpDwyPYGqbu6Gn_oR7CFVBGahG7MypzExU5UxiFdyusAiE2ddYRwTcf8r5ZNnIp6IfgQ5Yy8vxsd4L7IpYflXhaum9vRD8_iYiBrhdQVr1QhxlI7Alsjp8QvHuKy_zHHFDRxgWuVmCm-WjQQTsQKF1A6qGzYUSHJgIryZmBmXY2_RI_YBpfA45C1A845R3snbDaWmAEEnlZh_6qdBTK5Hpl42p6QVeSHisogH1QPNU25QZ_BMl6O0DdC-7WrlMvdCvgHZqU602V4mHuwimvhhr_kGgvA1T81zVNXkq9OZeQUss8WBlcx9u9oRcHlcxGTSR_3vwEvgPaEalGA0B8ZiHu7RqphQr8jbupavqw_yg8855ueV-6Z5lOYGkKaBJJlt__XloZc6w_ddL6K83-NY9GvH_iEcGji7IPnsGTe1HhjAIfgrCNKSw.uqSixOvcLarhBwiijH5LAQ', 'token_type': 'bearer', 'expires_in': 3599}
3AccessTokenResponse
{
    "access_token": "1068i0nSRX7aUEv3F0Hh",
    "expires_in": 3599,
    "id_token": {
        "at_hash": "FgRa86gZP__ugaPGBBZKjA",
        "aud": [
            "dyXegQn3fhopeHw32yvR"
        ],
        "exp": 1560789773,
        "iat": 1560786353,
        "iss": "https://isamfed.com:30443/test",
        "nonce": "nCftXTqJzziBB0PA",
        "rt_hash": "vPtcZCSNn_h_bipMWWCxpg",
        "sub": "testuser"
    },
    "refresh_token": "2NYvNruQ9EbwHT4HF2dXDid01Fs8xGJ6sVRYjRQS",
    "scope": "openid",
    "token_type": "bearer"
}
3jws header{'kid': '_uhPdeGrTWxobFeH0XbzjJpRrzp3CB9nknx1yFV1G-0', 'alg': 'RS256'}
3jwe header{'alg': 'RSA-OAEP-256', 'enc': 'A128CBC-HS256', 'kid': 'gtH4v3Yr2QqLreBSz0ByQQ8vkf8eFo1KIit3s-3Bbww', 'cty': 'JWT'}
3phase<--<-- 6 --- AccessToken -->-->
3requestop_args: {'state': 'SA57F1aO0TAKFeok'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61583/authz_cb'}
3do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61583/authz_cb', 'code': 'crL9PJnZCfXtGuLvXOW6bl45kLbNlV', 'state': 'SA57F1aO0TAKFeok', 'grant_type': 'authorization_code', 'client_id': 'dyXegQn3fhopeHw32yvR'}, 'state': 'SA57F1aO0TAKFeok', 'authn_method': 'private_key_jwt'}
3AccessTokenRequest
{
    "client_assertion": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiZHlYZWdRbjNmaG9wZUh3MzJ5dlIiLCAic3ViIjogImR5WGVnUW4zZmhvcGVIdzMyeXZSIiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICJza3ZaR1JmY3pnUDdBMzV4bXJHY2x4WklGam5JQVdFSyIsICJleHAiOiAxNTYwNzg2OTU0LCAiaWF0IjogMTU2MDc4NjM1NH0.0NAo9E8AUwapm3D7uNjFVSNoS0BAjV1NGH_Wqx7Fp0l1-C3N_wDDx3Pvbb3XJoiX-sYrlRwfgB3wv9hxMWHKRp5K0uDWvCbNQmNZKa0WtNNUV329ZduFNdP7tDvdnQBYdSpbl8QsWEI7Q6XfdfIAYvagwukkzdARHQQhHdV6VWv4N9EXyvkL133zwaD9C6japSGxJGIv7KwCBQlSlMkJNfkWq64r-p7lB0PVE55V639Uoe4vHEIgqFAidQXOAHI2VD6h5PzVAU9ngdgPQ_ZQJjPEgfLjHrH0t5bI9yMg9P-Bk8P9n-ILsURSDNTwNqj65cSorppNfb1hPmF2UW8aiQ",
    "client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
    "code": "crL9PJnZCfXtGuLvXOW6bl45kLbNlV",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61583/authz_cb",
    "state": "SA57F1aO0TAKFeok"
}
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%3A61583%2Fauthz_cb&code=crL9PJnZCfXtGuLvXOW6bl45kLbNlV&state=SA57F1aO0TAKFeok&client_assertion=eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiZHlYZWdRbjNmaG9wZUh3MzJ5dlIiLCAic3ViIjogImR5WGVnUW4zZmhvcGVIdzMyeXZSIiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICJza3ZaR1JmY3pnUDdBMzV4bXJHY2x4WklGam5JQVdFSyIsICJleHAiOiAxNTYwNzg2OTU0LCAiaWF0IjogMTU2MDc4NjM1NH0.0NAo9E8AUwapm3D7uNjFVSNoS0BAjV1NGH_Wqx7Fp0l1-C3N_wDDx3Pvbb3XJoiX-sYrlRwfgB3wv9hxMWHKRp5K0uDWvCbNQmNZKa0WtNNUV329ZduFNdP7tDvdnQBYdSpbl8QsWEI7Q6XfdfIAYvagwukkzdARHQQhHdV6VWv4N9EXyvkL133zwaD9C6japSGxJGIv7KwCBQlSlMkJNfkWq64r-p7lB0PVE55V639Uoe4vHEIgqFAidQXOAHI2VD6h5PzVAU9ngdgPQ_ZQJjPEgfLjHrH0t5bI9yMg9P-Bk8P9n-ILsURSDNTwNqj65cSorppNfb1hPmF2UW8aiQ&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