Ensure that while connecting to the server using SSPI login, it should not prompt for the password. Fixes #5776

This commit is contained in:
Khushboo Vashi 2021-05-05 11:40:48 +05:30 committed by Akshay Joshi
parent 649ca2eeac
commit b30ec71098
8 changed files with 39 additions and 10 deletions

View File

@ -21,6 +21,7 @@ Bug fixes
| `Issue #4436 <https://redmine.postgresql.org/issues/4436>`_ - Fixed an issue where drag and drop object is not correct in codemirror for properties dialog. | `Issue #4436 <https://redmine.postgresql.org/issues/4436>`_ - Fixed an issue where drag and drop object is not correct in codemirror for properties dialog.
| `Issue #5555 <https://redmine.postgresql.org/issues/5555>`_ - Fixed an issue where data is displayed in the wrong order when executing the query repeatedly. | `Issue #5555 <https://redmine.postgresql.org/issues/5555>`_ - Fixed an issue where data is displayed in the wrong order when executing the query repeatedly.
| `Issue #5776 <https://redmine.postgresql.org/issues/5776>`_ - Ensure that while connecting to the server using SSPI login, it should not prompt for the password.
| `Issue #6329 <https://redmine.postgresql.org/issues/6329>`_ - Fixed an issue where the wrong SQL is showing for the child partition tables. | `Issue #6329 <https://redmine.postgresql.org/issues/6329>`_ - Fixed an issue where the wrong SQL is showing for the child partition tables.
| `Issue #6341 <https://redmine.postgresql.org/issues/6341>`_ - Fixed an issue where CSV download quotes the numeric columns. | `Issue #6341 <https://redmine.postgresql.org/issues/6341>`_ - Fixed an issue where CSV download quotes the numeric columns.
| `Issue #6355 <https://redmine.postgresql.org/issues/6355>`_ - Ensure that pgAdmin should not allow opening external files that are dragged into it. | `Issue #6355 <https://redmine.postgresql.org/issues/6355>`_ - Ensure that pgAdmin should not allow opening external files that are dragged into it.

View File

@ -14,12 +14,11 @@ define('pgadmin.node.server', [
'pgadmin.alertifyjs', 'pgadmin.backform', 'pgadmin.alertifyjs', 'pgadmin.backform',
'sources/browser/server_groups/servers/model_validation', 'sources/browser/server_groups/servers/model_validation',
'pgadmin.authenticate.kerberos', 'pgadmin.authenticate.kerberos',
'pgadmin.browser.constants',
'pgadmin.browser.server.privilege', 'pgadmin.browser.server.privilege',
], function( ], function(
gettext, url_for, $, _, Backbone, pgAdmin, pgBrowser, gettext, url_for, $, _, Backbone, pgAdmin, pgBrowser,
supported_servers, current_user, Alertify, Backform, supported_servers, current_user, Alertify, Backform,
modelValidation, Kerberos, pgConst, modelValidation, Kerberos,
) { ) {
if (!pgBrowser.Nodes['server']) { if (!pgBrowser.Nodes['server']) {
@ -910,11 +909,7 @@ define('pgadmin.node.server', [
id: 'kerberos_conn', label: gettext('Kerberos authentication?'), type: 'switch', id: 'kerberos_conn', label: gettext('Kerberos authentication?'), type: 'switch',
group: gettext('Connection'), 'options': { group: gettext('Connection'), 'options': {
'onText': gettext('True'), 'offText': gettext('False'), 'size': 'mini', 'onText': gettext('True'), 'offText': gettext('False'), 'size': 'mini',
}, disabled: function() { }
if (current_user['current_auth_source'] != pgConst['KERBEROS'])
return true;
return false;
},
},{ },{
id: 'password', label: gettext('Password'), type: 'password', maxlength: null, id: 'password', label: gettext('Password'), type: 'password', maxlength: null,
group: gettext('Connection'), control: 'input', mode: ['create'], group: gettext('Connection'), control: 'input', mode: ['create'],

View File

@ -169,7 +169,7 @@ export class BackupDialogWrapper extends DialogWrapper {
this.setExtraParameters(selectedTreeNode, treeInfo); this.setExtraParameters(selectedTreeNode, treeInfo);
let backupDate = this.view.model.toJSON(); let backupDate = this.view.model.toJSON();
if(userInfo['auth_sources'] == 'KERBEROS' && (backupDate.type == 'globals' || backupDate.type == 'server')) { if(userInfo['current_auth_source'] == 'KERBEROS' && (backupDate.type == 'globals' || backupDate.type == 'server')) {
let newPromise = fetch_ticket_lifetime(); let newPromise = fetch_ticket_lifetime();
newPromise.then( newPromise.then(
function(lifetime) { function(lifetime) {

View File

@ -46,6 +46,7 @@ describe('BackupDialogWrapper', () => {
}, },
keyboardNavigation: jasmine.createSpyObj('keyboardNavigation', ['getDialogTabNavigator']), keyboardNavigation: jasmine.createSpyObj('keyboardNavigation', ['getDialogTabNavigator']),
}; };
noDataNode = pgBrowser.treeMenu.addNewNode('level1.1', undefined, [{id: 'level1'}]); noDataNode = pgBrowser.treeMenu.addNewNode('level1.1', undefined, [{id: 'level1'}]);
serverTreeNode = pgBrowser.treeMenu.addNewNode('level2.1', { serverTreeNode = pgBrowser.treeMenu.addNewNode('level2.1', {
_type: 'server', _type: 'server',

View File

@ -20,7 +20,6 @@ describe('GlobalServerBackupDialog', () => {
let alertifySpy; let alertifySpy;
let backupModelSpy; let backupModelSpy;
let rootNode; let rootNode;
let serverTreeNode; let serverTreeNode;
let ppasServerTreeNode; let ppasServerTreeNode;
@ -74,7 +73,6 @@ describe('GlobalServerBackupDialog', () => {
alertifySpy, alertifySpy,
backupModelSpy backupModelSpy
); );
pgBrowser.get_preference = jasmine.createSpy('get_preferences'); pgBrowser.get_preference = jasmine.createSpy('get_preferences');
}); });

View File

@ -0,0 +1,17 @@
//////////////////////////////////////////////////////////////////////////
//
// pgAdmin 4 - PostgreSQL Tools
//
// Copyright (C) 2013 - 2021, The pgAdmin Development Team
// This software is released under the PostgreSQL Licence
//
//////////////////////////////////////////////////////////////////////////
define(function () {
return {
'INTERNAL': 'internal',
'LDAP': 'ldap',
'KERBEROS': 'kerberos'
};
});

View File

@ -0,0 +1,15 @@
//////////////////////////////////////////////////////////////////////////
//
// pgAdmin 4 - PostgreSQL Tools
//
// Copyright (C) 2013 - 2021, The pgAdmin Development Team
// This software is released under the PostgreSQL Licence
//
//////////////////////////////////////////////////////////////////////////
define(function () {
return {
'current_auth_source': 'internal'
};
});

View File

@ -179,6 +179,8 @@ module.exports = {
'pgadmin.tools.erd': path.join(__dirname, './pgadmin/tools/erd/static/js'), 'pgadmin.tools.erd': path.join(__dirname, './pgadmin/tools/erd/static/js'),
'bundled_codemirror': path.join(__dirname, './pgadmin/static/bundle/codemirror'), 'bundled_codemirror': path.join(__dirname, './pgadmin/static/bundle/codemirror'),
'tools': path.join(__dirname, './pgadmin/tools/'), 'tools': path.join(__dirname, './pgadmin/tools/'),
'pgadmin.user_management.current_user': regressionDir + '/javascript/fake_current_user',
'pgadmin.browser.constants': regressionDir + '/javascript/fake_constants',
}, },
}, },
}; };