Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
feat: Secrets SDK as default credential manager
Browse files Browse the repository at this point in the history
Signed-off-by: Trae Yelovich <[email protected]>
  • Loading branch information
traeok committed Sep 7, 2023
1 parent 22218d8 commit eb14c13
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 665 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

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

## `4.19.0`

- Enhancement: Replaced use of node-keytar with the new keyring module from @zowe/secrets-for-zowe-sdk. [zowe-cli#1622](https://github.com/zowe/zowe-cli/issues/1622)

## `4.18.17`

- BugFix: Updated semver transitive dependency for technical currency.
Expand Down
2 changes: 1 addition & 1 deletion __tests__/__integration__/imperative/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"dependencies": {
"@zowe/imperative": "../../..",
"keytar": "^7.1.0"
"@zowe/secrets-for-zowe-sdk": "^7.18.4"
},
"engines": {
"node": ">=8.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ describe("Cli Profile Manager", () => {

describe("Missing keytar installation", () => {
const profileName = "missing-keytar";
const keyTarDir = path.join(__dirname, "../../../../node_modules/keytar");
const renamedKeyTarDir = path.join(__dirname, "../../../../node_modules/keytar-renamed");
const keyTarDir = path.join(__dirname, "../../../../node_modules/@zowe/secrets-for-zowe-sdk");
const renamedKeyTarDir = path.join(__dirname, "../../../../node_modules/@zowe/zowe-for-secrets-sdk");

const renameKeyTar = () => {
if (fs.existsSync(keyTarDir)) {
Expand All @@ -264,7 +264,7 @@ describe("Cli Profile Manager", () => {
const result = T.executeTestCLICommand(cliBin, this, cmd.split(" "));
expect(result.stdout).toEqual("");
expect(result.stderr).toContain(profileName);
expect(result.stderr).toContain("Keytar not Installed");
expect(result.stderr).toContain("Secrets SDK not installed");
});

it("should fail if keytar is not loaded on using profile handler", () => {
Expand All @@ -279,7 +279,7 @@ describe("Cli Profile Manager", () => {
cmd = `display-profile`;
result = T.executeTestCLICommand(cliBin, this, cmd.split(" "));
expect(result.stderr).toContain("Command Preparation Failed");
expect(result.stderr).toContain("Keytar not Installed");
expect(result.stderr).toContain("Secrets SDK not installed");
});

it("should fail if keytar is not loaded on profiles delete", () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/src/packages/profiles/test_cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "test-cli-for-profiles",
"dependencies": {
"keytar": "rock-out-with-a-keytar"
"@zowe/secrets-for-zowe-sdk": "plaintext"
}
}
Loading

0 comments on commit eb14c13

Please sign in to comment.