Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jwjp1-0006mR-Q5 for pgsql-jdbc@arkaria.postgresql.org; Sat, 18 Jul 2020 10:11:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jwjp0-0001eY-IK for pgsql-jdbc@arkaria.postgresql.org; Sat, 18 Jul 2020 10:11:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jwjp0-0001eR-A5 for pgsql-jdbc@lists.postgresql.org; Sat, 18 Jul 2020 10:11:58 +0000 Received: from out-22.smtp.github.com ([192.30.252.205]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jwjot-0006C8-D0 for pgsql-jdbc@lists.postgresql.org; Sat, 18 Jul 2020 10:11:57 +0000 Received: from github-lowworker-a27607f.ash1-iad.github.net (github-lowworker-a27607f.ash1-iad.github.net [10.56.18.61]) by smtp.github.com (Postfix) with ESMTP id 2D086A0033 for ; Sat, 18 Jul 2020 03:11:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1595067110; bh=h3uZPrK1RQ53e9Lb4RLs93K1zhZh38pL/1oTHxTWaCo=; h=Date:From:To:Subject:From; b=WQxjAysSc+5bF15IjBdiYIr4GX5jjs6ndagt1N3HwZk2PctHjdhRHsPiDWgrdtJiF ubvwnmjNYzDAfqxRUk4vVoDK2rkb2QCiujVmBBVJef7tKngJwctdwxPhsX0XZe3woL M+FgxVmGjz3G5Kr7mpOB6bMC5U03Yu7WNF+tnQ/I= Date: Sat, 18 Jul 2020 03:11:50 -0700 From: Dave Cramer To: pgsql-jdbc@lists.postgresql.org Message-ID: Subject: [pgjdbc/pgjdbc] ad921b: Gssapi encrypted (#1821) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Approved: 58GruLoMopuc X-GitHub-Recipient-Address: pgsql-jdbc@lists.postgresql.org X-Auto-Response-Suppress: All List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Branch: refs/heads/master Home: https://github.com/pgjdbc/pgjdbc Commit: ad921b9e3563b28b9a03b1e2dfaad0e34efc02f1 https://github.com/pgjdbc/pgjdbc/commit/ad921b9e3563b28b9a03b1e2dfaad0e34efc02f1 Author: Dave Cramer Date: 2020-07-18 (Sat, 18 Jul 2020) Changed paths: A .github/workflows/testgss.yml M CHANGELOG.md M README.md M build.properties M docs/documentation/head/connect.md M pgjdbc/src/main/java/org/postgresql/PGProperty.java M pgjdbc/src/main/java/org/postgresql/core/PGStream.java M pgjdbc/src/main/java/org/postgresql/core/VisibleBufferedInputStream.java M pgjdbc/src/main/java/org/postgresql/core/v3/ConnectionFactoryImpl.java M pgjdbc/src/main/java/org/postgresql/ds/common/BaseDataSource.java A pgjdbc/src/main/java/org/postgresql/gss/GSSInputStream.java A pgjdbc/src/main/java/org/postgresql/gss/GSSOutputStream.java M pgjdbc/src/main/java/org/postgresql/gss/GssAction.java A pgjdbc/src/main/java/org/postgresql/gss/GssEncAction.java M pgjdbc/src/main/java/org/postgresql/gss/MakeGSS.java A pgjdbc/src/main/java/org/postgresql/jdbc/GSSEncMode.java M pgjdbc/src/test/java/org/postgresql/test/TestUtil.java A test-gss/build.gradle A test-gss/gradle/wrapper/gradle-wrapper.jar A test-gss/gradle/wrapper/gradle-wrapper.properties A test-gss/gradlew A test-gss/gradlew.bat A test-gss/jaas.conf A test-gss/settings.gradle A test-gss/src/main/groovy/Kerberos.groovy A test-gss/src/main/groovy/PgJDBC.groovy A test-gss/src/main/groovy/Postgres.groovy A test-gss/src/main/groovy/TestPostgres.groovy A test-gss/src/main/groovy/Util.groovy Log Message: ----------- Gssapi encrypted (#1821) * add test-gss to test gss encrypted mode * chore: add gss encrypted mode This was added in PostgreSQL 12 After creating an initial socket we then try to elevate the connection to GSS encrypted If this fails we then try ssl All of this is dependent on the gssEncMode * try normal authentication * use encrypted authentication when necessary * make test fail using Assert.that if they do not succeed * document use of gssEncMode, add entry to changelog Co-authored-by: Vladimir Sitnikov