Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-conformant error responses #525

Closed
aeneasr opened this issue Nov 4, 2020 · 9 comments · Fixed by #526
Closed

Non-conformant error responses #525

aeneasr opened this issue Nov 4, 2020 · 9 comments · Fixed by #526
Assignees
Labels
blocking Blocks milestones or other issues or pulls. bug Something is not working.

Comments

@aeneasr
Copy link
Member

aeneasr commented Nov 4, 2020

Describe the bug

We recently changed the way error_description and other error fields are generated. This unfortunately caused two warnings and one failure in the OpenID Connect Conformity Test Suite, specifically the oidcc-response-type-missing test.

To Reproduce

The full test log can be seen here: test-log-oidcc-response-type-missing-client_secret_basic-discovery-code-default-dynamic_client-8XprPDGkiQ09O8v.zip

WARNING: error_hint is unexpected

I think this can be ignored

error response includes unexpected parameters. This may be because the server supports extensions the test suite is unaware of, or the server may be returning values it should not.

WARNING: error_hint is unexpected

I think this can be ignored

error response includes unexpected parameters. This may be because the server supports extensions the test suite is unaware of, or the server may be returning values it should not.

WARNING error_description has CR LF or TAB

This should be fixed

'error_description' field includes characters CR, LF or TAB, these are not recommended to include

ERROR invalid characters in error_description

'error_description' field MUST NOT include characters outside the set %09-0A (Tab and LF) / %x0D (CR) / %x20-21 / %x23-5B / %x5D-7E

  • error_description: The authorization server does not support obtaining a token using this method The request is missing the "response_type"" parameter.

Expected behavior

The test should pass.

Environment

ORY Fosite v0.34.1

Additional context

Bildschirmfoto 2020-11-04 um 09 49 20

/cc @mitar could you take a look maybe?

@aeneasr aeneasr added bug Something is not working. blocking Blocks milestones or other issues or pulls. labels Nov 4, 2020
@aeneasr aeneasr self-assigned this Nov 4, 2020
@mitar
Copy link
Contributor

mitar commented Nov 4, 2020

Yes, I can. Should we remove error_hint as described in #488? Or it is too early? We have an excuse now. :-)

So should I use my proposed syntax with : as a delimiter between messages?

@aeneasr
Copy link
Member Author

aeneasr commented Nov 4, 2020

I think we can keep error_hint around for a little longer, but we should eventually deprecate it. My gut says targeting ORY Hydra v1.11.x!

So should I use my proposed syntax with : as a delimiter between messages?

I think it is more standard to have a dot as a delimiter for OAuth2 error messages but if it makes more sense (from a language point) to have : that would also be fine!

@mitar
Copy link
Contributor

mitar commented Nov 4, 2020

I can try dot. Probably in both cases there will be some error message combinations which will be strange to read for a human because of wrong way how things got combined. In go I have seen that errors get combined with : more, so this is why I am assuming it will work for us here as well.

@aeneasr
Copy link
Member Author

aeneasr commented Nov 4, 2020

We can of course also modify the hint messages so that they become easier to read!

@mitar
Copy link
Contributor

mitar commented Nov 4, 2020

We can of course also modify the hint messages so that they become easier to read!

That I will leave to you. :-) If you want to take a stab at it. Probably we should go over all of them and check. Also you should remove any " while you are at it, they are not allowed (together with \).

@aeneasr
Copy link
Member Author

aeneasr commented Nov 4, 2020

Fair enough ;)

@aeneasr
Copy link
Member Author

aeneasr commented Nov 4, 2020

@mitar since I am working on this anyways right now, I can also just give it a shot if that's ok for you!

@mitar
Copy link
Contributor

mitar commented Nov 4, 2020

Sure.

@aeneasr
Copy link
Member Author

aeneasr commented Nov 4, 2020

So it looks like newlines are ok, the only character not allowed but being used is " which is probably used quite often. However, looks like we can replace it with ' to keep readability high!

aeneasr added a commit that referenced this issue Nov 4, 2020
Replace LF and quotes with `.` and `'` to match allowed and recommended character set defined in various RFCs.

Closes #525
aeneasr added a commit that referenced this issue Nov 4, 2020
Replace LF and quotes with `.` and `'` to match allowed and recommended character set defined in various RFCs.

Closes #525
aeneasr added a commit that referenced this issue Nov 4, 2020
Replace LF and quotes with `.` and `'` to match allowed and recommended character set defined in various RFCs.

Closes #525
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocking Blocks milestones or other issues or pulls. bug Something is not working.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants