Let's imagine I have to connect to postgres using kerberos mupltiple times in one application. Recently kerberos support has been added to pgconn and pgx packages, but there is one limitation to that. We need to define a gss provider globally, like so:
func init() {
pgconn.RegisterGSSProvider(func() (pgconn.GSS, error) {
return gopgkrb5.NewGSS()
})
}
If I want to use different TGT's (or keytabs, doesn't matter) for multiple connections, it pretty much seems impossible now. What should I do?