Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Postgres/src/test/authentication/t/     Datei vom 11.4.2026 mit Größe 1 kB image not shown  

Quelle  005_sspi.pl   Sprache: Shell

 


# Copyright (c) 2021-2025, PostgreSQL Global Development Group

# Tests targeting SSPI on Windows.

use strict;
use warnings FATAL => 'all';
use PostgreSQL::Test::Cluster;
use PostgreSQL::Test::Utils;
use Test::More;

if (!$windows_os || $use_unix_sockets)
{
 plan skip_all =>
   "SSPI tests require Windows (without PG_TEST_USE_UNIX_SOCKETS)";
}

# Initialize primary node
my $node = PostgreSQL::Test::Cluster->new('primary');
$node->init;
$node->append_conf('postgresql.conf', "log_connections = authentication\n");
$node->start;

my $huge_pages_status =
  $node->safe_psql('postgres', q(SHOW huge_pages_status;));
isnt($huge_pages_status, 'unknown', "check huge_pages_status");

# SSPI is set up by default.  Make sure it interacts correctly with
# require_auth.
$node->connect_ok("require_auth=sspi",
 "SSPI authentication required, works with SSPI auth");
$node->connect_fails(
 "require_auth=!sspi",
 "SSPI authentication forbidden, fails with SSPI auth",
 expected_stderr =>
   qr/authentication method requirement "!sspi" failed: server requested SSPI authentication/
);
$node->connect_fails(
 "require_auth=scram-sha-256",
 "SCRAM authentication required, fails with SSPI auth",
 expected_stderr =>
   qr/authentication method requirement "scram-sha-256" failed: server requested SSPI authentication/
);

done_testing();

Messung
CHZG
1009710098

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland