@@ -381,7 +381,7 @@ sub test_query
381
381
' test1' ,
382
382
' SELECT gss_authenticated AND encrypted AND NOT credentials_delegated FROM pg_stat_gssapi WHERE pid = pg_backend_pid();' ,
383
383
0,
384
- ' gssencmode=prefer gssdelegation=enable ' ,
384
+ ' gssencmode=prefer gssdelegation=1 ' ,
385
385
' succeeds with GSS-encrypted access preferred with host hba and credentials not delegated even though asked for (ticket not forwardable)' ,
386
386
" connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
387
387
" connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=yes, delegated_credentials=no, principal=test1\@ $realm )"
@@ -391,7 +391,7 @@ sub test_query
391
391
' test1' ,
392
392
' SELECT gss_authenticated AND encrypted AND NOT credentials_delegated FROM pg_stat_gssapi WHERE pid = pg_backend_pid();' ,
393
393
0,
394
- ' gssencmode=require gssdelegation=enable ' ,
394
+ ' gssencmode=require gssdelegation=1 ' ,
395
395
' succeeds with GSS-encrypted access required with host hba and credentials not delegated even though asked for (ticket not forwardable)' ,
396
396
" connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
397
397
" connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=yes, delegated_credentials=no, principal=test1\@ $realm )"
@@ -480,7 +480,7 @@ sub test_query
480
480
' test1' ,
481
481
' SELECT gss_authenticated AND encrypted AND NOT credentials_delegated from pg_stat_gssapi where pid = pg_backend_pid();' ,
482
482
0,
483
- ' gssencmode=prefer gssdelegation=enable ' ,
483
+ ' gssencmode=prefer gssdelegation=1 ' ,
484
484
' succeeds with GSS-encrypted access preferred and hostgssenc hba and credentials not forwarded (server does not accept them, default)' ,
485
485
" connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
486
486
" connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=yes, delegated_credentials=no, principal=test1\@ $realm )"
@@ -490,7 +490,7 @@ sub test_query
490
490
' test1' ,
491
491
' SELECT gss_authenticated AND encrypted AND NOT credentials_delegated from pg_stat_gssapi where pid = pg_backend_pid();' ,
492
492
0,
493
- ' gssencmode=require gssdelegation=enable ' ,
493
+ ' gssencmode=require gssdelegation=1 ' ,
494
494
' succeeds with GSS-encrypted access required and hostgssenc hba and credentials not forwarded (server does not accept them, default)' ,
495
495
" connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
496
496
" connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=yes, delegated_credentials=no, principal=test1\@ $realm )"
@@ -504,7 +504,7 @@ sub test_query
504
504
' test1' ,
505
505
' SELECT gss_authenticated AND encrypted AND NOT credentials_delegated from pg_stat_gssapi where pid = pg_backend_pid();' ,
506
506
0,
507
- ' gssencmode=prefer gssdelegation=enable ' ,
507
+ ' gssencmode=prefer gssdelegation=1 ' ,
508
508
' succeeds with GSS-encrypted access preferred and hostgssenc hba and credentials not forwarded (server does not accept them, explicitly disabled)' ,
509
509
" connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
510
510
" connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=yes, delegated_credentials=no, principal=test1\@ $realm )"
@@ -514,7 +514,7 @@ sub test_query
514
514
' test1' ,
515
515
' SELECT gss_authenticated AND encrypted AND NOT credentials_delegated from pg_stat_gssapi where pid = pg_backend_pid();' ,
516
516
0,
517
- ' gssencmode=require gssdelegation=enable ' ,
517
+ ' gssencmode=require gssdelegation=1 ' ,
518
518
' succeeds with GSS-encrypted access required and hostgssenc hba and credentials not forwarded (server does not accept them, explicitly disabled)' ,
519
519
" connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
520
520
" connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=yes, delegated_credentials=no, principal=test1\@ $realm )"
@@ -528,7 +528,7 @@ sub test_query
528
528
' test1' ,
529
529
' SELECT gss_authenticated AND encrypted AND credentials_delegated from pg_stat_gssapi where pid = pg_backend_pid();' ,
530
530
0,
531
- ' gssencmode=prefer gssdelegation=enable ' ,
531
+ ' gssencmode=prefer gssdelegation=1 ' ,
532
532
' succeeds with GSS-encrypted access preferred and hostgssenc hba and credentials forwarded' ,
533
533
" connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
534
534
" connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=yes, delegated_credentials=yes, principal=test1\@ $realm )"
@@ -538,7 +538,7 @@ sub test_query
538
538
' test1' ,
539
539
' SELECT gss_authenticated AND encrypted AND credentials_delegated from pg_stat_gssapi where pid = pg_backend_pid();' ,
540
540
0,
541
- ' gssencmode=require gssdelegation=enable ' ,
541
+ ' gssencmode=require gssdelegation=1 ' ,
542
542
' succeeds with GSS-encrypted access required and hostgssenc hba and credentials forwarded' ,
543
543
" connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
544
544
" connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=yes, delegated_credentials=yes, principal=test1\@ $realm )"
@@ -558,7 +558,7 @@ sub test_query
558
558
' test1' ,
559
559
' SELECT gss_authenticated AND encrypted AND NOT credentials_delegated FROM pg_stat_gssapi WHERE pid = pg_backend_pid();' ,
560
560
0,
561
- ' gssencmode=require gssdelegation=disable ' ,
561
+ ' gssencmode=require gssdelegation=0 ' ,
562
562
' succeeds with GSS-encrypted access required and hostgssenc hba and credentials explicitly not forwarded' ,
563
563
" connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
564
564
" connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=yes, delegated_credentials=no, principal=test1\@ $realm )"
@@ -572,7 +572,7 @@ sub test_query
572
572
' postgres' ,
573
573
" SELECT * FROM dblink('user=test1 dbname=$dbname host=$host hostaddr=$hostaddr port=$port ','select 1') as t1(c1 int);" ,
574
574
connstr =>
575
- " user=test1 host=$host hostaddr=$hostaddr gssencmode=require gssdelegation=disable " ,
575
+ " user=test1 host=$host hostaddr=$hostaddr gssencmode=require gssdelegation=0 " ,
576
576
stdout => \$psql_out ,
577
577
stderr => \$psql_stderr );
578
578
is($psql_rc , ' 3' , ' dblink attempt fails without delegated credentials' );
@@ -589,7 +589,7 @@ sub test_query
589
589
' postgres' ,
590
590
" SELECT * FROM dblink('user=test2 dbname=$dbname port=$port passfile=$pgpass ','select 1') as t1(c1 int);" ,
591
591
connstr =>
592
- " user=test1 host=$host hostaddr=$hostaddr gssencmode=require gssdelegation=disable " ,
592
+ " user=test1 host=$host hostaddr=$hostaddr gssencmode=require gssdelegation=0 " ,
593
593
stdout => \$psql_out ,
594
594
stderr => \$psql_stderr );
595
595
is($psql_rc , ' 3' ,
@@ -608,7 +608,7 @@ sub test_query
608
608
' postgres' ,
609
609
" TABLE tf1;" ,
610
610
connstr =>
611
- " user=test1 host=$host hostaddr=$hostaddr gssencmode=require gssdelegation=disable " ,
611
+ " user=test1 host=$host hostaddr=$hostaddr gssencmode=require gssdelegation=0 " ,
612
612
stdout => \$psql_out ,
613
613
stderr => \$psql_stderr );
614
614
is($psql_rc , ' 3' , ' postgres_fdw does not work without delegated credentials' );
@@ -626,7 +626,7 @@ sub test_query
626
626
' postgres' ,
627
627
" TABLE tf2;" ,
628
628
connstr =>
629
- " user=test1 host=$host hostaddr=$hostaddr gssencmode=require gssdelegation=disable " ,
629
+ " user=test1 host=$host hostaddr=$hostaddr gssencmode=require gssdelegation=0 " ,
630
630
stdout => \$psql_out ,
631
631
stderr => \$psql_stderr );
632
632
is($psql_rc , ' 3' ,
@@ -668,7 +668,7 @@ sub test_query
668
668
' test1' ,
669
669
' SELECT gss_authenticated AND NOT encrypted AND credentials_delegated FROM pg_stat_gssapi WHERE pid = pg_backend_pid();' ,
670
670
0,
671
- ' gssencmode=prefer gssdelegation=enable ' ,
671
+ ' gssencmode=prefer gssdelegation=1 ' ,
672
672
' succeeds with GSS-encrypted access preferred and hostnogssenc hba, but no encryption' ,
673
673
" connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
674
674
" connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=no, delegated_credentials=yes, principal=test1\@ $realm )"
@@ -680,7 +680,7 @@ sub test_query
680
680
' test1' ,
681
681
' SELECT gss_authenticated AND NOT encrypted AND credentials_delegated FROM pg_stat_gssapi WHERE pid = pg_backend_pid();' ,
682
682
0,
683
- ' gssencmode=disable gssdelegation=enable ' ,
683
+ ' gssencmode=disable gssdelegation=1 ' ,
684
684
' succeeds with GSS encryption disabled and hostnogssenc hba' ,
685
685
" connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
686
686
" connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=no, delegated_credentials=yes, principal=test1\@ $realm )"
@@ -691,7 +691,7 @@ sub test_query
691
691
' test1' ,
692
692
" SELECT * FROM dblink('user=test1 dbname=$dbname host=$host hostaddr=$hostaddr port=$port ','select 1') as t1(c1 int);" ,
693
693
qr / ^1$ / s ,
694
- ' gssencmode=prefer gssdelegation=enable ' ,
694
+ ' gssencmode=prefer gssdelegation=1 ' ,
695
695
' dblink works not-encrypted (server not configured to accept encrypted GSSAPI connections)'
696
696
);
697
697
@@ -700,7 +700,7 @@ sub test_query
700
700
' test1' ,
701
701
" TABLE tf1;" ,
702
702
qr / ^1$ / s ,
703
- ' gssencmode=prefer gssdelegation=enable ' ,
703
+ ' gssencmode=prefer gssdelegation=1 ' ,
704
704
' postgres_fdw works not-encrypted (server not configured to accept encrypted GSSAPI connections)'
705
705
);
706
706
@@ -711,7 +711,7 @@ sub test_query
711
711
' postgres' ,
712
712
" SELECT * FROM dblink('user=test2 dbname=$dbname port=$port passfile=$pgpass ','select 1') as t1(c1 int);" ,
713
713
connstr =>
714
- " user=test1 host=$host hostaddr=$hostaddr gssencmode=prefer gssdelegation=enable " ,
714
+ " user=test1 host=$host hostaddr=$hostaddr gssencmode=prefer gssdelegation=1 " ,
715
715
stdout => \$psql_out ,
716
716
stderr => \$psql_stderr );
717
717
is($psql_rc , ' 3' ,
@@ -730,7 +730,7 @@ sub test_query
730
730
' postgres' ,
731
731
" TABLE tf2;" ,
732
732
connstr =>
733
- " user=test1 host=$host hostaddr=$hostaddr gssencmode=prefer gssdelegation=enable " ,
733
+ " user=test1 host=$host hostaddr=$hostaddr gssencmode=prefer gssdelegation=1 " ,
734
734
stdout => \$psql_out ,
735
735
stderr => \$psql_stderr );
736
736
is($psql_rc , ' 3' ,
@@ -760,7 +760,7 @@ sub test_query
760
760
' test1' ,
761
761
' SELECT gss_authenticated AND encrypted AND credentials_delegated FROM pg_stat_gssapi WHERE pid = pg_backend_pid();' ,
762
762
0,
763
- ' gssdelegation=enable ' ,
763
+ ' gssdelegation=1 ' ,
764
764
' succeeds with include_realm=0 and defaults' ,
765
765
" connection authenticated: identity=\" test1\@ $realm \" method=gss" ,
766
766
" connection authorized: user=$username database=$dbname application_name=$application GSS (authenticated=yes, encrypted=yes, delegated_credentials=yes, principal=test1\@ $realm )"
@@ -771,12 +771,12 @@ sub test_query
771
771
' test1' ,
772
772
" SELECT * FROM dblink('user=test1 dbname=$dbname host=$host hostaddr=$hostaddr port=$port password=1234','select 1') as t1(c1 int);" ,
773
773
qr / ^1$ / s ,
774
- ' gssencmode=require gssdelegation=enable ' ,
774
+ ' gssencmode=require gssdelegation=1 ' ,
775
775
' dblink works encrypted' );
776
776
777
777
test_query(
778
778
$node , ' test1' , " TABLE tf1;" , qr / ^1$ / s ,
779
- ' gssencmode=require gssdelegation=enable ' ,
779
+ ' gssencmode=require gssdelegation=1 ' ,
780
780
' postgres_fdw works encrypted' );
781
781
782
782
# Reset pg_hba.conf, and cause a usermap failure with an authentication
0 commit comments