Test Info

Issuerhttps://isamfed.com:30443/test
Profile[]
Test IDOP-OAuth-2nd-30s
Test descriptionTrying to use authorization code twice with 30 seconds in between uses must result in an error
Timestamp2019-06-17T06:41:55Z

Conditions


check-http-error-response: status=OK [Checks that an error code is either 400 or 401 which are the only ones accepted by OAuth2/OIDC.]
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 --- Note -->-->
0phase<--<-- 1 --- Webfinger -->-->
0not expected to doWebFinger
0phase<--<-- 2 --- 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_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<--<-- 3 --- Registration -->-->
0register
kwargs:{'response_types': ['code'], 'grant_types': ['authorization_code'], 'application_name': 'OIC test tool', 'application_type': 'web', 'redirect_uris': ['https://op.certification.openid.net:61164/authz_cb'], 'contacts': ['roland@example.com'], 'post_logout_redirect_uris': ['https://op.certification.openid.net:61164/logout'], 'url': 'https://isamfed.com:30443/mga/sps/oauth/oauth20/register/OIDCDefinition', 'jwks_uri': 'https://op.certification.openid.net:61164/static/jwks_61164.json', 'token_endpoint_auth_method': 'private_key_jwt'}
0RegistrationRequest
{
    "application_type": "web",
    "contacts": [
        "roland@example.com"
    ],
    "grant_types": [
        "authorization_code"
    ],
    "jwks_uri": "https://op.certification.openid.net:61164/static/jwks_61164.json",
    "post_logout_redirect_uris": [
        "https://op.certification.openid.net:61164/logout"
    ],
    "redirect_uris": [
        "https://op.certification.openid.net:61164/authz_cb"
    ],
    "response_types": [
        "code"
    ],
    "token_endpoint_auth_method": "private_key_jwt"
}
1http response
url:https://isamfed.com:30443/mga/sps/oauth/oauth20/register/OIDCDefinition status_code:200
1RegistrationResponse
{
    "application_type": "web",
    "client_id": "Rp5OQPSK8L3xV1dGYhKS",
    "client_id_issued_at": 1560753683,
    "client_secret": "VGQudWRWxaNacceySKXh",
    "client_secret_expires_at": 0,
    "contacts": [
        "roland@example.com"
    ],
    "grant_types": [
        "authorization_code"
    ],
    "jwks_uri": "https://op.certification.openid.net:61164/static/jwks_61164.json",
    "post_logout_redirect_uris": [
        "https://op.certification.openid.net:61164/logout"
    ],
    "redirect_uris": [
        "https://op.certification.openid.net:61164/authz_cb"
    ],
    "registration_access_token": "tEWn0ajnSx8ueVUW2Zsb",
    "registration_client_uri": "https://isamfed.com:30443/mga/sps/oauth/oauth20/register/OIDCDefinition?client_id=Rp5OQPSK8L3xV1dGYhKS",
    "response_types": [
        "code"
    ],
    "token_endpoint_auth_method": "private_key_jwt"
}
1phase<--<-- 4 --- AsyncAuthn -->-->
1AuthorizationRequest
{
    "client_id": "Rp5OQPSK8L3xV1dGYhKS",
    "nonce": "eT2NXE1FD7348TJZ",
    "redirect_uri": "https://op.certification.openid.net:61164/authz_cb",
    "response_type": "code",
    "scope": "openid",
    "state": "ZzhSGieGKBoItTgU"
}
1redirect urlhttps://isamfed.com:30443/mga/sps/oauth/oauth20/authorize?state=ZzhSGieGKBoItTgU&nonce=eT2NXE1FD7348TJZ&response_type=code&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61164%2Fauthz_cb&client_id=Rp5OQPSK8L3xV1dGYhKS
1redirecthttps://isamfed.com:30443/mga/sps/oauth/oauth20/authorize?state=ZzhSGieGKBoItTgU&nonce=eT2NXE1FD7348TJZ&response_type=code&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61164%2Fauthz_cb&client_id=Rp5OQPSK8L3xV1dGYhKS
2responseResponse URL with query part
2response{'state': 'ZzhSGieGKBoItTgU', 'code': 'RQCaOb4rQTSN3h9ttHO2fQ2dLRYUeE'}
2response{'state': 'ZzhSGieGKBoItTgU', 'code': 'RQCaOb4rQTSN3h9ttHO2fQ2dLRYUeE'}
2AuthorizationResponse
{
    "code": "RQCaOb4rQTSN3h9ttHO2fQ2dLRYUeE",
    "state": "ZzhSGieGKBoItTgU"
}
2phase<--<-- 5 --- AccessToken -->-->
2requestop_args: {'state': 'ZzhSGieGKBoItTgU'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61164/authz_cb'}
2do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61164/authz_cb', 'code': 'RQCaOb4rQTSN3h9ttHO2fQ2dLRYUeE', 'state': 'ZzhSGieGKBoItTgU', 'grant_type': 'authorization_code', 'client_id': 'Rp5OQPSK8L3xV1dGYhKS'}, 'state': 'ZzhSGieGKBoItTgU', 'authn_method': 'private_key_jwt'}
2AccessTokenRequest
{
    "client_assertion": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiUnA1T1FQU0s4TDN4VjFkR1loS1MiLCAic3ViIjogIlJwNU9RUFNLOEwzeFYxZEdZaEtTIiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICJFVUxMNFg1dTJFU2Y1VUlvU1JOQm5BYjh6bGozMjVJWCIsICJleHAiOiAxNTYwNzU0Mjg0LCAiaWF0IjogMTU2MDc1MzY4NH0.VNCf2Vf6aCYAifyGjIo3zryrIv_0NTQefWdUj0Hvq6d3DHhStm85v9Tn_-PGibQ_kpfhBzpYQbsf0uajzx50DkQIEn1XuDiwJNYVEIuybgSj4mYmzM26mOItDvSZQGLVJqK1iP1QQCe3RTLuY7rPzz4w51yB_n2FH47kWWt7d_U_nQdr_F6zHQHDEWeGern_QMI7rTws_JKkULx17EWe5qPegekCoTLWWe3bhG542fxuoI-CbYBqFYacAO6geO1vIRnM8wNcLWRauIAgGKiC2ZoMDAiORKrADE5m4BYD-_2hmAWbsbu5jYPUlhdEmwuAPf1dvXckbJZQ_ske7_1fqA",
    "client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
    "code": "RQCaOb4rQTSN3h9ttHO2fQ2dLRYUeE",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61164/authz_cb",
    "state": "ZzhSGieGKBoItTgU"
}
2request_urlhttps://isamfed.com:30443/mga/sps/oauth/oauth20/token
2request_http_args{'headers': {'Content-Type': 'application/x-www-form-urlencoded'}}
2requestgrant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61164%2Fauthz_cb&code=RQCaOb4rQTSN3h9ttHO2fQ2dLRYUeE&state=ZzhSGieGKBoItTgU&client_assertion=eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiUnA1T1FQU0s4TDN4VjFkR1loS1MiLCAic3ViIjogIlJwNU9RUFNLOEwzeFYxZEdZaEtTIiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICJFVUxMNFg1dTJFU2Y1VUlvU1JOQm5BYjh6bGozMjVJWCIsICJleHAiOiAxNTYwNzU0Mjg0LCAiaWF0IjogMTU2MDc1MzY4NH0.VNCf2Vf6aCYAifyGjIo3zryrIv_0NTQefWdUj0Hvq6d3DHhStm85v9Tn_-PGibQ_kpfhBzpYQbsf0uajzx50DkQIEn1XuDiwJNYVEIuybgSj4mYmzM26mOItDvSZQGLVJqK1iP1QQCe3RTLuY7rPzz4w51yB_n2FH47kWWt7d_U_nQdr_F6zHQHDEWeGern_QMI7rTws_JKkULx17EWe5qPegekCoTLWWe3bhG542fxuoI-CbYBqFYacAO6geO1vIRnM8wNcLWRauIAgGKiC2ZoMDAiORKrADE5m4BYD-_2hmAWbsbu5jYPUlhdEmwuAPf1dvXckbJZQ_ske7_1fqA&client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer
2http response
url:https://isamfed.com:30443/mga/sps/oauth/oauth20/token status_code:200
2response{'access_token': 'VMDfoziC1nIgr5zIwboi', 'refresh_token': 'xKM16HD02bE2iTVaSnl0rcqyRiILHHPUjsQkYD5N', 'scope': 'openid', 'id_token': 'eyJraWQiOiJfdWhQZGVHclRXeG9iRmVIMFhiempKcFJyenAzQ0I5bmtueDF5RlYxRy0wIiwiYWxnIjoiUlMyNTYifQ.eyJydF9oYXNoIjoiaXk0a204S1ExOTZGcVgxSG5LQ1JiQSIsIm5vbmNlIjoiZVQyTlhFMUZENzM0OFRKWiIsImlhdCI6MTU2MDc1MzY4NCwiaXNzIjoiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My90ZXN0IiwiYXRfaGFzaCI6Imh1b2NlRGV3R212R2JEVmt5cWIwQXciLCJzdWIiOiJ0ZXN0dXNlciIsImV4cCI6MTU2MDc1NzEwNCwiYXVkIjoiUnA1T1FQU0s4TDN4VjFkR1loS1MifQ.b25QXohoP476rYZG5jH2XJ8L5ERA35KDco7mTnXuvb_umxvdl3tSYdo33TKsJdKhCx6XYBJ9jWSE2LCYzP1LvEWlS6aFsnet3sJvvuQiW8z6nyHFoMyxxV6XsRZnLk1dgvF7A9O7qaf_bTxhno8zygSM1ksa3jwGb1paL7EZL4UoYCY1PTy-6Dka9gkh0fjSnaONlAV9dNlh9Kat_KVmQUyQPZxOYME_NFKBVkas4DvUV25Fqkcy641Akl7zzkzBV9-dZBcAzb_4-aVqpO04PpJNXJ8CdzhCCiQYZrvHj1qNQHo2JWT2ap4ONXAQQ0TJD5imQupuq0s9p9AmUloPqA', 'token_type': 'bearer', 'expires_in': 3599}
3AccessTokenResponse
{
    "access_token": "VMDfoziC1nIgr5zIwboi",
    "expires_in": 3599,
    "id_token": {
        "at_hash": "huoceDewGmvGbDVkyqb0Aw",
        "aud": [
            "Rp5OQPSK8L3xV1dGYhKS"
        ],
        "exp": 1560757104,
        "iat": 1560753684,
        "iss": "https://isamfed.com:30443/test",
        "nonce": "eT2NXE1FD7348TJZ",
        "rt_hash": "iy4km8KQ196FqX1HnKCRbA",
        "sub": "testuser"
    },
    "refresh_token": "xKM16HD02bE2iTVaSnl0rcqyRiILHHPUjsQkYD5N",
    "scope": "openid",
    "token_type": "bearer"
}
3jws header{'kid': '_uhPdeGrTWxobFeH0XbzjJpRrzp3CB9nknx1yFV1G-0', 'alg': 'RS256'}
3phase<--<-- 6 --- TimeDelay -->-->
33phase<--<-- 7 --- AccessToken -->-->
33requestop_args: {'state': 'ZzhSGieGKBoItTgU'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61164/authz_cb'}
33do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61164/authz_cb', 'code': 'RQCaOb4rQTSN3h9ttHO2fQ2dLRYUeE', 'state': 'ZzhSGieGKBoItTgU', 'grant_type': 'authorization_code', 'client_id': 'Rp5OQPSK8L3xV1dGYhKS'}, 'state': 'ZzhSGieGKBoItTgU', 'authn_method': 'private_key_jwt'}
33AccessTokenRequest
{
    "client_assertion": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiUnA1T1FQU0s4TDN4VjFkR1loS1MiLCAic3ViIjogIlJwNU9RUFNLOEwzeFYxZEdZaEtTIiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICJlTDNyNHZQSUpSZTFwancxRjJRdVRmVVJOdzRVbVFhUyIsICJleHAiOiAxNTYwNzU0MzE1LCAiaWF0IjogMTU2MDc1MzcxNX0.Jr9YUa52X4xSovX6XEle1NK3IIxynvL9csm7Yr685XRGgLX8ez4oDaPDbBEhA0Zr_Z4hnCL85dl9PhXzYPGitTViPjrNp8CqLMf6jvfd9xni16FD3D-iADSgl9bgplNfz9Ui6a3VE5fZgBE5S1wwO7sM32lfn6ImK4B92FcXhcp3N5Mif1GMSbDrfcjzK45bherMvyIXIZH8kqsHx-_7NbB-qW6A9hgpTgdXZWfUtdeZHore66rUWeXLtNGUahDwUeWsJBrsQs6SzF4kO0fYkwSfEbmGbGjlH6GdSwlbgwGAJBi7WPzYYemR-uEqCQetZXyjoT3-fOyLpwVaItzItg",
    "client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
    "code": "RQCaOb4rQTSN3h9ttHO2fQ2dLRYUeE",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61164/authz_cb",
    "state": "ZzhSGieGKBoItTgU"
}
33request_urlhttps://isamfed.com:30443/mga/sps/oauth/oauth20/token
33request_http_args{'headers': {'Content-Type': 'application/x-www-form-urlencoded'}}
33requestgrant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61164%2Fauthz_cb&code=RQCaOb4rQTSN3h9ttHO2fQ2dLRYUeE&state=ZzhSGieGKBoItTgU&client_assertion=eyJhbGciOiJSUzI1NiIsImtpZCI6Ind0MjVPZ3lSX256RzNPb1E3ZGFhMnJMNi1nTW5GZGZSekJqaFVWUHU4UlEifQ.eyJpc3MiOiAiUnA1T1FQU0s4TDN4VjFkR1loS1MiLCAic3ViIjogIlJwNU9RUFNLOEwzeFYxZEdZaEtTIiwgImF1ZCI6IFsiaHR0cHM6Ly9pc2FtZmVkLmNvbTozMDQ0My9tZ2Evc3BzL29hdXRoL29hdXRoMjAvdG9rZW4iXSwgImp0aSI6ICJlTDNyNHZQSUpSZTFwancxRjJRdVRmVVJOdzRVbVFhUyIsICJleHAiOiAxNTYwNzU0MzE1LCAiaWF0IjogMTU2MDc1MzcxNX0.Jr9YUa52X4xSovX6XEle1NK3IIxynvL9csm7Yr685XRGgLX8ez4oDaPDbBEhA0Zr_Z4hnCL85dl9PhXzYPGitTViPjrNp8CqLMf6jvfd9xni16FD3D-iADSgl9bgplNfz9Ui6a3VE5fZgBE5S1wwO7sM32lfn6ImK4B92FcXhcp3N5Mif1GMSbDrfcjzK45bherMvyIXIZH8kqsHx-_7NbB-qW6A9hgpTgdXZWfUtdeZHore66rUWeXLtNGUahDwUeWsJBrsQs6SzF4kO0fYkwSfEbmGbGjlH6GdSwlbgwGAJBi7WPzYYemR-uEqCQetZXyjoT3-fOyLpwVaItzItg&client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer
33http 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"}
33response{'error_description': 'FBTOAU211E The [authorization_grant] received of type [authorization_code] does not exist.', 'error': 'invalid_grant'}
33eventGot expected error
33TokenErrorResponse
{
    "error": "invalid_grant",
    "error_description": "FBTOAU211E The [authorization_grant] received of type [authorization_code] does not exist."
}
33phase<--<-- 8 --- Done -->-->
33end
33assertionCheckHTTPErrorResponse
33conditioncheck-http-error-response: status=OK [Checks that an error code is either 400 or 401 which are the only ones accepted by OAuth2/OIDC.]
33assertionVerifyResponse
33conditionverify-response: status=OK [Checks that the last response was one of a possible set of OpenID Connect Responses]
33conditionDone: status=OK

Result

PASSED