Skip to content

Commit

Permalink
Zowe Suite v1.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zowe-robot authored Jun 22, 2020
2 parents a12c018 + 48c0f71 commit e9ca6c9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions lib/auth-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ const acceptAllHandler = {
}

class AuthPluginContext {
constructor(plugin) {
constructor(plugin, tlsOptions) {
this.logger = global.COM_RS_COMMON_LOGGER.makeComponentLogger(plugin.identifier);
this.tlsOptions = tlsOptions;
}
}

Expand Down Expand Up @@ -83,15 +84,15 @@ AuthManager.prototype = {
},


loadAuthenticators: Promise.coroutine(function*(config) {
loadAuthenticators: Promise.coroutine(function*(config, tlsOptions) {
let plugin;
while ((plugin = this.pendingPlugins.pop()) !== undefined) {
try {
const authenticationHandler = yield plugin.authenticationModule(
plugin,
this.configuration,
config,
new AuthPluginContext(plugin));
new AuthPluginContext(plugin, tlsOptions));
// at this time we should have resolved plugin configuration to have a
// nice list of info about what we are using to authenticate against
if ((typeof authenticationHandler.authenticate) !== 'function') {
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ Server.prototype = {
}
}, installLogger));
this.pluginLoader.loadPlugins();
yield this.authManager.loadAuthenticators(this.userConfig);
yield this.authManager.loadAuthenticators(this.userConfig, Object.assign({},this.webServer.getTlsOptions()));
this.authManager.validateAuthPluginList();
this.processManager.addCleanupFunction(function() {
this.webServer.close();
Expand Down
2 changes: 1 addition & 1 deletion plugins/sso-auth/lib/apimlHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class ApimlHandler {
} else {
this.httpsAgent = new https.Agent({
rejectUnauthorized: true,
ca: readUtf8FilesToArray(serverConf.node.https.certificateAuthorities)
ca: context.tlsOptions.ca
});
}
}
Expand Down

0 comments on commit e9ca6c9

Please sign in to comment.