Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle new APIML unique cookie identifier #1734

Merged
merged 35 commits into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
18a4491
Allow for variable APIML token types
zFernand0 Jun 23, 2023
38d495a
prevent basepath requirement error on invalid credentials for zowe au…
zFernand0 Jun 26, 2023
f67b7ae
allow v2 logout with expired or invalid token
zFernand0 Jun 26, 2023
337b35f
make the list of acceptable responses more flexible
zFernand0 Jun 26, 2023
f6625d4
important: not throwing 401 errors on logout
zFernand0 Jun 30, 2023
2302683
fix other unit tests and make sure we go back to undefined for basepa…
zFernand0 Jun 30, 2023
17d4bc4
remove http401 error testing for logout
zFernand0 Jun 30, 2023
49f6ef4
update snapshots
zFernand0 Jun 30, 2023
20f8049
update changelog
zFernand0 Jun 30, 2023
2193a43
fix lint issue
zFernand0 Jul 11, 2023
2bb26c7
only set tokenType if undefined
zFernand0 Jul 18, 2023
362ea58
prevent new 'base' profile from being created if there is an active o…
zFernand0 Jul 20, 2023
3abf005
revert basepath regardless of the statusCode and clear creds as soon …
zFernand0 Jul 20, 2023
0bdf77f
fix unit tests and lint issues
zFernand0 Jul 20, 2023
5fe696b
allow for 401 to be thrown
zFernand0 Jul 24, 2023
2c6547f
simplify activeBaseProfile check
zFernand0 Jul 25, 2023
375c24a
update imperative version to allow builds to run
zFernand0 Jul 26, 2023
0a6afce
Merge branch 'master' of https://github.com/zowe/zowe-cli into imp-979
zFernand0 Jul 26, 2023
278408f
fix integration test snapshot
zFernand0 Jul 26, 2023
ad4b7e8
add unit tests for logout
zFernand0 Jul 26, 2023
b5cbee9
address gh code scanning comments
zFernand0 Jul 26, 2023
4239313
update changelog
zFernand0 Jul 26, 2023
a62e4b4
make script executable files
zFernand0 Jul 27, 2023
992691b
address some system test issues
zFernand0 Jul 28, 2023
c2d5a70
change wording to fix #1341
zFernand0 Jul 28, 2023
0dab8dc
address PR comments and lint issues
zFernand0 Jul 28, 2023
e90ff60
Merge branch 'master' into imp-979
zFernand0 Jul 31, 2023
fd8abf0
Merge branch 'master' into imp-979
zFernand0 Jul 31, 2023
7a26ab9
add note and commented code-block for clarity
zFernand0 Aug 1, 2023
096a1f4
revert basePath with empty string after login
zFernand0 Aug 1, 2023
3c9b388
test cleanup and fix reporting bug on created vs modified for base pr…
zFernand0 Aug 1, 2023
a7b29d6
Merge branch 'master' of https://github.com/zowe/zowe-cli into imp-979
zFernand0 Aug 1, 2023
f1660b8
remove hacky basepath workaround
zFernand0 Aug 1, 2023
dcf2083
Merge branch 'master' into imp-979
zFernand0 Aug 3, 2023
4a9056f
Merge branch 'master' of https://github.com/zowe/zowe-cli into imp-979
zFernand0 Aug 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion __tests__/__packages__/cli-test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@types/js-yaml": "^4.0.0",
"@types/node": "^14.18.28",
"@types/uuid": "^8.3.0",
"@zowe/imperative": "5.15.1",
"@zowe/imperative": "5.16.0",
"eslint": "^8.22.0",
"typescript": "^4.0.0"
},
Expand Down
62 changes: 31 additions & 31 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"prepare": "husky install"
},
"dependencies": {
"@zowe/imperative": "5.15.1",
"@zowe/imperative": "5.16.0",
"@zowe/perf-timing": "1.0.7"
},
"devDependencies": {
Expand Down
9 changes: 9 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@

All notable changes to the Zowe CLI package will be documented in this file.

## Recent Changes

- Enhancement: Updated the Imperative Framework to add support for unique cookie identifiers from API ML. [#1734](https://github.com/zowe/zowe-cli/pull/1734)
- Enhancement: Added support for mutliple `zowe auth login apiml` operations on a single `zowe config secure` call. [#1734](https://github.com/zowe/zowe-cli/pull/1734)
- BugFix: Allowed `logout` operations with invalid and/or expired tokens. [#1734](https://github.com/zowe/zowe-cli/pull/1734)
- BugFix: Prevented misleading `basePath error` when credentials are invalid. [#1734](https://github.com/zowe/zowe-cli/pull/1734)
- BugFix: Add check for invalid block size when creating a sequential dataset. [#1439](https://github.com/zowe/zowe-cli/issues/1439)

## `7.17.0`

- Enhancement: Created zos-files edit commands to edit a dataset or uss file locally [PR #1672](https://github.com/zowe/zowe-cli/pull/1672)

## `7.16.5`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ exports[`auth login/logout apiml help should display the logout help 1`] = `
The type of token to get and use for the API. Omit this option to use the
default token type, which is provided by 'zowe auth login'.

Allowed values: apimlAuthenticationToken, jwtToken, LtpaToken2
Allowed values: ^apimlAuthenticationToken.*, jwtToken, LtpaToken2
t1m0thyj marked this conversation as resolved.
Show resolved Hide resolved

--token-value | --tv (string)

Expand Down Expand Up @@ -206,8 +206,8 @@ exports[`auth login/logout apiml help should display the logout help 1`] = `
\\"success\\": true,
\\"exitCode\\": 0,
\\"message\\": \\"The help was constructed for command: apiml.\\",
\\"stdout\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n apiml\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Log out of the Zowe API Mediation Layer authentication service and revoke the\\\\n token so it can no longer authenticate. Also remove the token from the default\\\\n base profile, if it is stored on disk.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe auth logout apiml [options]\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n Host name of service on the mainframe.\\\\n\\\\n --port | -P (number)\\\\n\\\\n Port number of service on the mainframe.\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n Allowed values: apimlAuthenticationToken, jwtToken, LtpaToken2\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Log out of an API ML instance to revoke the token that was\\\\n in use and remove it from your base profile:\\\\n\\\\n $ zowe auth logout apiml\\\\n\\\\n - Log out of an API ML instance to revoke a token that was\\\\n not stored in a profile:\\\\n\\\\n $ zowe auth logout apiml --token-value <token>\\\\n\\\\n\\",
\\"stdout\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n apiml\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Log out of the Zowe API Mediation Layer authentication service and revoke the\\\\n token so it can no longer authenticate. Also remove the token from the default\\\\n base profile, if it is stored on disk.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe auth logout apiml [options]\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n Host name of service on the mainframe.\\\\n\\\\n --port | -P (number)\\\\n\\\\n Port number of service on the mainframe.\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n Allowed values: ^apimlAuthenticationToken.*, jwtToken, LtpaToken2\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Log out of an API ML instance to revoke the token that was\\\\n in use and remove it from your base profile:\\\\n\\\\n $ zowe auth logout apiml\\\\n\\\\n - Log out of an API ML instance to revoke a token that was\\\\n not stored in a profile:\\\\n\\\\n $ zowe auth logout apiml --token-value <token>\\\\n\\\\n\\",
\\"stderr\\": \\"\\",
\\"data\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n apiml\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Log out of the Zowe API Mediation Layer authentication service and revoke the\\\\n token so it can no longer authenticate. Also remove the token from the default\\\\n base profile, if it is stored on disk.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe auth logout apiml [options]\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n Host name of service on the mainframe.\\\\n\\\\n --port | -P (number)\\\\n\\\\n Port number of service on the mainframe.\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n Allowed values: apimlAuthenticationToken, jwtToken, LtpaToken2\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Log out of an API ML instance to revoke the token that was\\\\n in use and remove it from your base profile:\\\\n\\\\n $ zowe auth logout apiml\\\\n\\\\n - Log out of an API ML instance to revoke a token that was\\\\n not stored in a profile:\\\\n\\\\n $ zowe auth logout apiml --token-value <token>\\\\n\\\\n\\"
\\"data\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n apiml\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Log out of the Zowe API Mediation Layer authentication service and revoke the\\\\n token so it can no longer authenticate. Also remove the token from the default\\\\n base profile, if it is stored on disk.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe auth logout apiml [options]\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n Host name of service on the mainframe.\\\\n\\\\n --port | -P (number)\\\\n\\\\n Port number of service on the mainframe.\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n Allowed values: ^apimlAuthenticationToken.*, jwtToken, LtpaToken2\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Log out of an API ML instance to revoke the token that was\\\\n in use and remove it from your base profile:\\\\n\\\\n $ zowe auth logout apiml\\\\n\\\\n - Log out of an API ML instance to revoke a token that was\\\\n not stored in a profile:\\\\n\\\\n $ zowe auth logout apiml --token-value <token>\\\\n\\\\n\\"
}"
`;
Loading