Skip to content

Commit

Permalink
Zowe Suite v1.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zowe-robot authored Aug 27, 2020
2 parents 78496b8 + 105c6ce commit cccdacf
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to the Zlux Server Framework package will be documented in this file.
This repo is part of the app-server Zowe Component, and the change logs here may appear on Zowe.org in that section.

## 1.15.0

- Bugfix: Fixed desktop prompting for session renewal and failure due to sso-auth plugin incorrectly stating that session refresh is possible when using Zowe SSO. In reality, the SSO tokens are non-renewable with expiration after several hours, leading to a prompt to re-authenticate to continue using the Desktop. This bugfix should now allow for that behavior.

## 1.14.0

- Bugfix: Plugin default server config could not exist in plugins own directory, and had to exist in the instance
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ The js folder contains the core bootstrapping and routing of the server, while t
For more information about how to make use of this server framework, such as how to build dataservices or Apps, checkout the [zLUX wiki](https://github.com/zowe/zlux/wiki)
For a ready-to-use server built on this framework, try out the [zlux-app-server](https://github.com/zowe/zlux-app-server), which includes a README on how to set it up.

### Tests
This repository contains some tests with the `/test` folder. Some tests will contain a package.json that has individual script commands to test them. Others, it is recommended to run individual tests with,
```
node <test name> <optional args>
```

This program and the accompanying materials are
made available under the terms of the Eclipse Public License v2.0 which accompanies
Expand Down
2 changes: 1 addition & 1 deletion plugins/sso-auth/lib/ssoAuth.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function SsoAuthenticator(pluginDef, pluginConf, serverConf, context) {
"canGetStatus": true,
"canGetCategories": true,
//when zosmf cookie becomes invalid, we can purge zss cookie even if it is valid to be consistent
"canRefresh": this.usingZss ? true : false,
"canRefresh": (this.usingZss && !this.usingSso) ? true : false,
"canAuthenticate": true,
"canAuthorize": true,
"canLogout": true,
Expand Down
58 changes: 58 additions & 0 deletions test/docker/appServerHandshake.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
This program and the accompanying materials are
made available under the terms of the Eclipse Public License v2.0 which accompanies
this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
SPDX-License-Identifier: EPL-2.0
Copyright Contributors to the Zowe Project.
*/

const https = require('https');
const argParser = require('../../utils/argumentParser');
const args = [
new argParser.CLIArgument('host', 'h', argParser.constants.ARG_TYPE_VALUE),
new argParser.CLIArgument('port', 'o', argParser.constants.ARG_TYPE_VALUE),
]
const commandArgs = process.argv.slice(2);
const argumentParser = argParser.createParser(args);
const userInput = argumentParser.parse(commandArgs);

if (!userInput.port || !userInput.host) {
console.warn(`How to use: node ${__filename} -h <host of server> -o <port of server>`);
} else {
const url = `https://${userInput.host}:${userInput.port}/plugins/`;
const ZLUX_BOOTSTRAP_IDENTIFIER = 'org.zowe.zlux.bootstrap';

process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0; // If we don't turn this off, Node will complain about self signed certificates

https.get(url, (resp) => {
let data = '';

resp.on('data', (chunk) => {
data = data + chunk;
});
resp.on('end', () => {
try { // Simple handshake checks that 1. server is running 2. server has 'org.zowe.zlux.bootstrap' plugin
let pluginDefinitions = JSON.parse(data).pluginDefinitions;
console.log(typeof plugins);
for (var plugin in pluginDefinitions) {
if (pluginDefinitions[plugin].identifier == ZLUX_BOOTSTRAP_IDENTIFIER) {
console.log("Test passed!");
process.exit(0);
}
}
console.log("Test failed: " + ZLUX_BOOTSTRAP_IDENTIFIER + " was not found.");
process.exit(1);
}
catch(err) {
console.log("Test failed: ", err);
process.exit(1);
}
});
}).on("error", (err) => {
console.log("Test failed: ", err.message);
process.exit(1);
});
}

0 comments on commit cccdacf

Please sign in to comment.