Test Info

Issuerhttps://isamfed.com:30443/test
Profile[]
Test IDOP-OAuth-2nd-Revokes
Test descriptionTrying to use authorization code twice should result in revoking previously issued access tokens
Timestamp2019-06-17T06:42:01Z

Conditions


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'], 'grant_types': ['authorization_code'], 'application_name': 'OIC test tool', 'application_type': 'web', 'redirect_uris': ['https://op.certification.openid.net:61164/authz_cb'], 'contacts': ['roland@example.com'], 'post_logout_redirect_uris': ['https://op.certification.openid.net:61164/logout'], 'url': 'https://isamfed.com:30443/mga/sps/oauth/oauth20/register/OIDCDefinition', 'jwks_uri': 'https://op.certification.openid.net:61164/static/jwks_61164.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:61164/static/jwks_61164.json",
    "post_logout_redirect_uris": [
        "https://op.certification.openid.net:61164/logout"
    ],
    "redirect_uris": [
        "https://op.certification.openid.net:61164/authz_cb"
    ],
    "response_types": [
        "code"
    ],
    "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": "fDRvi5FCE5uRqtOkehFL",
    "client_id_issued_at": 1560753717,
    "client_secret": "mCMUkMJlL72hnzoG3cgG",
    "client_secret_expires_at": 0,
    "contacts": [
        "roland@example.com"
    ],
    "grant_types": [
        "authorization_code"
    ],
    "jwks_uri": "https://op.certification.openid.net:61164/static/jwks_61164.json",
    "post_logout_redirect_uris": [
        "https://op.certification.openid.net:61164/logout"
    ],
    "redirect_uris": [
        "https://op.certification.openid.net:61164/authz_cb"
    ],
    "registration_access_token": "YQnLVCOSl3DzZbzLQ4Ke",
    "registration_client_uri": "https://isamfed.com:30443/mga/sps/oauth/oauth20/register/OIDCDefinition?client_id=fDRvi5FCE5uRqtOkehFL",
    "response_types": [
        "code"
    ],
    "token_endpoint_auth_method": "private_key_jwt"
}
1phase<--<-- 3 --- Note -->-->
1phase<--<-- 4 --- AsyncAuthn -->-->
1AuthorizationRequest
{
    "client_id": "fDRvi5FCE5uRqtOkehFL",
    "nonce": "6tMdeNi2Xe40r9Xf",
    "redirect_uri": "https://op.certification.openid.net:61164/authz_cb",
    "response_type": "code",
    "scope": "openid",
    "state": "JG9IMo9LqT9wsCMH"
}
1redirect urlhttps://isamfed.com:30443/mga/sps/oauth/oauth20/authorize?state=JG9IMo9LqT9wsCMH&nonce=6tMdeNi2Xe40r9Xf&response_type=code&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61164%2Fauthz_cb&client_id=fDRvi5FCE5uRqtOkehFL
1redirecthttps://isamfed.com:30443/mga/sps/oauth/oauth20/authorize?state=JG9IMo9LqT9wsCMH&nonce=6tMdeNi2Xe40r9Xf&response_type=code&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61164%2Fauthz_cb&client_id=fDRvi5FCE5uRqtOkehFL
2responseResponse URL with query part
2response{'state': 'JG9IMo9LqT9wsCMH', 'code': 'zOsvr24assuuXjtDJIjdyfPWRRm9VK'}
2response{'state': 'JG9IMo9LqT9wsCMH', 'code': 'zOsvr24assuuXjtDJIjdyfPWRRm9VK'}
2AuthorizationResponse
{
    "code": "zOsvr24assuuXjtDJIjdyfPWRRm9VK",
    "state": "JG9IMo9LqT9wsCMH"
}
2phase<--<-- 5 --- AccessToken -->-->
2requestop_args: {'state': 'JG9IMo9LqT9wsCMH'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61164/authz_cb'}
2do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61164/authz_cb', 'code': 'zOsvr24assuuXjtDJIjdyfPWRRm9VK', 'state': 'JG9IMo9LqT9wsCMH', 'grant_type': 'authorization_code', 'client_id': 'fDRvi5FCE5uRqtOkehFL'}, 'state': 'JG9IMo9LqT9wsCMH', 'authn_method': 'private_key_jwt'}
2AccessTokenRequest
{
    "client_assertion": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiZkRSdmk1RkNFNXVScXRPa2VoRkwiLCAic3ViIjogImZEUnZpNUZDRTV1UnF0T2tlaEZMIiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICJhUnVEbXNVcEFYTXZlSTNEcXA3Qk9tZHliSU0wRTZoaCIsICJleHAiOiAxNTYwNzU0MzE5LCAiaWF0IjogMTU2MDc1MzcxOX0.jchQbQdG4VCiAceA7juD6vi36xRkKVhz_SauydqMWXWPcDic1VUDCxGcgY9Ras4aMt8Sl5PdYfPm_gDrHWj_YjaSXpXXpH_QkgM-6nPbOY1CeE0CMsTZV1dGyxXVq5QHiasutGoabccYpuMZAjS94bJdrtw5bp0GE-ZeWBYKjn_dNis8kwjlEUyes2oJMYKCc27oAt3q7pHtLgtSvcvEFUt6nQeMyX3x3NOTLpZYvtmaHeeIxRaQLOxunbqJ7XYvB7a1SexTwsdtNuh2XHuEKLHXZgZn07ieDaSTeC9MbqcWqIlYRbPS9DuAt92Bk2AihnlMaYeji2RfgPfbrHL7cQ",
    "client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
    "code": "zOsvr24assuuXjtDJIjdyfPWRRm9VK",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61164/authz_cb",
    "state": "JG9IMo9LqT9wsCMH"
}
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%3A61164%2Fauthz_cb&code=zOsvr24assuuXjtDJIjdyfPWRRm9VK&state=JG9IMo9LqT9wsCMH&client_assertion=eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiZkRSdmk1RkNFNXVScXRPa2VoRkwiLCAic3ViIjogImZEUnZpNUZDRTV1UnF0T2tlaEZMIiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICJhUnVEbXNVcEFYTXZlSTNEcXA3Qk9tZHliSU0wRTZoaCIsICJleHAiOiAxNTYwNzU0MzE5LCAiaWF0IjogMTU2MDc1MzcxOX0.jchQbQdG4VCiAceA7juD6vi36xRkKVhz_SauydqMWXWPcDic1VUDCxGcgY9Ras4aMt8Sl5PdYfPm_gDrHWj_YjaSXpXXpH_QkgM-6nPbOY1CeE0CMsTZV1dGyxXVq5QHiasutGoabccYpuMZAjS94bJdrtw5bp0GE-ZeWBYKjn_dNis8kwjlEUyes2oJMYKCc27oAt3q7pHtLgtSvcvEFUt6nQeMyX3x3NOTLpZYvtmaHeeIxRaQLOxunbqJ7XYvB7a1SexTwsdtNuh2XHuEKLHXZgZn07ieDaSTeC9MbqcWqIlYRbPS9DuAt92Bk2AihnlMaYeji2RfgPfbrHL7cQ&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': 'Drjs1Skqak625NAo9ZLz', 'refresh_token': 'K6D4zyhF4rgRVcHDRzRdRB7L1ewnZWJorL1YfPQ7', 'scope': 'openid', 'id_token': 'eyJraWQiOiJfdWhQZGVHclRXeG9iRmVIMFhiempKcFJyenAzQ0I5bmtueDF5RlYxRy0wIiwiYWxnIjoiUlMyNTYifQ.eyJydF9oYXNoIjoiT2pCdlVzNndBMTJvVy1hRVFscXBzdyIsIm5vbmNlIjoiNnRNZGVOaTJYZTQwcjlYZiIsImlhdCI6MTU2MDc1MzcyMCwiaXNzIjoiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My90ZXN0IiwiYXRfaGFzaCI6ImFRSFN2WExLd2l1WmpndnpIWUxKR0EiLCJzdWIiOiJ0ZXN0dXNlciIsImV4cCI6MTU2MDc1NzE0MCwiYXVkIjoiZkRSdmk1RkNFNXVScXRPa2VoRkwifQ.C_GpNzHSfRkTs6p2STfJyZukTcm9ddHIqAlKeicp0mv1Lk9eiQ-ja5q1QaaeXmpSZI0AwoKg7s63DzvlnZ6Qcswiir2mWMvmxR4oa6x7oE486xy3um_abZlfw1SCG75djOWozfcZAjngZDxnlPgBAHPrlqfXnqYjl3IO2D27B-0HjmApa7gIHiJta2Yl7MkQF8YeNNstBqzHSiJZwwJcYcKRZmnFWRq2Xqa1vG3txNsTNhml1FkPlB_x1S67TI8rqJ9xAV8sL3BYwi_dROukOKqyFZcejLi5JP4dRGQzaIPLM6Jc0VQiCMkdTv5GcBUm3ucEfcmpWpHkIRiD350iMQ', 'token_type': 'bearer', 'expires_in': 3599}
3AccessTokenResponse
{
    "access_token": "Drjs1Skqak625NAo9ZLz",
    "expires_in": 3599,
    "id_token": {
        "at_hash": "aQHSvXLKwiuZjgvzHYLJGA",
        "aud": [
            "fDRvi5FCE5uRqtOkehFL"
        ],
        "exp": 1560757140,
        "iat": 1560753720,
        "iss": "https://isamfed.com:30443/test",
        "nonce": "6tMdeNi2Xe40r9Xf",
        "rt_hash": "OjBvUs6wA12oW-aEQlqpsw",
        "sub": "testuser"
    },
    "refresh_token": "K6D4zyhF4rgRVcHDRzRdRB7L1ewnZWJorL1YfPQ7",
    "scope": "openid",
    "token_type": "bearer"
}
3jws header{'kid': '_uhPdeGrTWxobFeH0XbzjJpRrzp3CB9nknx1yFV1G-0', 'alg': 'RS256'}
3phase<--<-- 6 --- AccessToken -->-->
3requestop_args: {'state': 'JG9IMo9LqT9wsCMH'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61164/authz_cb'}
3do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61164/authz_cb', 'code': 'zOsvr24assuuXjtDJIjdyfPWRRm9VK', 'state': 'JG9IMo9LqT9wsCMH', 'grant_type': 'authorization_code', 'client_id': 'fDRvi5FCE5uRqtOkehFL'}, 'state': 'JG9IMo9LqT9wsCMH', 'authn_method': 'private_key_jwt'}
3AccessTokenRequest
{
    "client_assertion": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiZkRSdmk1RkNFNXVScXRPa2VoRkwiLCAic3ViIjogImZEUnZpNUZDRTV1UnF0T2tlaEZMIiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICJyRGZ1NEMxUEhadFo3M2JlRUZBVWp3RFlFSHNuUExGTyIsICJleHAiOiAxNTYwNzU0MzIwLCAiaWF0IjogMTU2MDc1MzcyMH0.0sACHKZBXALcdFZ16l8xS2J3YsBWz25lvJQSLym8ZdLwdx5k5cq4NoXMCF8W9keG9aP1NxLkHOWZLnN4Dy_AsMzkoCw9Lc0mxvYDNxjiaqFZp3sKqAdO0xsLjjlsq-PZjibPrio1dhW-NjLUgm4RgJMhvXyPXosuH8uC5hYqvwPqYSZfkZJeecpbsZXo2ZeK_mB2jaIHSpy04HCOzRoq9ZXho8bG6TY1NfZhfFcBem3OseFWg4_D3KuwRub6YGJoByAv9OEXis4HLk6p2S6fNhf8mqG21YO49bSKnZbf1S4n3LqgRyfiV7M_cw94l6OoVnxjvsIqcDMFGoa4WEAdYg",
    "client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
    "code": "zOsvr24assuuXjtDJIjdyfPWRRm9VK",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61164/authz_cb",
    "state": "JG9IMo9LqT9wsCMH"
}
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%3A61164%2Fauthz_cb&code=zOsvr24assuuXjtDJIjdyfPWRRm9VK&state=JG9IMo9LqT9wsCMH&client_assertion=eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiZkRSdmk1RkNFNXVScXRPa2VoRkwiLCAic3ViIjogImZEUnZpNUZDRTV1UnF0T2tlaEZMIiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICJyRGZ1NEMxUEhadFo3M2JlRUZBVWp3RFlFSHNuUExGTyIsICJleHAiOiAxNTYwNzU0MzIwLCAiaWF0IjogMTU2MDc1MzcyMH0.0sACHKZBXALcdFZ16l8xS2J3YsBWz25lvJQSLym8ZdLwdx5k5cq4NoXMCF8W9keG9aP1NxLkHOWZLnN4Dy_AsMzkoCw9Lc0mxvYDNxjiaqFZp3sKqAdO0xsLjjlsq-PZjibPrio1dhW-NjLUgm4RgJMhvXyPXosuH8uC5hYqvwPqYSZfkZJeecpbsZXo2ZeK_mB2jaIHSpy04HCOzRoq9ZXho8bG6TY1NfZhfFcBem3OseFWg4_D3KuwRub6YGJoByAv9OEXis4HLk6p2S6fNhf8mqG21YO49bSKnZbf1S4n3LqgRyfiV7M_cw94l6OoVnxjvsIqcDMFGoa4WEAdYg&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 --- UserInfo -->-->
3do_user_info_request
kwargs:{'state': 'JG9IMo9LqT9wsCMH', 'method': 'GET', 'authn_method': 'bearer_header'}
3request{'body': None}
3request_urlhttps://isamfed.com:30443/mga/sps/oauth/oauth20/userinfo
3request_http_args{'headers': {'Authorization': 'Bearer Drjs1Skqak625NAo9ZLz'}}
4http response
url:https://isamfed.com:30443/mga/sps/oauth/oauth20/userinfo status_code:401 message:{"error_description":"FBTOAU211E The [access_token] received of type [bearer] does not exist.","error":"invalid_token"}
4eventGot expected error
4ErrorResponse
{
    "error": "invalid_token",
    "error_description": "Server returned 401 Unauthorized without a WWW-Authenticate header which is required as per https://tools.ietf.org/html/rfc6750#section-3"
}
4ErrorResponse
{
    "error": "invalid_token",
    "error_description": "Server returned 401 Unauthorized without a WWW-Authenticate header which is required as per https://tools.ietf.org/html/rfc6750#section-3"
}
4phase<--<-- 8 --- Done -->-->
4end
4assertionVerifyResponse
4conditionverify-response: status=OK [Checks that the last response was one of a possible set of OpenID Connect Responses]
4conditionDone: status=OK

Result

PASSED