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-18T04:23:45Z

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_encryption_alg_values_supported": [
        "A128KW"
    ],
    "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"
}
0phase<--<-- 2 --- Registration -->-->
0not expected to doDynamic registration
0phase<--<-- 3 --- Note -->-->
0phase<--<-- 4 --- AsyncAuthn -->-->
0AuthorizationRequest
{
    "client_id": "clientID",
    "nonce": "UQgXEUYKHBIYCT4L",
    "redirect_uri": "https://op.certification.openid.net:61771/authz_cb",
    "response_type": "code token",
    "scope": "openid",
    "state": "meKUd4GhQime8e5s"
}
0redirect urlhttps://isamfed.com:30443/mga/sps/oauth/oauth20/authorize?state=meKUd4GhQime8e5s&nonce=UQgXEUYKHBIYCT4L&response_type=code+token&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61771%2Fauthz_cb&client_id=clientID
0redirecthttps://isamfed.com:30443/mga/sps/oauth/oauth20/authorize?state=meKUd4GhQime8e5s&nonce=UQgXEUYKHBIYCT4L&response_type=code+token&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61771%2Fauthz_cb&client_id=clientID
1http args{}
2responseURL with fragment
2responseaccess_token=PBD6tKv37Hc4n2dISDAF&state=meKUd4GhQime8e5s&expires_in=3599&token_type=bearer&code=UixqYgKAzjOphGhBb9n58nYvEMcY76&scope=openid
2response{'access_token': 'PBD6tKv37Hc4n2dISDAF', 'state': 'meKUd4GhQime8e5s', 'expires_in': 3599, 'token_type': 'bearer', 'code': 'UixqYgKAzjOphGhBb9n58nYvEMcY76', 'scope': 'openid'}
2AuthorizationResponse
{
    "access_token": "PBD6tKv37Hc4n2dISDAF",
    "code": "UixqYgKAzjOphGhBb9n58nYvEMcY76",
    "expires_in": 3599,
    "scope": "openid",
    "state": "meKUd4GhQime8e5s",
    "token_type": "bearer"
}
2phase<--<-- 5 --- AccessToken -->-->
2requestop_args: {'state': 'meKUd4GhQime8e5s'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61771/authz_cb'}
2do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61771/authz_cb', 'code': 'UixqYgKAzjOphGhBb9n58nYvEMcY76', 'state': 'meKUd4GhQime8e5s', 'grant_type': 'authorization_code', 'client_id': 'clientID'}, 'state': 'meKUd4GhQime8e5s', 'authn_method': 'client_secret_basic'}
2AccessTokenRequest
{
    "code": "UixqYgKAzjOphGhBb9n58nYvEMcY76",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61771/authz_cb",
    "state": "meKUd4GhQime8e5s"
}
2request_urlhttps://isamfed.com:30443/mga/sps/oauth/oauth20/token
2request_http_args{'headers': {'Authorization': 'Basic Y2xpZW50SUQ6Y2xpZW50U2VjcmV0', 'Content-Type': 'application/x-www-form-urlencoded'}}
2requestgrant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61771%2Fauthz_cb&code=UixqYgKAzjOphGhBb9n58nYvEMcY76&state=meKUd4GhQime8e5s
2http response
url:https://isamfed.com:30443/mga/sps/oauth/oauth20/token status_code:200
2response{'access_token': 'SQP699YmxNYuWZVgd6tw', 'refresh_token': 'i0MmWi3BhJNEvgsWQPd12k4eEyqHEl0ypHti6m43', 'scope': 'openid', 'id_token': 'eyJhbGciOiJBMTI4S1ciLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiY3R5IjoiSldUIn0.2FVBm6ziFJyGyXdJg126gCpDfglZN1nq6M-YUPRRA4oqbF7Uw_28Tg.dE9oV_QoBOPrCTe-mqGA-Q.NDW6mkBVUAf305zqaJH25oamfUq4jLeOR2FwIwBUcniqWCxz-ugoUoTvee1GDKGafaPZaJR8FlKWF7yoCZTCtaRND_V6Tc_ec81cbEzfLEWE3u7yXatrpv6p1v9juHJfterHs-a535DMq7jI1nia_AwK-nUPmRdAo_uWk0WdCox6z5LqIg-jehQMdU_hpXeoetfYM4tq-6-RhfUAhmInmCTwtACl6cisFka7S7iD-TgmkdToQb2Xd8CtNo7bdGZ1wU7Hiv6Pft3YqXFblUbf-6sdDkBvdF04xYeKM5QPb784WXXj9Pz_QXPlJxgbsUcuF058ZYzfhm1Fo8-ojpIVrF40dni_RM7-feEqRU-oM1WpZM1ryx-vWWpcHc8XI-ZcwvGKFyAVkhV26JVoAnL2ZIzSFxE3fK_ytayBqbk9NI2ZCcIVE5Fx3mNOnZM2pFgz0XApL7qfpDjqY1RaBYi1-DJIljHL7l5LJrNkA07RrbOwkOs6zmKJT_vK1U85uKu9TG5W2xTKxOJ4cGeFP7Lm2h64wcPpY-ZKNFOe6Z4drhYprK3F8fKv819-co4wGMQeGc2NOXZL3OTUPD_hKQDq93d7J0FTzmb3-2iupktfKZIQU7x7RJTkgrwgCG2ppNOQlNh1zu1YDri6T7WJCfRtRGpW_N2Tbd5uK6cq5APIZqddnJzf4-DwCYpusworHa7J36yX9VPks17w4FiGaoyIBmaJhB5czSKjw8EC_70VGamxoFya7vOOt3xU0Fi4_CNrJPb5bkQ2dAky--xCNEHr0XGd9bn9RMLFpxfn-7S69oKmiv21qN0suaIY8TRZPDaOJrFifA8e8Tjj39fFLqQsP-kPXGglcNZAkrALc42gFNonfhLmyjNMIQl16yy39GDn060fYdHShGoBJUG3ILsfmvb217hZgt-9L9zlzvM4i3oMV_FhfnxngjaLdCypsiCZ.Fxm02mG6jKSJRhBRmH0jkw', 'token_type': 'bearer', 'expires_in': 3599}
3AccessTokenResponse
{
    "access_token": "SQP699YmxNYuWZVgd6tw",
    "expires_in": 3599,
    "id_token": {
        "at_hash": "ixAgpPQPmeUMQ3vxGNPLXw",
        "aud": [
            "clientID"
        ],
        "exp": 1560835244,
        "iat": 1560831824,
        "iss": "https://isamfed.com:30443/test",
        "nonce": "UQgXEUYKHBIYCT4L",
        "rt_hash": "mpl_pXz2ptx7qpU3QNle4w",
        "sub": "testuser"
    },
    "refresh_token": "i0MmWi3BhJNEvgsWQPd12k4eEyqHEl0ypHti6m43",
    "scope": "openid",
    "token_type": "bearer"
}
3jws header{'kid': '_uhPdeGrTWxobFeH0XbzjJpRrzp3CB9nknx1yFV1G-0', 'alg': 'RS256'}
3jwe header{'alg': 'A128KW', 'enc': 'A128CBC-HS256', 'cty': 'JWT'}
3phase<--<-- 6 --- AccessToken -->-->
3requestop_args: {'state': 'meKUd4GhQime8e5s'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61771/authz_cb'}
3do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61771/authz_cb', 'code': 'UixqYgKAzjOphGhBb9n58nYvEMcY76', 'state': 'meKUd4GhQime8e5s', 'grant_type': 'authorization_code', 'client_id': 'clientID'}, 'state': 'meKUd4GhQime8e5s', 'authn_method': 'client_secret_basic'}
3AccessTokenRequest
{
    "code": "UixqYgKAzjOphGhBb9n58nYvEMcY76",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61771/authz_cb",
    "state": "meKUd4GhQime8e5s"
}
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%3A61771%2Fauthz_cb&code=UixqYgKAzjOphGhBb9n58nYvEMcY76&state=meKUd4GhQime8e5s
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': 'meKUd4GhQime8e5s', '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 SQP699YmxNYuWZVgd6tw'}}
3http 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"}
3eventGot expected error
3ErrorResponse
{
    "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"
}
3ErrorResponse
{
    "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"
}
3phase<--<-- 8 --- Done -->-->
3end
3assertionVerifyResponse
3conditionverify-response: status=OK [Checks that the last response was one of a possible set of OpenID Connect Responses]
3conditionDone: status=OK

Result

PASSED