File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,6 @@ import { Callback, ns } from '../../utils';
13
13
import { AuthContext , AuthProvider } from './auth_provider' ;
14
14
15
15
type MechanismProperties = {
16
- // TODO: Remove in 5.0
17
- gssapiCanonicalizeHostName ?: boolean ;
18
16
CANONICALIZE_HOST_NAME ?: boolean ;
19
17
SERVICE_NAME ?: string ;
20
18
SERVICE_REALM ?: string ;
@@ -176,10 +174,7 @@ function performGssapiCanonicalizeHostName(
176
174
mechanismProperties : MechanismProperties ,
177
175
callback : Callback < string >
178
176
) : void {
179
- if (
180
- ! mechanismProperties . gssapiCanonicalizeHostName &&
181
- ! mechanismProperties . CANONICALIZE_HOST_NAME
182
- ) return callback ( undefined , host ) ;
177
+ if ( ! mechanismProperties . CANONICALIZE_HOST_NAME ) return callback ( undefined , host ) ;
183
178
184
179
// Attempt to resolve the host name
185
180
dns . resolveCname ( host , ( err , r ) => {
Original file line number Diff line number Diff line change @@ -51,7 +51,17 @@ describe('Kerberos', function () {
51
51
} ) ;
52
52
} ) ;
53
53
54
- it ( 'validate that SERVICE_REALM and CANONICALIZE_HOST_NAME can be passed in' , function ( done ) {
54
+ it ( 'validate that CANONICALIZE_HOST_NAME can be passed in' , function ( done ) {
55
+ const client = new MongoClient (
56
+ `${ krb5Uri } &authMechanismProperties=SERVICE_NAME:mongodb,CANONICALIZE_HOST_NAME:true&maxPoolSize=1`
57
+ ) ;
58
+ client . connect ( function ( err , client ) {
59
+ expect ( err ) . to . not . exist ;
60
+ verifyKerberosAuthentication ( client , done ) ;
61
+ } ) ;
62
+ } ) ;
63
+
64
+ it . skip ( 'validate that SERVICE_REALM and CANONICALIZE_HOST_NAME can be passed in' , function ( done ) {
55
65
const client = new MongoClient (
56
66
`${ krb5Uri } &authMechanismProperties=SERVICE_NAME:mongodb,CANONICALIZE_HOST_NAME:false,SERVICE_REALM:windows&maxPoolSize=1`
57
67
) ;
You can’t perform that action at this time.
0 commit comments