Test Info

Test descriptionTrying to use authorization code twice should result in revoking previously issued access tokens
Profile[]
Test IDOP-OAuth-2nd-Revokes
Timestamp2017-12-18T21:09:08Z
Issuerhttps://oidctest.idautoengineering.net/idp

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

0.0phase<--<-- 0 --- Webfinger -->-->
0.0not expected to doWebFinger
0.0phase<--<-- 1 --- Discovery -->-->
0.0provider_config
kwargs:{'issuer': 'https://oidctest.idautoengineering.net/idp'}
0.026http response
url:https://oidctest.idautoengineering.net/idp/.well-known/openid-configuration status_code:200
0.027ProviderConfigurationResponse
{
    "authorization_endpoint": "https://oidctest.idautoengineering.net/idp/profile/oidc/auth",
    "claim_types_supported": [
        "normal"
    ],
    "claims_parameter_supported": false,
    "claims_supported": [
        "sub",
        "name",
        "given_name",
        "family_name",
        "email"
    ],
    "display_values_supported": [
        "page"
    ],
    "grant_types_supported": [
        "authorization_code"
    ],
    "id_token_signing_alg_values_supported": [
        "RS256"
    ],
    "issuer": "https://oidctest.idautoengineering.net/idp",
    "jwks_uri": "https://oidctest.idautoengineering.net/idp/profile/oidc/jwks",
    "request_parameter_supported": false,
    "request_uri_parameter_supported": true,
    "require_request_uri_registration": true,
    "response_modes_supported": [
        "query"
    ],
    "response_types_supported": [
        "code",
        "token",
        "id_token"
    ],
    "scopes_supported": [
        "openid"
    ],
    "subject_types_supported": [
        "public"
    ],
    "token_endpoint": "https://oidctest.idautoengineering.net/idp/profile/oidc/token",
    "token_endpoint_auth_methods_supported": [
        "client_secret_post",
        "client_secret_basic"
    ],
    "userinfo_endpoint": "https://oidctest.idautoengineering.net/idp/profile/oidc/userinfo",
    "userinfo_signing_alg_values_supported": [
        "RS256"
    ],
    "version": "3.0"
}
0.027phase<--<-- 2 --- Registration -->-->
0.027not expected to doDynamic registration
0.028phase<--<-- 3 --- Note -->-->
7.948phase<--<-- 4 --- AsyncAuthn -->-->
7.949AuthorizationRequest
{
    "client_id": "3000badf0c55d2cae7c22b3d63e3f667",
    "nonce": "uRG6eXMxB6L82Ch2",
    "redirect_uri": "https://op.certification.openid.net:60992/authz_cb",
    "response_type": "code",
    "scope": "openid",
    "state": "cRREk2LuxLIWCRzj"
}
7.949redirect urlhttps://oidctest.idautoengineering.net/idp/profile/oidc/auth?scope=openid&nonce=uRG6eXMxB6L82Ch2&state=cRREk2LuxLIWCRzj&response_type=code&client_id=3000badf0c55d2cae7c22b3d63e3f667&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A60992%2Fauthz_cb
7.949redirecthttps://oidctest.idautoengineering.net/idp/profile/oidc/auth?scope=openid&nonce=uRG6eXMxB6L82Ch2&state=cRREk2LuxLIWCRzj&response_type=code&client_id=3000badf0c55d2cae7c22b3d63e3f667&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A60992%2Fauthz_cb
8.229response{'code': 'DhfMq1EpEnS1161iX4G_II51sKq8YBNit0kYQWWTvbBCk4CmfC', 'state': 'cRREk2LuxLIWCRzj'}
8.23response{'code': 'DhfMq1EpEnS1161iX4G_II51sKq8YBNit0kYQWWTvbBCk4CmfC', 'state': 'cRREk2LuxLIWCRzj'}
8.23AuthorizationResponse
{
    "code": "DhfMq1EpEnS1161iX4G_II51sKq8YBNit0kYQWWTvbBCk4CmfC",
    "state": "cRREk2LuxLIWCRzj"
}
8.23phase<--<-- 5 --- AccessToken -->-->
8.23requestop_args: {'state': 'cRREk2LuxLIWCRzj'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:60992/authz_cb'}
8.23do_access_token_request
kwargs:{'request_args': {'code': 'DhfMq1EpEnS1161iX4G_II51sKq8YBNit0kYQWWTvbBCk4CmfC', 'state': 'cRREk2LuxLIWCRzj', 'grant_type': 'authorization_code', 'client_id': '3000badf0c55d2cae7c22b3d63e3f667', 'redirect_uri': 'https://op.certification.openid.net:60992/authz_cb'}, 'state': 'cRREk2LuxLIWCRzj'}
8.23AccessTokenRequest
{
    "client_id": "3000badf0c55d2cae7c22b3d63e3f667",
    "code": "DhfMq1EpEnS1161iX4G_II51sKq8YBNit0kYQWWTvbBCk4CmfC",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:60992/authz_cb",
    "state": "cRREk2LuxLIWCRzj"
}
8.23request_urlhttps://oidctest.idautoengineering.net/idp/profile/oidc/token
8.23request_http_args{'headers': {'Authorization': 'Basic MzAwMGJhZGYwYzU1ZDJjYWU3YzIyYjNkNjNlM2Y2Njc6ODY5N2E4OTlhYzFjNzYwODAyNmM4ZDEzN2E1YzMzYTAwM2RlMDA1MDc2MzBmMmQ2OGM5NTNlMTNkNzVlNjFiYg==', 'Content-Type': 'application/x-www-form-urlencoded'}}
8.23requestclient_id=3000badf0c55d2cae7c22b3d63e3f667&state=cRREk2LuxLIWCRzj&code=DhfMq1EpEnS1161iX4G_II51sKq8YBNit0kYQWWTvbBCk4CmfC&grant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A60992%2Fauthz_cb
8.269http response
url:https://oidctest.idautoengineering.net/idp/profile/oidc/token status_code:200
8.27response{'refresh_token': '0wR4HM9reTU_kYU22UGtbniLwIsL~u-y~rU7Ie3HCgKIuzEdo2', 'expires_in': 32399, 'scope': 'openid', 'access_token': 'vw.cd+Q.-bOWjkEerxzU2qtGjsbLBFFje6_nS_z0Q0l1nQHWMc', 'id_token': 'eyJraWQiOiI2NTJlNjk1N2UxNzNmYzYxOTYxN2ZhMjNjMzZjYmFjNTRhNWZhNzhlNjBiNzA2Mjg5NmI2ZDgzNTdkNDVhOWYxIiwiYWxnIjoiUlMyNTYifQ.eyJpYXQiOjE1MTM2MzEzNDgsImV4cCI6MTUxMzYzMTQwOCwiaXNzIjoiaHR0cHM6Ly9vaWRjdGVzdC5pZGF1dG9lbmdpbmVlcmluZy5uZXQvaWRwIiwiYXVkIjoiMzAwMGJhZGYwYzU1ZDJjYWU3YzIyYjNkNjNlM2Y2NjciLCJzdWIiOiIyNjIwMjdhMC1hZjc3LTExZTctODc2ZC0wMjc0MGM1NDljY2EiLCJhdXRoX3RpbWUiOjE1MTM2MzEyMTUsIm5vbmNlIjoidVJHNmVYTXhCNkw4MkNoMiIsImF6cCI6IjMwMDBiYWRmMGM1NWQyY2FlN2MyMmIzZDYzZTNmNjY3IiwibmFtZSI6IlN5c3RlbSBBZG1pbiIsImdpdmVuX25hbWUiOiJTeXN0ZW0iLCJmYW1pbHlfbmFtZSI6IkFkbWluIiwiZW1haWwiOiJqYmVsbGFzc2FpQGlkZW50aXR5YXV0b21hdGlvbi5jb20iLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiYXRfaGFzaCI6InEtdk5ETmRDem4wekxxTWw3WkhrT3c9PSJ9.OGAahTD186-zgLHaqLerTgui7VdK6I5GsJVZJyRZ_1ETDBNzTVJ5YK3Ekg85IPlc7wFdMnmgQuEsLWcEHg3Yg3kvB1vJZis2t0MdIV_CYK21DJdoxKoJOiHhAZEB0qyqHkQpgJjINJNhT7l91VZP7J-mlrV8PtCtq6OvSsrpwbINoMAQF_c0erYd9SbTfWzJKYSqYpFjzFtYrnO8wvKu7Idk3PFUFZHTvl7uVW8-fwAZ57N1LYpxCD32A2HJ27xC_qjxh1HSR_6gthiGmj70SG3dSF5MoWICW3joSdGy91d_Jwl5I7J76q2ichEi7nQ0GzeYg2lz3Jgj0tCNJYCgAw', 'token_type': 'Bearer'}
8.297AccessTokenResponse
{
    "access_token": "vw.cd+Q.-bOWjkEerxzU2qtGjsbLBFFje6_nS_z0Q0l1nQHWMc",
    "expires_in": 32399,
    "id_token": {
        "at_hash": "q-vNDNdCzn0zLqMl7ZHkOw==",
        "aud": [
            "3000badf0c55d2cae7c22b3d63e3f667"
        ],
        "auth_time": 1513631215,
        "azp": "3000badf0c55d2cae7c22b3d63e3f667",
        "email": "jbellassai@identityautomation.com",
        "email_verified": true,
        "exp": 1513631408,
        "family_name": "Admin",
        "given_name": "System",
        "iat": 1513631348,
        "iss": "https://oidctest.idautoengineering.net/idp",
        "name": "System Admin",
        "nonce": "uRG6eXMxB6L82Ch2",
        "sub": "262027a0-af77-11e7-876d-02740c549cca"
    },
    "refresh_token": "0wR4HM9reTU_kYU22UGtbniLwIsL~u-y~rU7Ie3HCgKIuzEdo2",
    "scope": "openid",
    "token_type": "Bearer"
}
8.297phase<--<-- 6 --- AccessToken -->-->
8.297requestop_args: {'state': 'cRREk2LuxLIWCRzj'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:60992/authz_cb'}
8.297do_access_token_request
kwargs:{'request_args': {'code': 'DhfMq1EpEnS1161iX4G_II51sKq8YBNit0kYQWWTvbBCk4CmfC', 'state': 'cRREk2LuxLIWCRzj', 'grant_type': 'authorization_code', 'client_id': '3000badf0c55d2cae7c22b3d63e3f667', 'redirect_uri': 'https://op.certification.openid.net:60992/authz_cb'}, 'state': 'cRREk2LuxLIWCRzj'}
8.297AccessTokenRequest
{
    "client_id": "3000badf0c55d2cae7c22b3d63e3f667",
    "code": "DhfMq1EpEnS1161iX4G_II51sKq8YBNit0kYQWWTvbBCk4CmfC",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:60992/authz_cb",
    "state": "cRREk2LuxLIWCRzj"
}
8.297request_urlhttps://oidctest.idautoengineering.net/idp/profile/oidc/token
8.297request_http_args{'headers': {'Authorization': 'Basic MzAwMGJhZGYwYzU1ZDJjYWU3YzIyYjNkNjNlM2Y2Njc6ODY5N2E4OTlhYzFjNzYwODAyNmM4ZDEzN2E1YzMzYTAwM2RlMDA1MDc2MzBmMmQ2OGM5NTNlMTNkNzVlNjFiYg==', 'Content-Type': 'application/x-www-form-urlencoded'}}
8.297requestclient_id=3000badf0c55d2cae7c22b3d63e3f667&state=cRREk2LuxLIWCRzj&code=DhfMq1EpEnS1161iX4G_II51sKq8YBNit0kYQWWTvbBCk4CmfC&grant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A60992%2Fauthz_cb
8.326http response
url:https://oidctest.idautoengineering.net/idp/profile/oidc/token status_code:400 message:{
  "error" : "invalid_grant",
  "error_description" : "The authorization code is not valid"
}
8.326response{'error_description': 'The authorization code is not valid', 'error': 'invalid_grant'}
8.326eventGot expected error
8.326TokenErrorResponse
{
    "error": "invalid_grant",
    "error_description": "The authorization code is not valid"
}
8.326phase<--<-- 7 --- UserInfo -->-->
8.326do_user_info_request
kwargs:{'method': 'GET', 'authn_method': 'bearer_header', 'state': 'cRREk2LuxLIWCRzj'}
8.327request{'body': None}
8.327request_urlhttps://oidctest.idautoengineering.net/idp/profile/oidc/userinfo
8.327request_http_args{'headers': {'Authorization': 'Bearer vw.cd+Q.-bOWjkEerxzU2qtGjsbLBFFje6_nS_z0Q0l1nQHWMc'}}
8.351http response
url:https://oidctest.idautoengineering.net/idp/profile/oidc/userinfo status_code:401 message:{
  "error" : "invalid_token",
  "error_description" : "Invalid access token"
}
8.352eventGot expected error
8.352ErrorResponse
{
    "error": "invalid_token",
    "error_description": "Invalid access token"
}
8.352ErrorResponse
{
    "error": "invalid_token",
    "error_description": "Invalid access token"
}
8.352phase<--<-- 8 --- Done -->-->
8.352end
8.353assertionVerifyResponse
8.353conditionverify-response: status=OK [Checks that the last response was one of a possible set of OpenID Connect Responses]
8.353conditionDone: status=OK

Result

PASSED