Test Info

Issuerhttps://isamfed.com:30443/test
Profile[]
Test IDOP-OAuth-2nd-30s
Test descriptionTrying to use authorization code twice with 30 seconds in between uses must result in an error
Timestamp2019-06-17T07:05:36Z

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 --- Note -->-->
1phase<--<-- 1 --- Webfinger -->-->
1not expected to doWebFinger
1phase<--<-- 2 --- Discovery -->-->
1provider_config
kwargs:{'issuer': 'https://isamfed.com:30443/test'}
1http response
url:https://isamfed.com:30443/test/.well-known/openid-configuration status_code:200
1ProviderConfigurationResponse
{
    "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"
}
1phase<--<-- 3 --- Registration -->-->
1register
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'}
1RegistrationRequest
{
    "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"
}
1http response
url:https://isamfed.com:30443/mga/sps/oauth/oauth20/register/OIDCDefinition status_code:200
1RegistrationResponse
{
    "application_type": "web",
    "client_id": "gWNqXuAcCm2pokO8JX0Z",
    "client_id_issued_at": 1560755103,
    "client_secret": "sZTOVehCkvzwswDnd9qD",
    "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": "t4OQ11cTewZvXG7eVb0w",
    "registration_client_uri": "https://isamfed.com:30443/mga/sps/oauth/oauth20/register/OIDCDefinition?client_id=gWNqXuAcCm2pokO8JX0Z",
    "response_types": [
        "code",
        "token"
    ],
    "token_endpoint_auth_method": "private_key_jwt"
}
1phase<--<-- 4 --- AsyncAuthn -->-->
1AuthorizationRequest
{
    "client_id": "gWNqXuAcCm2pokO8JX0Z",
    "nonce": "UDD5giOgJKp9Rka9",
    "redirect_uri": "https://op.certification.openid.net:61240/authz_cb",
    "response_type": "code token",
    "scope": "openid",
    "state": "mp9oF9sRGBJjJMYn"
}
1redirect urlhttps://isamfed.com:30443/mga/sps/oauth/oauth20/authorize?state=mp9oF9sRGBJjJMYn&nonce=UDD5giOgJKp9Rka9&response_type=code+token&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61240%2Fauthz_cb&client_id=gWNqXuAcCm2pokO8JX0Z
1redirecthttps://isamfed.com:30443/mga/sps/oauth/oauth20/authorize?state=mp9oF9sRGBJjJMYn&nonce=UDD5giOgJKp9Rka9&response_type=code+token&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61240%2Fauthz_cb&client_id=gWNqXuAcCm2pokO8JX0Z
2http args{}
2responseURL with fragment
2responseaccess_token=MvO9GRJBBBzKAuvk2UiR&state=mp9oF9sRGBJjJMYn&expires_in=3599&token_type=bearer&code=mer4diKrgfI3ssJnpnYKxW6ApMmd1d&scope=openid
2response{'access_token': 'MvO9GRJBBBzKAuvk2UiR', 'state': 'mp9oF9sRGBJjJMYn', 'expires_in': 3599, 'token_type': 'bearer', 'code': 'mer4diKrgfI3ssJnpnYKxW6ApMmd1d', 'scope': 'openid'}
2AuthorizationResponse
{
    "access_token": "MvO9GRJBBBzKAuvk2UiR",
    "code": "mer4diKrgfI3ssJnpnYKxW6ApMmd1d",
    "expires_in": 3599,
    "scope": "openid",
    "state": "mp9oF9sRGBJjJMYn",
    "token_type": "bearer"
}
2phase<--<-- 5 --- AccessToken -->-->
2requestop_args: {'state': 'mp9oF9sRGBJjJMYn'}, 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': 'mer4diKrgfI3ssJnpnYKxW6ApMmd1d', 'state': 'mp9oF9sRGBJjJMYn', 'grant_type': 'authorization_code', 'client_id': 'gWNqXuAcCm2pokO8JX0Z'}, 'state': 'mp9oF9sRGBJjJMYn', 'authn_method': 'private_key_jwt'}
2AccessTokenRequest
{
    "client_assertion": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiZ1dOcVh1QWNDbTJwb2tPOEpYMFoiLCAic3ViIjogImdXTnFYdUFjQ20ycG9rTzhKWDBaIiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICJIdlQ3bllDV1NGWDk1T09oeGVzOFpJMk5VenlqMHBiSyIsICJleHAiOiAxNTYwNzU1NzA0LCAiaWF0IjogMTU2MDc1NTEwNH0.NOAB9C-G0olsUhynueXMFvQGw6hEnSUdkPaK11vLBKO6sYVVXvJFwuRYV_U4Yv7eCsxBIY72zuusJGZrMI61cqY8Tq4bpSgSEOmd9V1MRvrNsFAAxcmlMeStPiUJXi8LYPj6zfcgc3KhhnuHSgT4HjuSAYBAL3cxxwEYvU-lyluCZ879Cme7xgur2D1J9iDdZqzlaCaF1za03O7GhEn4sfxjnPmzZctJsKtQwDjnMSPIiOYBTfjG-B_6a-15Lc3CpcoJh_lgoro6RNI11aGyJAlglnFj9xGZBEzvgE9B5swYzEnH_An4VyNdJG1wHzQzvS7kTFKLPfaCRjcSRM6j0Q",
    "client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
    "code": "mer4diKrgfI3ssJnpnYKxW6ApMmd1d",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61240/authz_cb",
    "state": "mp9oF9sRGBJjJMYn"
}
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=mer4diKrgfI3ssJnpnYKxW6ApMmd1d&state=mp9oF9sRGBJjJMYn&client_assertion=eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiZ1dOcVh1QWNDbTJwb2tPOEpYMFoiLCAic3ViIjogImdXTnFYdUFjQ20ycG9rTzhKWDBaIiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICJIdlQ3bllDV1NGWDk1T09oeGVzOFpJMk5VenlqMHBiSyIsICJleHAiOiAxNTYwNzU1NzA0LCAiaWF0IjogMTU2MDc1NTEwNH0.NOAB9C-G0olsUhynueXMFvQGw6hEnSUdkPaK11vLBKO6sYVVXvJFwuRYV_U4Yv7eCsxBIY72zuusJGZrMI61cqY8Tq4bpSgSEOmd9V1MRvrNsFAAxcmlMeStPiUJXi8LYPj6zfcgc3KhhnuHSgT4HjuSAYBAL3cxxwEYvU-lyluCZ879Cme7xgur2D1J9iDdZqzlaCaF1za03O7GhEn4sfxjnPmzZctJsKtQwDjnMSPIiOYBTfjG-B_6a-15Lc3CpcoJh_lgoro6RNI11aGyJAlglnFj9xGZBEzvgE9B5swYzEnH_An4VyNdJG1wHzQzvS7kTFKLPfaCRjcSRM6j0Q&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:200
3response{'access_token': 'M0uuIGe2Evu7nWQDGrYY', 'refresh_token': '7r3VwCwg4hCUqgormJL8rc9faO2ObwYzoWpWNCxm', 'scope': 'openid', 'id_token': 'eyJraWQiOiJfdWhQZGVHclRXeG9iRmVIMFhiempKcFJyenAzQ0I5bmtueDF5RlYxRy0wIiwiYWxnIjoiUlMyNTYifQ.eyJydF9oYXNoIjoiVF9ybmdMVlJBRFRwVmEzREViTXN1QSIsIm5vbmNlIjoiVURENWdpT2dKS3A5UmthOSIsImlhdCI6MTU2MDc1NTEwNSwiaXNzIjoiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My90ZXN0IiwiYXRfaGFzaCI6IkJjb3JLLXFJYnRCUnYzLXhlbHk1emciLCJzdWIiOiJ0ZXN0dXNlciIsImV4cCI6MTU2MDc1ODUyNSwiYXVkIjoiZ1dOcVh1QWNDbTJwb2tPOEpYMFoifQ.Jpky865yZyXizXNw0MaUEVaJNWtLe9AkfLFUmmpsrlFcS7AKeh1_pSSGUUbhyXP6XwoDVdSaLmwkjttgfWsxT81sutF7Mz06ch0zogozsb0qQ3wvo6uUZmSSsioe16izHLjJ6ITvl3vMxX7i8i7OJ31h1IKpOLchai5KIggDnbIu3wQr3wmKYKBWGWIIj2kQTs6J5kbsJ3sLgeSjsNmDQmANddtRkLYQPAZaJLXdK5YH6wqtXZELHWm7O-2ZCACPOm5wD_mjvl6cfcolWHH6YMzvkkxIDOJDj7OqdJdNUzclT1hhzaD2ohhIRqprJ5JZIoYst-3pQC624c2oJ-SUcQ', 'token_type': 'bearer', 'expires_in': 3599}
4AccessTokenResponse
{
    "access_token": "M0uuIGe2Evu7nWQDGrYY",
    "expires_in": 3599,
    "id_token": {
        "at_hash": "BcorK-qIbtBRv3-xely5zg",
        "aud": [
            "gWNqXuAcCm2pokO8JX0Z"
        ],
        "exp": 1560758525,
        "iat": 1560755105,
        "iss": "https://isamfed.com:30443/test",
        "nonce": "UDD5giOgJKp9Rka9",
        "rt_hash": "T_rngLVRADTpVa3DEbMsuA",
        "sub": "testuser"
    },
    "refresh_token": "7r3VwCwg4hCUqgormJL8rc9faO2ObwYzoWpWNCxm",
    "scope": "openid",
    "token_type": "bearer"
}
4jws header{'kid': '_uhPdeGrTWxobFeH0XbzjJpRrzp3CB9nknx1yFV1G-0', 'alg': 'RS256'}
4phase<--<-- 6 --- TimeDelay -->-->
34phase<--<-- 7 --- AccessToken -->-->
34requestop_args: {'state': 'mp9oF9sRGBJjJMYn'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61240/authz_cb'}
34do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61240/authz_cb', 'code': 'mer4diKrgfI3ssJnpnYKxW6ApMmd1d', 'state': 'mp9oF9sRGBJjJMYn', 'grant_type': 'authorization_code', 'client_id': 'gWNqXuAcCm2pokO8JX0Z'}, 'state': 'mp9oF9sRGBJjJMYn', 'authn_method': 'private_key_jwt'}
34AccessTokenRequest
{
    "client_assertion": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiZ1dOcVh1QWNDbTJwb2tPOEpYMFoiLCAic3ViIjogImdXTnFYdUFjQ20ycG9rTzhKWDBaIiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICJzcHpFNXo4NUp5MXZXWEdzbnlKdEp0OU1hT1VnZG16UiIsICJleHAiOiAxNTYwNzU1NzM2LCAiaWF0IjogMTU2MDc1NTEzNn0.ABVJF4bZ-D92KcPwIeJajNoR5jvRixkKaSALMGhrP0v20CF4YvkI7z7IwKLoWtxKql6sBkwHCRht-2mUUZYyT_B8A6BvbD77EsJh-ByjjbUnaENTDHspVO-xiYBpcKrI_-KMrJm5CZ6FW4suKAU34iU8ZQcTTfUaQEM0tyREJFphK_rPvkDWA7WOIthOT59VzAjYsppa19uyU206s0c6bIPhCSPKEwraqed3W_kGQA-svkYryoNWb0Mq3GzMGo59rvu9yDlUa-ZDFNzMQEVpIzbPTt-pyKMjOVJZ1gBG-7OZHsMo6Se4bO8Qtc7-RV96YYG9F4SpEsZUruCayEM3ow",
    "client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
    "code": "mer4diKrgfI3ssJnpnYKxW6ApMmd1d",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61240/authz_cb",
    "state": "mp9oF9sRGBJjJMYn"
}
34request_urlhttps://isamfed.com:30443/mga/sps/oauth/oauth20/token
34request_http_args{'headers': {'Content-Type': 'application/x-www-form-urlencoded'}}
34requestgrant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61240%2Fauthz_cb&code=mer4diKrgfI3ssJnpnYKxW6ApMmd1d&state=mp9oF9sRGBJjJMYn&client_assertion=eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiZ1dOcVh1QWNDbTJwb2tPOEpYMFoiLCAic3ViIjogImdXTnFYdUFjQ20ycG9rTzhKWDBaIiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICJzcHpFNXo4NUp5MXZXWEdzbnlKdEp0OU1hT1VnZG16UiIsICJleHAiOiAxNTYwNzU1NzM2LCAiaWF0IjogMTU2MDc1NTEzNn0.ABVJF4bZ-D92KcPwIeJajNoR5jvRixkKaSALMGhrP0v20CF4YvkI7z7IwKLoWtxKql6sBkwHCRht-2mUUZYyT_B8A6BvbD77EsJh-ByjjbUnaENTDHspVO-xiYBpcKrI_-KMrJm5CZ6FW4suKAU34iU8ZQcTTfUaQEM0tyREJFphK_rPvkDWA7WOIthOT59VzAjYsppa19uyU206s0c6bIPhCSPKEwraqed3W_kGQA-svkYryoNWb0Mq3GzMGo59rvu9yDlUa-ZDFNzMQEVpIzbPTt-pyKMjOVJZ1gBG-7OZHsMo6Se4bO8Qtc7-RV96YYG9F4SpEsZUruCayEM3ow&client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer
34http 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"}
34response{'error_description': 'FBTOAU211E The [authorization_grant] received of type [authorization_code] does not exist.', 'error': 'invalid_grant'}
34eventGot expected error
34TokenErrorResponse
{
    "error": "invalid_grant",
    "error_description": "FBTOAU211E The [authorization_grant] received of type [authorization_code] does not exist."
}
34phase<--<-- 8 --- Done -->-->
34end
34assertionCheckHTTPErrorResponse
34conditioncheck-http-error-response: status=OK [Checks that an error code is either 400 or 401 which are the only ones accepted by OAuth2/OIDC.]
34assertionVerifyResponse
34conditionverify-response: status=OK [Checks that the last response was one of a possible set of OpenID Connect Responses]
34conditionDone: status=OK

Result

PASSED