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-17T08:25:12Z

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'}
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<--<-- 2 --- Registration -->-->
1not expected to doDynamic registration
1phase<--<-- 3 --- Note -->-->
1phase<--<-- 4 --- AsyncAuthn -->-->
1AuthorizationRequest
{
    "client_id": "clientID",
    "nonce": "BQLYYpHtI0j7FoYt",
    "redirect_uri": "https://op.certification.openid.net:61578/authz_cb",
    "response_type": "code id_token token",
    "scope": "openid",
    "state": "Wl09YRT8gpZUsdmK"
}
1redirect urlhttps://isamfed.com:30443/mga/sps/oauth/oauth20/authorize?state=Wl09YRT8gpZUsdmK&nonce=BQLYYpHtI0j7FoYt&response_type=code+id_token+token&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61578%2Fauthz_cb&client_id=clientID
1redirecthttps://isamfed.com:30443/mga/sps/oauth/oauth20/authorize?state=Wl09YRT8gpZUsdmK&nonce=BQLYYpHtI0j7FoYt&response_type=code+id_token+token&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61578%2Fauthz_cb&client_id=clientID
3http args{}
3responseURL with fragment
3responseaccess_token=QlA8ZFA3ZQk9OqXKqSKx&state=Wl09YRT8gpZUsdmK&expires_in=3599&token_type=bearer&code=DG75yCbQ2AF8sg7FFZ2whPnd6Dxgsu&scope=openid&id_token=eyJraWQiOiJfdWhQZGVHclRXeG9iRmVIMFhiempKcFJyenAzQ0I5bmtueDF5RlYxRy0wIiwiYWxnIjoiUlMyNTYifQ.eyJub25jZSI6IkJRTFlZcEh0STBqN0ZvWXQiLCJpYXQiOjE1NjA3NTk5MTAsImlzcyI6Imh0dHBzOi8vaXNhbWZlZC5jb206MzA0NDMvdGVzdCIsImF0X2hhc2giOiJRcWw4TzJJNk1ac0plRHJYVERIVHd3Iiwic3ViIjoidGVzdHVzZXIiLCJleHAiOjE1NjA3NjMzMzAsImNfaGFzaCI6IldJbThQYUFJR1dNME01cTZBUTVEcFEiLCJhdWQiOiJjbGllbnRJRCJ9.o-U1xoQsPzzXV9E1ZanBj4iZJNOG0mAPauYyQvEZNWKhlm4fQ3Vh7aknNkeXyeJUnDt2RFYsTiHDO0vaGYXquA1P74eJBimOB6WLbbMaudBqZ5-XkldQ_KEsAraTlmYW8I6t8ldDrkDRP-v6K0lvOg_M0MFlSvgeBULKbHPuY-akCcS3aFLfayE3qSEGqMuyXEo9Bf-meIxa2-cPF8lflblOABtDOYH0tQNtlBmkEB98q_sTGUSrYSClLZ0taZ2tEDt5IvRiF0G2XeP27l2mQ_9JLcTAMjgWD-EvK4OyNYK02PLjWwtHp5eEKmnvTRyy270X-L3uPtieXtPWVX3MQw
3response{'access_token': 'QlA8ZFA3ZQk9OqXKqSKx', 'state': 'Wl09YRT8gpZUsdmK', 'expires_in': 3599, 'token_type': 'bearer', 'code': 'DG75yCbQ2AF8sg7FFZ2whPnd6Dxgsu', 'scope': 'openid', 'id_token': 'eyJraWQiOiJfdWhQZGVHclRXeG9iRmVIMFhiempKcFJyenAzQ0I5bmtueDF5RlYxRy0wIiwiYWxnIjoiUlMyNTYifQ.eyJub25jZSI6IkJRTFlZcEh0STBqN0ZvWXQiLCJpYXQiOjE1NjA3NTk5MTAsImlzcyI6Imh0dHBzOi8vaXNhbWZlZC5jb206MzA0NDMvdGVzdCIsImF0X2hhc2giOiJRcWw4TzJJNk1ac0plRHJYVERIVHd3Iiwic3ViIjoidGVzdHVzZXIiLCJleHAiOjE1NjA3NjMzMzAsImNfaGFzaCI6IldJbThQYUFJR1dNME01cTZBUTVEcFEiLCJhdWQiOiJjbGllbnRJRCJ9.o-U1xoQsPzzXV9E1ZanBj4iZJNOG0mAPauYyQvEZNWKhlm4fQ3Vh7aknNkeXyeJUnDt2RFYsTiHDO0vaGYXquA1P74eJBimOB6WLbbMaudBqZ5-XkldQ_KEsAraTlmYW8I6t8ldDrkDRP-v6K0lvOg_M0MFlSvgeBULKbHPuY-akCcS3aFLfayE3qSEGqMuyXEo9Bf-meIxa2-cPF8lflblOABtDOYH0tQNtlBmkEB98q_sTGUSrYSClLZ0taZ2tEDt5IvRiF0G2XeP27l2mQ_9JLcTAMjgWD-EvK4OyNYK02PLjWwtHp5eEKmnvTRyy270X-L3uPtieXtPWVX3MQw'}
3AuthorizationResponse
{
    "access_token": "QlA8ZFA3ZQk9OqXKqSKx",
    "code": "DG75yCbQ2AF8sg7FFZ2whPnd6Dxgsu",
    "expires_in": 3599,
    "id_token": {
        "at_hash": "Qql8O2I6MZsJeDrXTDHTww",
        "aud": [
            "clientID"
        ],
        "c_hash": "WIm8PaAIGWM0M5q6AQ5DpQ",
        "exp": 1560763330,
        "iat": 1560759910,
        "iss": "https://isamfed.com:30443/test",
        "nonce": "BQLYYpHtI0j7FoYt",
        "sub": "testuser"
    },
    "scope": "openid",
    "state": "Wl09YRT8gpZUsdmK",
    "token_type": "bearer"
}
3phase<--<-- 5 --- AccessToken -->-->
3requestop_args: {'state': 'Wl09YRT8gpZUsdmK'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61578/authz_cb'}
3do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61578/authz_cb', 'code': 'DG75yCbQ2AF8sg7FFZ2whPnd6Dxgsu', 'state': 'Wl09YRT8gpZUsdmK', 'grant_type': 'authorization_code', 'client_id': 'clientID'}, 'state': 'Wl09YRT8gpZUsdmK', 'authn_method': 'client_secret_basic'}
3AccessTokenRequest
{
    "code": "DG75yCbQ2AF8sg7FFZ2whPnd6Dxgsu",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61578/authz_cb",
    "state": "Wl09YRT8gpZUsdmK"
}
3request_urlhttps://isamfed.com:30443/mga/sps/oauth/oauth20/token
3request_http_args{'headers': {'Authorization': 'Basic Y2xpZW50SUQ6Y2xpZW50U2VjcmV0', 'Content-Type': 'application/x-www-form-urlencoded'}}
3requestgrant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61578%2Fauthz_cb&code=DG75yCbQ2AF8sg7FFZ2whPnd6Dxgsu&state=Wl09YRT8gpZUsdmK
4http response
url:https://isamfed.com:30443/mga/sps/oauth/oauth20/token status_code:200
4response{'access_token': 'Q9V4CbQBvDH5Gm95W986', 'refresh_token': 'H3hvadJyS1jCMHp35Y7k6jSDRNBXrgTsCMbE0ab1', 'scope': 'openid', 'id_token': 'eyJraWQiOiJfdWhQZGVHclRXeG9iRmVIMFhiempKcFJyenAzQ0I5bmtueDF5RlYxRy0wIiwiYWxnIjoiUlMyNTYifQ.eyJydF9oYXNoIjoiNXRnQnVPSGFKdUY2MnEyd2xVWS0xZyIsIm5vbmNlIjoiQlFMWVlwSHRJMGo3Rm9ZdCIsImlhdCI6MTU2MDc1OTkxMSwiaXNzIjoiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My90ZXN0IiwiYXRfaGFzaCI6Il9EVUxqNnktTEVZcG5MSWtNVUQ2dlEiLCJzdWIiOiJ0ZXN0dXNlciIsImV4cCI6MTU2MDc2MzMzMSwiYXVkIjoiY2xpZW50SUQifQ.p8sW2RUpYtBTs0bVSlKeeQFIprwXj5XhHLrUDsqVnsGuXnlysDTdEm__j7axr-xs1xYJtyWPPXKyYRD_CHj-Sin9srTgXRtvtP8yqdE5BNTT4L4B2E6NLpJpQrqk6wiOXxLzQyk_txGO7QPCO6o1mr8SzhxZlzid624OZ-Jl7s3Rhz83YeDUcBpSxttnWejN_zTFqP6mykDgi8zs7rYqzTLOX9k9_TjYBG4lDAKbXIOZK4sBQ_QdCNwrh2B0VQ8FoTTSQD4tZQ2jOjENWIU-tXmofYeYXgDIOzH768SkjoydWIPv8rXuMTNKT1CyUeznJPWrE2OUH_x0tVpCTOye2w', 'token_type': 'bearer', 'expires_in': 3599}
4AccessTokenResponse
{
    "access_token": "Q9V4CbQBvDH5Gm95W986",
    "expires_in": 3599,
    "id_token": {
        "at_hash": "_DULj6y-LEYpnLIkMUD6vQ",
        "aud": [
            "clientID"
        ],
        "exp": 1560763331,
        "iat": 1560759911,
        "iss": "https://isamfed.com:30443/test",
        "nonce": "BQLYYpHtI0j7FoYt",
        "rt_hash": "5tgBuOHaJuF62q2wlUY-1g",
        "sub": "testuser"
    },
    "refresh_token": "H3hvadJyS1jCMHp35Y7k6jSDRNBXrgTsCMbE0ab1",
    "scope": "openid",
    "token_type": "bearer"
}
4jws header{'kid': '_uhPdeGrTWxobFeH0XbzjJpRrzp3CB9nknx1yFV1G-0', 'alg': 'RS256'}
4phase<--<-- 6 --- AccessToken -->-->
4requestop_args: {'state': 'Wl09YRT8gpZUsdmK'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61578/authz_cb'}
4do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61578/authz_cb', 'code': 'DG75yCbQ2AF8sg7FFZ2whPnd6Dxgsu', 'state': 'Wl09YRT8gpZUsdmK', 'grant_type': 'authorization_code', 'client_id': 'clientID'}, 'state': 'Wl09YRT8gpZUsdmK', 'authn_method': 'client_secret_basic'}
4AccessTokenRequest
{
    "code": "DG75yCbQ2AF8sg7FFZ2whPnd6Dxgsu",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61578/authz_cb",
    "state": "Wl09YRT8gpZUsdmK"
}
4request_urlhttps://isamfed.com:30443/mga/sps/oauth/oauth20/token
4request_http_args{'headers': {'Authorization': 'Basic Y2xpZW50SUQ6Y2xpZW50U2VjcmV0', 'Content-Type': 'application/x-www-form-urlencoded'}}
4requestgrant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61578%2Fauthz_cb&code=DG75yCbQ2AF8sg7FFZ2whPnd6Dxgsu&state=Wl09YRT8gpZUsdmK
4http 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"}
4response{'error_description': 'FBTOAU211E The [authorization_grant] received of type [authorization_code] does not exist.', 'error': 'invalid_grant'}
4eventGot expected error
4TokenErrorResponse
{
    "error": "invalid_grant",
    "error_description": "FBTOAU211E The [authorization_grant] received of type [authorization_code] does not exist."
}
4phase<--<-- 7 --- UserInfo -->-->
4do_user_info_request
kwargs:{'state': 'Wl09YRT8gpZUsdmK', 'method': 'GET', 'authn_method': 'bearer_header'}
4request{'body': None}
4request_urlhttps://isamfed.com:30443/mga/sps/oauth/oauth20/userinfo
4request_http_args{'headers': {'Authorization': 'Bearer Q9V4CbQBvDH5Gm95W986'}}
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