Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tuple {:option, :server_only, :honor_cipher_order} being returned for error reason from OAuth2 package

The Phoenix application I'm supporting has OAuth authentication using two different authentication servers. Mysteriously, only in my development environment they have begun exhibiting unexpected behaviour.

The code uses the OAuth2 hex package for authentication.

When an attempt is made to get a token via OAuth2.Client.get_token/1, an error is returned with a tuple rather than a string for the reason. The value of the tuple is {:option, :server_only, :honor_cipher_order}. I haven't been able to find out why this is happening nor what the tuple means.

Any help would be appreciated.

like image 244
Keith Pitty Avatar asked Sep 23 '19 07:09

Keith Pitty


People also ask

Does Tomcat use the server's preferred cipher-suite order?

That ordering is up to you and isn't based upon fuzzy definitions like "strength", since a high-bit cipher can be worse than a lower-bit cipher in certain situations. Tomcat 8.0.21 and later on Java 8 and later will use the server's preferred cipher-suite order if useServerCipherSuitesOrder is set to "true" (the default) for Java-based connectors.

What is the preferred cipher-suite order for Java-based connectors?

Tomcat 7.0.60 and later on Java 8 and later will use the server's preferred cipher-suite order if useServerCipherSuitesOrder is set to "true" (the default) for Java-based connectors. Tomcat 6 never had this capability for Java-based connectors; server-preferred ordering of cipher suites on Tomcat 6 will require the use of the APR/native connector.

Should a server cipher order be set or not?

... a server should begin by offering the strongest ciphers first, and only then offer weaker ciphers. As long as the server only supports ciphers which are strong enough it does not actually matter in terms of security who chooses the cipher.

Is it possible to change the Order of ciphers in OpenSSL?

Using the OpenSSL connector, you get the option of using a more concise syntax for allowing or disallowing certain ciphers but no options for setting cipher order or even preferred cipher. Thanks for contributing an answer to Server Fault!


2 Answers

Discovered that this was caused by https://github.com/benoitc/hackney/issues/591 following an upgrade on my machine to Erlang 22.1.

like image 144
Keith Pitty Avatar answered Sep 22 '22 14:09

Keith Pitty


Without having to downgrade your erlang version, try:

mix deps.update hackney

like image 23
btomtom5 Avatar answered Sep 20 '22 14:09

btomtom5