Repository: calcite-avatica-go Updated Branches: refs/heads/upstream-gokrb5-api-breaks [created] 1cc857374
Get session from realm and pass it to EnableAutoSessionRenewal() as required in gokrb5 1.2.0 Project: http://git-wip-us.apache.org/repos/asf/calcite-avatica-go/repo Commit: http://git-wip-us.apache.org/repos/asf/calcite-avatica-go/commit/1cc85737 Tree: http://git-wip-us.apache.org/repos/asf/calcite-avatica-go/tree/1cc85737 Diff: http://git-wip-us.apache.org/repos/asf/calcite-avatica-go/diff/1cc85737 Branch: refs/heads/upstream-gokrb5-api-breaks Commit: 1cc857374716a3cff5f6028d74da207f7afbc233 Parents: c907f35 Author: Francis Chuang <[email protected]> Authored: Wed Oct 18 13:17:05 2017 +1100 Committer: Francis Chuang <[email protected]> Committed: Wed Oct 18 13:37:10 2017 +1100 ---------------------------------------------------------------------- http_client.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/calcite-avatica-go/blob/1cc85737/http_client.go ---------------------------------------------------------------------- diff --git a/http_client.go b/http_client.go index 070986f..6aa75bf 100644 --- a/http_client.go +++ b/http_client.go @@ -119,7 +119,13 @@ func NewHTTPClient(host string, authenticationConf httpClientAuthConfig) (*httpC return nil, fmt.Errorf("error performing kerberos login with keytab: %s", err) } - kc.EnableAutoSessionRenewal() + session, err := kc.GetSessionFromRealm(authenticationConf.principal.realm) + + if err != nil { + return nil, fmt.Errorf("error getting session from realm name: %s", err) + } + + kc.EnableAutoSessionRenewal(session) c.kerberosClient = kc }
