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:20:31Z

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 -->-->
1phase<--<-- 4 --- AsyncAuthn -->-->
1AuthorizationRequest
{
    "client_id": "clientID",
    "nonce": "FWMZoIOZSuE5rR6Y",
    "redirect_uri": "https://op.certification.openid.net:61772/authz_cb",
    "response_type": "code id_token",
    "scope": "openid",
    "state": "QB5gHoZgkj5EppoA"
}
1redirect urlhttps://isamfed.com:30443/mga/sps/oauth/oauth20/authorize?state=QB5gHoZgkj5EppoA&nonce=FWMZoIOZSuE5rR6Y&response_type=code+id_token&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61772%2Fauthz_cb&client_id=clientID
1redirecthttps://isamfed.com:30443/mga/sps/oauth/oauth20/authorize?state=QB5gHoZgkj5EppoA&nonce=FWMZoIOZSuE5rR6Y&response_type=code+id_token&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61772%2Fauthz_cb&client_id=clientID
2http args{}
2responseURL with fragment
2responseid_token=eyJhbGciOiJBMTI4S1ciLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiY3R5IjoiSldUIn0.ZJRCIB9mHM21Z0JplcUu0emTfV1o5b5FcDfG0dx1M9clMPqhNtTIYA.u9Ovi_NkdDYWsF0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CmiScpHgH4QWDUux1KEsb1",
    "id_token": {
        "aud": [
            "clientID"
        ],
        "c_hash": "sltDinwZDmUv5F08Rxl9UQ",
        "exp": 1560835049,
        "iat": 1560831629,
        "iss": "https://isamfed.com:30443/test",
        "nonce": "FWMZoIOZSuE5rR6Y",
        "sub": "testuser"
    },
    "state": "QB5gHoZgkj5EppoA"
}
2phase<--<-- 5 --- AccessToken -->-->
2requestop_args: {'state': 'QB5gHoZgkj5EppoA'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61772/authz_cb'}
2do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61772/authz_cb', 'code': 'nf3gpLeBCmiScpHgH4QWDUux1KEsb1', 'state': 'QB5gHoZgkj5EppoA', 'grant_type': 'authorization_code', 'client_id': 'clientID'}, 'state': 'QB5gHoZgkj5EppoA', 'authn_method': 'client_secret_basic'}
2AccessTokenRequest
{
    "code": "nf3gpLeBCmiScpHgH4QWDUux1KEsb1",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61772/authz_cb",
    "state": "QB5gHoZgkj5EppoA"
}
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%3A61772%2Fauthz_cb&code=nf3gpLeBCmiScpHgH4QWDUux1KEsb1&state=QB5gHoZgkj5EppoA
3http response
url:https://isamfed.com:30443/mga/sps/oauth/oauth20/token status_code:200
3response{'access_token': 'tmnPDHGIJPcrecRIq3oO', 'refresh_token': 'REizawhu7w6Aa8d0YHyqE5zOyPzLxxwGslUt95mX', 'scope': 'openid', 'id_token': 'eyJhbGciOiJBMTI4S1ciLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiY3R5IjoiSldUIn0.FiKA1kDrnxQuCS0UVr0mAJqtBje6Vur-qG_th9wEtgtKgjF9eU_yjg.jm25Qz66G4xmImPIPi4pBg.26ljxxmQPZiXmniPy2mvDx9xPKv_MndlQB2YoFEgPyR9io2QqmftV0AkuHc-Ofd_ELKbt6-nBsUsSfBhXByg0X89sYloF6dnmwgIzK0onfmCddZnhCdRBwrjZI3NYjwfH3s6XIcFrbi0tSMGQ6FlV0bToxjrvuPkkTAUGubU93tsXWEAcXr0ejUGNbta0Mp614K-Q7KnSvJuSGGDiwVp8wTIWSqtgbW15U4NnEz6gBLzERb-Z_4qmGEU-BkRg-sr0qgjOg6MCBUyqn6AWAzwpAZL0LThT-lEvzc7dp6ZOJu5rCIe9LJD9z1C6TKMyLlbSLkXdw4i2YgAJVCNcla4KfLdW3fQCiIAjrTZR7m_aiUOSPCsFcwI8BWKko14CjwULJXykwfiMNLf1sT9QsE2Kqwm75f4r5K6d6scydap7nesJxxFcgUVspY1bvDPSBTRhetxXFc1B0Hw0GwvCAxSp5YalhoeB15jfCWILSHjh_bbyIps_U6XbMtsaNMSfQc4srtedi-bKz-DqOAnw_ELekIpZfKTaRLEFwShhloX5lN9VTgNRR-16XUrXYRviNH08kmnfztZXHnZiN4Fu82MbpfuPXB8c-IMEn4vcn6JnkEg5FzszZgkzDOw61ENRJpN-_Kre--tOvRSSMcdmgYgOCAfSywf73iFTHyJ-HOTsfMO6heLYOSiEkMGeRqdH11bdU270JiircHoscBqJn68zbKR5ZEzXKO9vTT5osgozCMKOCZu9W3ki_nzYQnu6X5ES_VDp1IsbaJZa63hOMdup0SmkDnHWJcdEot3lLRRSOYcbPEiQ3mBCvmqsWl-3rEnJTfKTnOVywlUMmyfqh4CCk1rcQsS78m6NOvTgShjoMsiFcvR3X7M90RLfBpReYJSdbMuCR9YGbSAVPhhm8z3Zceqv8gNHTuym8QQeV8prIRmqoznZ0l0A3MPXQdbXsGH.PxdpZsUBbhpr3NH_UjA2WQ', 'token_type': 'bearer', 'expires_in': 3599}
3AccessTokenResponse
{
    "access_token": "tmnPDHGIJPcrecRIq3oO",
    "expires_in": 3599,
    "id_token": {
        "at_hash": "-b4n4uz8NKVUveepe_WCPg",
        "aud": [
            "clientID"
        ],
        "exp": 1560835050,
        "iat": 1560831630,
        "iss": "https://isamfed.com:30443/test",
        "nonce": "FWMZoIOZSuE5rR6Y",
        "rt_hash": "GHk1E1q175BSz5Xgu_6reQ",
        "sub": "testuser"
    },
    "refresh_token": "REizawhu7w6Aa8d0YHyqE5zOyPzLxxwGslUt95mX",
    "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': 'QB5gHoZgkj5EppoA'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61772/authz_cb'}
3do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61772/authz_cb', 'code': 'nf3gpLeBCmiScpHgH4QWDUux1KEsb1', 'state': 'QB5gHoZgkj5EppoA', 'grant_type': 'authorization_code', 'client_id': 'clientID'}, 'state': 'QB5gHoZgkj5EppoA', 'authn_method': 'client_secret_basic'}
3AccessTokenRequest
{
    "code": "nf3gpLeBCmiScpHgH4QWDUux1KEsb1",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61772/authz_cb",
    "state": "QB5gHoZgkj5EppoA"
}
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%3A61772%2Fauthz_cb&code=nf3gpLeBCmiScpHgH4QWDUux1KEsb1&state=QB5gHoZgkj5EppoA
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': 'QB5gHoZgkj5EppoA', '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 tmnPDHGIJPcrecRIq3oO'}}
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