Skip to content

GSSAPI authentication not supported #174

Closed

Description

@gmonaie

I'm trying to connect to my database using kerberos authentication. I have the required kerberos tickets. Using RPostgreSQL I'm able to do this with no problem.

library(RPostgreSQL)
Loading required package: DBI
olddrv = dbDriver('PostgreSQL')
olddrv
<PostgreSQLDriver>

oldconn = dbConnect(drv=olddrv, port = 1234, 
                                 host = 'host.domain.com', dbname = 'xxxxxx', user = 'xxx')

oldconn
<PostgreSQLConnection>

But I'm not able to with the RPostgre drivers.

library(Rpostgre)
newdrv = RPostgres::Postgres()
newdrv
<PqDriver>

newcon = dbConnect(drv=newdrv, port = 5432, 
                                 host = 'host.domain.com', dbname = 'xxxxxx', user = 'xxx')

Error in connection_create(names(opts), as.vector(opts)) : 
  GSSAPI authentication not supported

sessionInfo()
R version 3.2.4 (2016-03-10)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.12.6 (unknown)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] RPostgres_1.0-4 RPostgreSQL_0.4 DBI_0.7

loaded via a namespace (and not attached):
[1] bit_1.1-12 hms_0.3 tools_3.2.4 tibble_1.3.3 Rcpp_0.12.15 bit64_0.9-7 blob_1.1.0 rlang_0.1.6

Activity

  1. krlmlr commented on Apr 30, 2018

    @krlmlr
    Member

    Thanks. How do I set up such a database e.g. in a Docker/Singularity container for testing?

  2. tp2750 commented on Jun 6, 2019

    @tp2750

    Kerberos authentication works for me with RPostgres.

    > sessionInfo()
    R version 3.5.1 (2018-07-02)
    Platform: x86_64-pc-linux-gnu (64-bit)
    Running under: Ubuntu 16.04.5 LTS
    
    Matrix products: default
    BLAS: /usr/lib/openblas-base/libblas.so.3
    LAPACK: /usr/lib/libopenblasp-r0.2.18.so
    
    locale:
     [1] LC_CTYPE=en_DK.UTF-8       LC_NUMERIC=C               LC_TIME=en_DK.UTF-8        LC_COLLATE=en_DK.UTF-8    
     [5] LC_MONETARY=en_DK.UTF-8    LC_MESSAGES=en_DK.UTF-8    LC_PAPER=en_DK.UTF-8       LC_NAME=C                 
     [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_DK.UTF-8 LC_IDENTIFICATION=C       
    
    attached base packages:
    [1] stats     graphics  grDevices utils     datasets  methods   base     
    
    other attached packages:
    [1] RPostgres_1.1.1
    
    loaded via a namespace (and not attached):
     [1] bit_1.1-14           compiler_3.5.1       formatR_1.5          hms_0.4.2            futile.logger_1.4.3 
     [6] DBI_1.0.0            tools_3.5.1          lambda.r_1.2.3       yaml_2.2.0           Rcpp_1.0.1          
    [11] futile.options_1.0.1 bit64_0.9-7          blob_1.1.1           pkgconfig_2.0.2      rlang_0.3.4    
    
  3. gmonaie commented on Jun 6, 2019

    @gmonaie
    Author

    I still have the same issue. Could it be OS specific with drivers being bundled? I have the CRAN version of RPostgres installed from tgz binary.

    > library(RPostgres)
    > newdrv = RPostgres::Postgres()
    > newcon = dbConnect(drv=newdrv, port = 5432, 
    +                    host = 'sub.domain.com', dbname = 'mydatabase', user = 'myuser')
    Error in connection_create(names(opts), as.vector(opts)) : 
      GSSAPI authentication not supported
    > session_info('RPostgres')
    ─ Session info ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
     setting  value                       
     version  R version 3.5.2 (2018-12-20)
     os       macOS High Sierra 10.13.6   
     system   x86_64, darwin15.6.0        
     ui       RStudio                     
     language (EN)                        
     collate  en_US.UTF-8                 
     ctype    en_US.UTF-8                 
     tz       America/New_York            
     date     2019-06-06                  
    
    ─ Packages ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
     package     * version  date       lib source        
     assertthat    0.2.0    2017-04-11 [1] CRAN (R 3.5.0)
     BH            1.69.0-1 2019-01-07 [1] CRAN (R 3.5.2)
     bit           1.1-14   2018-05-29 [2] CRAN (R 3.5.0)
     bit64         0.9-7    2017-05-08 [2] CRAN (R 3.5.0)
     blob          1.1.1    2018-03-25 [1] CRAN (R 3.5.0)
     DBI         * 1.0.0    2018-05-02 [1] CRAN (R 3.5.0)
     hms           0.4.2    2018-03-10 [2] CRAN (R 3.5.0)
     magrittr    * 1.5      2014-11-22 [2] CRAN (R 3.5.0)
     pkgconfig     2.0.2    2018-08-16 [2] CRAN (R 3.5.0)
     plogr         0.2.0    2018-03-25 [2] CRAN (R 3.5.0)
     prettyunits   1.0.2    2015-07-13 [1] CRAN (R 3.5.0)
     Rcpp          1.0.0    2018-11-07 [1] CRAN (R 3.5.0)
     rlang         0.3.1    2019-01-08 [1] CRAN (R 3.5.2)
     RPostgres   * 1.1.1    2018-05-06 [1] CRAN (R 3.5.0)
     withr         2.1.2    2018-03-15 [1] CRAN (R 3.5.0)
    
  4. jeroen commented on Dec 17, 2019

    @jeroen
    Member

    It looks like the homebrew version of libpq that we use to build RPostGres does not have gssapi enabled. I'll try to get that fixed: Homebrew/homebrew-core#47954

  5. krlmlr commented on Dec 18, 2019

    @krlmlr
    Member

    RPostgres 1.2.0 is on CRAN now. Let me know if this already picks up the correct libpq, I can resubmit if necessary.

  6. jeroen commented on Dec 18, 2019

    @jeroen
    Member

    Yes it should pick up on the new libpq. We'll see by Friday if the binaries now work with GSS.

  7. jeroen commented on Dec 20, 2019

    @jeroen
    Member

    The new MacOS binaries for RPostgres are on cran. Can you test if authentication now works for you?

    > DBI::dbGetInfo(RPostgres::Postgres())
    $driver.version
    [1] ‘1.2.0’
    
    $client.version
    [1] ‘12.1’

    @dgrtwo

  8. dgrtwo commented on Dec 20, 2019

    @dgrtwo

    1.2.0 from CRAN now works perfectly for me! (I'd been having the same issue with Kerberos + the previous version).

  9. jeroen commented on Dec 20, 2019

    @jeroen
    Member

    Ok thanks for confirming.

  10. github-actions commented on Dec 20, 2020

    @github-actions
    Contributor

    This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

  11. locked and limited conversation to collaborators on Dec 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions