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:13:35Z

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_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"
}
1phase<--<-- 2 --- Registration -->-->
1not expected to doDynamic registration
1phase<--<-- 3 --- Note -->-->
1phase<--<-- 4 --- AsyncAuthn -->-->
1AuthorizationRequest
{
    "client_id": "clientID",
    "nonce": "45C7WiOWAL7JErK1",
    "redirect_uri": "https://op.certification.openid.net:61764/authz_cb",
    "response_type": "code",
    "scope": "openid",
    "state": "cdyNyizpjtXcziS3"
}
1redirect urlhttps://isamfed.com:30443/mga/sps/oauth/oauth20/authorize?state=cdyNyizpjtXcziS3&nonce=45C7WiOWAL7JErK1&response_type=code&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61764%2Fauthz_cb&client_id=clientID
1redirecthttps://isamfed.com:30443/mga/sps/oauth/oauth20/authorize?state=cdyNyizpjtXcziS3&nonce=45C7WiOWAL7JErK1&response_type=code&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61764%2Fauthz_cb&client_id=clientID
2responseResponse URL with query part
2response{'state': 'cdyNyizpjtXcziS3', 'code': 'kEFIh1UeFD3BpkaDy03foQuyC41UG0'}
2response{'state': 'cdyNyizpjtXcziS3', 'code': 'kEFIh1UeFD3BpkaDy03foQuyC41UG0'}
2AuthorizationResponse
{
    "code": "kEFIh1UeFD3BpkaDy03foQuyC41UG0",
    "state": "cdyNyizpjtXcziS3"
}
2phase<--<-- 5 --- AccessToken -->-->
2requestop_args: {'state': 'cdyNyizpjtXcziS3'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61764/authz_cb'}
2do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61764/authz_cb', 'code': 'kEFIh1UeFD3BpkaDy03foQuyC41UG0', 'state': 'cdyNyizpjtXcziS3', 'grant_type': 'authorization_code', 'client_id': 'clientID'}, 'state': 'cdyNyizpjtXcziS3', 'authn_method': 'client_secret_basic'}
2AccessTokenRequest
{
    "code": "kEFIh1UeFD3BpkaDy03foQuyC41UG0",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61764/authz_cb",
    "state": "cdyNyizpjtXcziS3"
}
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%3A61764%2Fauthz_cb&code=kEFIh1UeFD3BpkaDy03foQuyC41UG0&state=cdyNyizpjtXcziS3
3http response
url:https://isamfed.com:30443/mga/sps/oauth/oauth20/token status_code:200
3response{'access_token': 'dx9pYDVmz3j3DvkUUK1O', 'refresh_token': '2InSpBFOIjjIJX4mtIjkvYVb3fYJxh86p4cEXhgA', 'scope': 'openid', 'id_token': 'eyJhbGciOiJBMTI4S1ciLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiY3R5IjoiSldUIn0.O4H5frhGP5OQevTInsi0CpBDpt2Wy4GeoogSjyNXIFV6qRwPF1PHAQ.0CqNdMMW2EKVu-eVAhJa3g._Hab0AC5jFMXfZ1x76KVzzwoVLWZj5NEVVj2NmPjM9a4akBXXwsHpNDwPUw5zwNgIUhrByURkzbtIwutxetPHEboba_oeqDSY2EtC7lMK2VbblZ4cXCDM6KODxLLl6i1vcrkzFsMHHhAHgPwC5fKiBveuoCGC9MVRE0I9m4thy1OlqMGr8hgZ9HOVi0SMwT7Lr-FJQgnb2Icu74vqU7ybg-2YBBuBLVmyWsSTWkwEn4LHhtYyQvXS6rEcW3xv-aC6HVy0Otd3dTVNeIgzBOEprjpqRVQHV2tBMV-PU_Kf1CNGwWEV3BbAqAJCb9AnqZxGZtfSFrFnGOiPJJ27XP1v-1DnBjvfQ_sHj-Jd3pCSLzmA8zwOzno6hFo-roB4tNXZP0YR3ULZtBrY0mpX2tWRnNAER4M0GmZnsEn5wgv09TMjkvPf87lRrU8qdO1NfZj050CD0S-KYC-V78xzfbGBYCK6kXyscrrxmT_NkAdfeJVJidfGRDagWXLK0-2ciPVhwDgjJlaN4CPoGcex9q4aksRGzZ3myMriHtXrpzS4yAUdshmSKlu71QiuJCdycN7KIbZSVFF2yau3qnFcApho03bzyqAbhsCX8brvxfukDcmroyCDIpaoA8CzJk0zqBYoFT0T_8JD03vm873dY-qDuIN7ScGngWutjS3IxyRt8QgVR9x5FqfhxQl6gnEOykqnP44_RSdE2CYPa9GQmMY47YCD3Hpjp75jzWijn5y9TV1LQHjefWjXV3OGOztTvJQ9DrAdpII2ERzb5Dl7nBifWGQhDcG7GXe1aTCCvpM55M7ATt1rOaKQmwlKuF8DFA5lkXoX2fhxbeudWjD9cuCNBF5rP0wG_zQcHpDgcjnImnkX9_7AL9LS_g_p6YIp-b3kIgGvYAiY06xe41iyeyUmGff9OVkub0Sq-LcNPKUlMSi2kQtsd7KnpNmgrh9KYs-.CRr4192iV4PkivmIgQQldw', 'token_type': 'bearer', 'expires_in': 3599}
3AccessTokenResponse
{
    "access_token": "dx9pYDVmz3j3DvkUUK1O",
    "expires_in": 3599,
    "id_token": {
        "at_hash": "MOifmrfPdLA_7X82eLnhWQ",
        "aud": [
            "clientID"
        ],
        "exp": 1560834634,
        "iat": 1560831214,
        "iss": "https://isamfed.com:30443/test",
        "nonce": "45C7WiOWAL7JErK1",
        "rt_hash": "s-ubn9nwIiuzuMA_ZekARA",
        "sub": "testuser"
    },
    "refresh_token": "2InSpBFOIjjIJX4mtIjkvYVb3fYJxh86p4cEXhgA",
    "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': 'cdyNyizpjtXcziS3'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61764/authz_cb'}
3do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61764/authz_cb', 'code': 'kEFIh1UeFD3BpkaDy03foQuyC41UG0', 'state': 'cdyNyizpjtXcziS3', 'grant_type': 'authorization_code', 'client_id': 'clientID'}, 'state': 'cdyNyizpjtXcziS3', 'authn_method': 'client_secret_basic'}
3AccessTokenRequest
{
    "code": "kEFIh1UeFD3BpkaDy03foQuyC41UG0",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61764/authz_cb",
    "state": "cdyNyizpjtXcziS3"
}
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%3A61764%2Fauthz_cb&code=kEFIh1UeFD3BpkaDy03foQuyC41UG0&state=cdyNyizpjtXcziS3
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': 'cdyNyizpjtXcziS3', '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 dx9pYDVmz3j3DvkUUK1O'}}
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