ORA-28040: No matching authentication protocol
上网查了原因：Oracle 12c的参数SQLNET.ALLOWED_LOGON_VERSION默认等于11。当我们使用11g JDBC之前版本的thin驱动连接的时候，就会报错。
修改之后再次连接却又报错ORA-01017: invalid username/password; logon denied
于是在MOS上搜索相关文档，查到这样一篇文章Client / Server Interoperability Support Matrix for Different Oracle Versions (文档 ID 207303.1)
|11.2.0||Yes#9||Yes||Yes||Was||MDS #7||No||Was #5|
|11.1.0||No||Was||Was||Was||Was #7||Was #6||Was #5|
|10.2.0||No||MDS #7||MDS #7||Was #7||MDS||Was||Was #5|
|10.1.0#4||No||No||Was #6||Was #6||Was||Was||Was|
|9.2.0||No||No#8||Was #5||Was #5||Was #5||Was||Was|
Yes Supported ES Supported but fixes only possible for customers with Extended Support . LES or MDS Supported but fixes only possible for customer with a valid Limited Extended Support or Market-Driven Support contract respectively. Was Was a supported combination but one of the releases is no longer covered by any of Premier Support, Primary Error Correct support, Extended Support, nor Extended Maintenance Support. Fixes are no longer possible. No Has never been Supported
#1 - See Note:207319.1#2 - An ORA-3134 error is incorrectly reported if a 10g client tries to connect to an 126.96.36.199 or lower server. See Note:3437884.8 .#3 - An ORA-3134 error is correctly reported when attempting to connect to this version.#4 - There are problems connecting from a 10g client to 8i/9i where one is EBCDIC based. See Note:3564573.8#5 - For connections between 10.2 (or higher) and 9.2 the 9.2 end MUST be at 188.8.131.52 or higher. Connections between 10.2 (or higher) and 184.108.40.206, 220.127.116.11 or 18.104.22.168 have never been supported.#6 - For connections between 11.1 (or higher) database server and 10.1 / 10.2 database server across a database link the 10g end MUST be at 10.1.0.5 / 10.2.0.2 (or higher) respectively in order to use PLSQL between those versions. (This does not apply to normal 11g clients to 10g database server only server to server and a few very specific client products, such as Oracle Forms). See Note:4511371.8 for more details.#7 - For database link connections between 11.1 (or higher) and 10.2 the 10g end MUST be at 10.2.0.2 (or higher) in order to use PLSQL between those versions. See Note:4511371.8 for more details.#8 - Attempting to connect from 9.2 to 12.1 will fail with an "ORA-28040: No matching authentication protocol" error.#9 - 22.214.171.124 or 126.96.36.199 only. We do not support any 11.2 client interoperability with Oracle Database Exadata Express Cloud Service#10 - Includes Oracle Database Exadata Express Cloud Service - see Note:2183770.1 for additional details
For database links between different Oracle versions connections must be supported in BOTH directions in the matrix above.
eg: As 11.2 -> 10.1 is not supported then database links between these version are not supported in either direction.
Unsupported combinations may appear to work but can encounter errors for particular operations. The fact that they appear to work should not be relied upon - issues on unsupported combinations will not be investigated.
Since new database servers are compatible with a limited set of older OCI clients, it may not be necessary to upgrade the client software when upgrading the database. However, some new features may not work without upgrading the client software. For example, an Oracle 10.2 client is able to connect to an 11.2 database, but is not able to take advantage of newer features such as Client Result Cache (introduced in 11.1).
Oracle Applications , or other Oracle products, may have supported configurations not listed in the matrix above.
The matrix above also applies between different platforms and between 32/64 bit releases of Oracle client / server except where any Oracle platform desupport notice indicates otherwise .
Unix BEQUEATH (BEQ) connections are NOT supported between different releases. eg: Client 10.2 is not supported to make an Oracle Net connection to a 11.2 server using the BEQ protocol adapter regardless of the interoperability support listed above. See Note:364252.1 for more details.