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-17T15:46:29Z

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_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"
}
1phase<--<-- 3 --- Registration -->-->
1register
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'}
1RegistrationRequest
{
    "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"
}
2http response
url:https://isamfed.com:30443/mga/sps/oauth/oauth20/register/OIDCDefinition status_code:200
2RegistrationResponse
{
    "application_type": "web",
    "client_id": "0tHMLf12Urxl5WaLQOnz",
    "client_id_issued_at": 1560786356,
    "client_secret": "heXisKc30JabH0yfO8Jq",
    "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": "DlDLDXVy1PhnYcGcbQSm",
    "registration_client_uri": "https://isamfed.com:30443/mga/sps/oauth/oauth20/register/OIDCDefinition?client_id=0tHMLf12Urxl5WaLQOnz",
    "response_types": [
        "code"
    ],
    "token_endpoint_auth_method": "private_key_jwt"
}
2phase<--<-- 4 --- AsyncAuthn -->-->
2AuthorizationRequest
{
    "client_id": "0tHMLf12Urxl5WaLQOnz",
    "nonce": "CHjJTTe88RGDLBAq",
    "redirect_uri": "https://op.certification.openid.net:61583/authz_cb",
    "response_type": "code",
    "scope": "openid",
    "state": "Bikc6ZWjTRUWNhxJ"
}
2redirect urlhttps://isamfed.com:30443/mga/sps/oauth/oauth20/authorize?state=Bikc6ZWjTRUWNhxJ&nonce=CHjJTTe88RGDLBAq&response_type=code&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61583%2Fauthz_cb&client_id=0tHMLf12Urxl5WaLQOnz
2redirecthttps://isamfed.com:30443/mga/sps/oauth/oauth20/authorize?state=Bikc6ZWjTRUWNhxJ&nonce=CHjJTTe88RGDLBAq&response_type=code&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61583%2Fauthz_cb&client_id=0tHMLf12Urxl5WaLQOnz
3responseResponse URL with query part
3response{'state': 'Bikc6ZWjTRUWNhxJ', 'code': 'a9iBl3oAScQmkYlQSHSktb3PJIW3cl'}
3response{'state': 'Bikc6ZWjTRUWNhxJ', 'code': 'a9iBl3oAScQmkYlQSHSktb3PJIW3cl'}
3AuthorizationResponse
{
    "code": "a9iBl3oAScQmkYlQSHSktb3PJIW3cl",
    "state": "Bikc6ZWjTRUWNhxJ"
}
3phase<--<-- 5 --- AccessToken -->-->
3requestop_args: {'state': 'Bikc6ZWjTRUWNhxJ'}, 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': 'a9iBl3oAScQmkYlQSHSktb3PJIW3cl', 'state': 'Bikc6ZWjTRUWNhxJ', 'grant_type': 'authorization_code', 'client_id': '0tHMLf12Urxl5WaLQOnz'}, 'state': 'Bikc6ZWjTRUWNhxJ', 'authn_method': 'private_key_jwt'}
3AccessTokenRequest
{
    "client_assertion": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiMHRITUxmMTJVcnhsNVdhTFFPbnoiLCAic3ViIjogIjB0SE1MZjEyVXJ4bDVXYUxRT256IiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICJnMEk1WGlOTUY5VzNDT2VUSkJSSU1MWHgzR3N4d0hDRyIsICJleHAiOiAxNTYwNzg2OTU4LCAiaWF0IjogMTU2MDc4NjM1OH0.Xrecb0gGsGzYPLSY2KOKVabjqq-H-EdHz3Ck9Lw1BsKiUJh1F4RzuENNSCu0UxrSAuQNmSGOz53m4od21EAUaij71vJBxPrElbIhP9ybpj-9uu3ln5ROHQYIJ5m0LH0tZU3jGGKmPaIT5fhaeddigS5kEN7sZ_Uf0KJgji9FqdNRnKpWV7rzEB453T2ZqNS64TRhg5jDOrncm8JYSTJo_5GhP7ApgGUl0Mzu7EyJ8CEHk2EI7F-ThK8dGIRxXPWbo4daZYCqJGTC6omKvlggXYwV9BjGCie8pt1uWguMYWWjKvkdSiMPjJBaLjNrV0-7nIA5ydjgu9d-Oq4UJNZU5A",
    "client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
    "code": "a9iBl3oAScQmkYlQSHSktb3PJIW3cl",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61583/authz_cb",
    "state": "Bikc6ZWjTRUWNhxJ"
}
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=a9iBl3oAScQmkYlQSHSktb3PJIW3cl&state=Bikc6ZWjTRUWNhxJ&client_assertion=eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiMHRITUxmMTJVcnhsNVdhTFFPbnoiLCAic3ViIjogIjB0SE1MZjEyVXJ4bDVXYUxRT256IiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICJnMEk1WGlOTUY5VzNDT2VUSkJSSU1MWHgzR3N4d0hDRyIsICJleHAiOiAxNTYwNzg2OTU4LCAiaWF0IjogMTU2MDc4NjM1OH0.Xrecb0gGsGzYPLSY2KOKVabjqq-H-EdHz3Ck9Lw1BsKiUJh1F4RzuENNSCu0UxrSAuQNmSGOz53m4od21EAUaij71vJBxPrElbIhP9ybpj-9uu3ln5ROHQYIJ5m0LH0tZU3jGGKmPaIT5fhaeddigS5kEN7sZ_Uf0KJgji9FqdNRnKpWV7rzEB453T2ZqNS64TRhg5jDOrncm8JYSTJo_5GhP7ApgGUl0Mzu7EyJ8CEHk2EI7F-ThK8dGIRxXPWbo4daZYCqJGTC6omKvlggXYwV9BjGCie8pt1uWguMYWWjKvkdSiMPjJBaLjNrV0-7nIA5ydjgu9d-Oq4UJNZU5A&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': 'Uny2FpRtZEhJFN0Yf1Bb', 'refresh_token': '8IJj1xGnYQ7N2KU1l0YJieigvNMOFvb5gCi3Wpe8', 'scope': 'openid', 'id_token': 'eyJhbGciOiJSU0EtT0FFUC0yNTYiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2Iiwia2lkIjoiZ3RINHYzWXIyUXFMcmVCU3owQnlRUTh2a2Y4ZUZvMUtJaXQzcy0zQmJ3dyIsImN0eSI6IkpXVCJ9.GCtyjqEg2QV_MCxP3MKXg8BKpxSCVTLMjzB-P36ZNIvhn0-I1bFcy8QZ1l7ALCpFp0g4_otMErSR3js3q_4OkWEDdBG50hf4e-DGA8bpB90ZecksgzuGSSiX-DwRVdEvf1ASBy-EHfCs-JyyUP6QfiWy-OnBS9A2raWGr7dbLwc28TaGFMmDO5jJj32Q7WFiPIHv_GIt3sPs2JcHgSLnd6cwO8ao7053_UjOfTFokMBzJApU2mz3x84uFKx3HQjdeZ6rTv1dvML79C8WLHZC5ba-Wg3e9CyH-tIMN2zDaQoAsY4bKTNO1q6VleOub3aIA65QUxVisqqnBJ9GM85Uiw.KVFLUtK2LhQ2898lue28ig.3698qBp4Gw3DwBKp5bg13w0dpE1B0BCxkvdaRecfniGg9fQ2WVdXhPcMAp1GQtX02Y5cDjyiWb6uqTiUc1I35huMahjkq0yw1zhpuuOYal2JMALj4X58Xg7hiQq2Rj3BjSpXHsor6HtQ2snjZC-J5bTVekSSgzgIhyf5_FN-xlHryawoMxPv4tDqbXzPtZpe1MFSnd4_p2iOVXcZLd6u-SKFBfVD9_zcmv8R0M2xf-ajW-drwZXtJfbETrHWDd02pWeJ-x1_MBq9dnBw1B3_WtL9ZXyIN5RTFB3t2iLPZoID50bHihftq9_1SKKRgfPeuHN-D9b3e9jw7z-qL7eRKIU3HKnK2C5GLy0bxHaBkNmwGeUiR4pt42ClaY_fSBSIdv4ymDZUiaTVKrmQY7hykPPQ_0lvpvHtHiXYmgDrFNL3Hbx9UFkvYtmYLx7Kl9PDtVFH2_1OPzGvIHTbGVmKfSj7cZ6ucp2PH-n9tN7PfY0OXPkd5lNOjLpWfsagtxxx--4WzTkN1ZKm9fppVUW_dsF91gdIniL7bkWzllH5ED99-Yf1ELXXCF5ksX_d7I97UfM__rPUe8yP1vXNMV2STdO_uoykV7I6Faz1fXt01szIsKg-5MbalWkGERcxNcTqic7Mph04LH8p3ef0N9lhpW6f-gEPw5zZ-ZB5E5v0WryFhm6ak4LXHytA62dGnNWuTCBuCugSp_xxeRoqELSRbo8dtoxp28pOJjjl62AQeS-7xFRc1xU3E-GgLXtMFNwORhS7NjrypuYFJN1HizVSTgUg5fQmcMNBfHagASsE7Kw9nbPFBzufUeVEVmcqdyeuqNGv73gdcoIR-GoGeOFwKqjpjXrcGsYyzocLjaFwj8KmnKn-7Hij6nxYbutcVpl6_IUr-xt6LELNbI9wdht11OeGlGMEYw4LKP5_LhcqzzorkbuBA6bv_2RY4F68p6fq7-m_fTURAkd1NBq1UpSH0Q.K6dBrw6CoOJoWWuHswgqog', 'token_type': 'bearer', 'expires_in': 3599}
4AccessTokenResponse
{
    "access_token": "Uny2FpRtZEhJFN0Yf1Bb",
    "expires_in": 3599,
    "id_token": {
        "at_hash": "YhHXJ1A4Er2AxbO5WysYVw",
        "aud": [
            "0tHMLf12Urxl5WaLQOnz"
        ],
        "exp": 1560789778,
        "iat": 1560786358,
        "iss": "https://isamfed.com:30443/test",
        "nonce": "CHjJTTe88RGDLBAq",
        "rt_hash": "FwIvHwX2Sf7XG815Ja3hHA",
        "sub": "testuser"
    },
    "refresh_token": "8IJj1xGnYQ7N2KU1l0YJieigvNMOFvb5gCi3Wpe8",
    "scope": "openid",
    "token_type": "bearer"
}
4jws header{'kid': '_uhPdeGrTWxobFeH0XbzjJpRrzp3CB9nknx1yFV1G-0', 'alg': 'RS256'}
4jwe header{'alg': 'RSA-OAEP-256', 'enc': 'A128CBC-HS256', 'kid': 'gtH4v3Yr2QqLreBSz0ByQQ8vkf8eFo1KIit3s-3Bbww', 'cty': 'JWT'}
4phase<--<-- 6 --- TimeDelay -->-->
34phase<--<-- 7 --- AccessToken -->-->
34requestop_args: {'state': 'Bikc6ZWjTRUWNhxJ'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61583/authz_cb'}
34do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61583/authz_cb', 'code': 'a9iBl3oAScQmkYlQSHSktb3PJIW3cl', 'state': 'Bikc6ZWjTRUWNhxJ', 'grant_type': 'authorization_code', 'client_id': '0tHMLf12Urxl5WaLQOnz'}, 'state': 'Bikc6ZWjTRUWNhxJ', 'authn_method': 'private_key_jwt'}
34AccessTokenRequest
{
    "client_assertion": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiMHRITUxmMTJVcnhsNVdhTFFPbnoiLCAic3ViIjogIjB0SE1MZjEyVXJ4bDVXYUxRT256IiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICJmeFRncHJ1bGRhR0VFWEpkTm14UEwwS3dLYVFjRDF1bSIsICJleHAiOiAxNTYwNzg2OTg5LCAiaWF0IjogMTU2MDc4NjM4OX0.e9_pMRL8FVUUyHuVFkvDjifsOasTQDyS8UwFDsT59daRJonC_9B0uvBj_p3cMPMg96VGNl1ij7iXu6muTQVj9eMyowQD74Gc9w4Df958zF7_MYPotevot3rd6wNahamzT7Nxmou8QzrDcMv6-XZc_yKLPHpgNezc2eFH_z1W4OtkKJ6tiCcx8oCCYhuXMKQyXWlyQlXoWH0DMh1My1cavYgVIllgdDH4YEsSlAeuq5fZd1SCtGBU-sO27S2Bb68pqKNoIQpc5sZajik4OaU8xaHxgDyZ-iOA6GUSQPfOEYluZH-iPxwcrUDmGafRjvvG29e-ONmmvxgw41MwFGeJRQ",
    "client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
    "code": "a9iBl3oAScQmkYlQSHSktb3PJIW3cl",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61583/authz_cb",
    "state": "Bikc6ZWjTRUWNhxJ"
}
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%3A61583%2Fauthz_cb&code=a9iBl3oAScQmkYlQSHSktb3PJIW3cl&state=Bikc6ZWjTRUWNhxJ&client_assertion=eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiMHRITUxmMTJVcnhsNVdhTFFPbnoiLCAic3ViIjogIjB0SE1MZjEyVXJ4bDVXYUxRT256IiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICJmeFRncHJ1bGRhR0VFWEpkTm14UEwwS3dLYVFjRDF1bSIsICJleHAiOiAxNTYwNzg2OTg5LCAiaWF0IjogMTU2MDc4NjM4OX0.e9_pMRL8FVUUyHuVFkvDjifsOasTQDyS8UwFDsT59daRJonC_9B0uvBj_p3cMPMg96VGNl1ij7iXu6muTQVj9eMyowQD74Gc9w4Df958zF7_MYPotevot3rd6wNahamzT7Nxmou8QzrDcMv6-XZc_yKLPHpgNezc2eFH_z1W4OtkKJ6tiCcx8oCCYhuXMKQyXWlyQlXoWH0DMh1My1cavYgVIllgdDH4YEsSlAeuq5fZd1SCtGBU-sO27S2Bb68pqKNoIQpc5sZajik4OaU8xaHxgDyZ-iOA6GUSQPfOEYluZH-iPxwcrUDmGafRjvvG29e-ONmmvxgw41MwFGeJRQ&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