@sap_oss/wdio-qmate-service 2.13.2 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +2 -1
- package/lib/reuse/modules/util/Util.d.ts +5 -1
- package/lib/reuse/modules/util/Util.js.map +1 -1
- package/lib/reuse/modules/util/data.d.ts +14 -2
- package/lib/reuse/modules/util/data.js +21 -9
- package/lib/reuse/modules/util/data.js.map +1 -1
- package/lib/scripts/hooks/utils/decryption.d.ts +0 -17
- package/lib/scripts/hooks/utils/decryption.js +24 -121
- package/lib/scripts/hooks/utils/decryption.js.map +1 -1
- package/package.json +3 -2
- package/packages/qcrypt/dist/classes/Decrypter.d.ts +41 -0
- package/packages/qcrypt/dist/classes/Decrypter.js +172 -0
- package/packages/qcrypt/dist/classes/Encrypter.d.ts +49 -0
- package/packages/qcrypt/dist/classes/Encrypter.js +164 -0
- package/packages/qcrypt/dist/classes/KeyGenerator.d.ts +19 -0
- package/packages/qcrypt/dist/classes/KeyGenerator.js +53 -0
- package/packages/qcrypt/dist/classes/helper/ErrorHandler.d.ts +11 -0
- package/packages/qcrypt/dist/classes/helper/ErrorHandler.js +69 -0
- package/packages/qcrypt/dist/classes/helper/Util.d.ts +69 -0
- package/packages/qcrypt/dist/classes/helper/Util.js +126 -0
- package/packages/qcrypt/dist/constants/common.d.ts +12 -0
- package/packages/qcrypt/dist/constants/common.js +15 -0
- package/packages/qcrypt/dist/index.d.ts +4 -0
- package/packages/qcrypt/dist/index.js +12 -0
- package/packages/qcrypt/dist/keys/public.key +8 -0
- package/packages/qcrypt/dist/types/common.d.ts +27 -0
- package/packages/qcrypt/dist/types/common.js +2 -0
- package/packages/qcrypt/package.json +8 -0
- package/test/reuse/util/data/data/decrypt.base64.secure.json +3 -0
- package/test/reuse/util/data/data/decrypt.noRepo.secure.json +3 -0
- package/test/reuse/util/data/data/decrypt.secure.json +3 -0
- package/test/reuse/util/data/data/{test.secure.json → getSecureData.secure.json} +1 -1
- package/test/reuse/util/data/decrypt.spec.js +57 -4
- package/test/reuse/util/data/{getSecureData.spec.js → getSecureData1.spec.js} +11 -15
- package/test/reuse/util/data/getSecureData2.spec.js +11 -0
- package/test/reuse/util/data/test.data.privacy.conf.js +5 -2
- /package/test/reuse/util/data/customSourceData/{test.secure.json → getSecureData.secure.json} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
{
|
|
2
|
+
"password": "YTFjMWEwN2EwMTE4Y2EwZDQ5ZWJlNGZlZjNiYjM2ZWI2YmNiYmE0NGI4YzRkNDZhZGFlODc0OTM3ZjM4ODRmYWM5ZDM4Y2E5NjBlZjk5MTEyMTVjNDNhZThmZDY4MzlkOGNjYmY3ZWI1ZWI1MTZjNzY2YWNiMGJhZmI5NjU3ODg1OGVlNmFkNTk0MDM1NzY5ZTFhYzNiMDc1MTQ3NWEwOTZjZGRhNDExNmFkOTMzMzI1OWY0YTRhOGE1ZmUwZTQwMjJjNzVlNzc1ZjE5ZGFhNzc3ZjE4OTZkOWIzNWE1NzMxZTVjNGMzN2ZmYWZlNmQyN2YzNmRlMjhmZTA5NDQwZDU3ZjMyNjI4YTJhMTQ5MmEzZTlhNWViZDZmMTUxZGY1ODc0YjM4NTBmNGJlZmJhNTliOGE4MGNiMjJhNTkzZDJhYWZlMTI5Yjk0NmQ1MDM5ODFhYjVlMGRiN2ZlMTM4OTFlNTcwZTAwOWVjZjljYTVlOTdjNjJjOWE0OTRiNjMxZjA4ZGMwYjIxOWZkOTMzYjJhN2M3MGViYTk2YTRiM2Y4NzUwYzQyOGQxNTNiZDljMjUzMDk2MTM3MDg5NmEzZGJlMDYzMzc1YjYxMzc0NmViMmNlODFiMThiYWVhM2Y5OTFjZDY2MWZhY2UxNjFhZGFjZmFhNmRhYmM3M2FlNzAyYjMwZGUwNmJjMWYxYTYzMDA4ZjMyMTc3NDYyYTVhZTdhNzZmMWRkNTcyNTllZGE4YjczNDgxZjMwYzJjMDkwOGNhZWMxZWUwMmE2MzQyNzkyOGM0ZGEzNWYzMTgwMWNlMmFiZWY4ZjIzNWFhYzg4ZjNlZDg5OWFhOGFmN2FhM2IxM2U0NmY1NDBkZDVhMmExMjA2NmZiNDI3Yjg0ZTRhNTcwMmE2NGNhYzhlMjhlZTlhOTA2Mzc2ZjJkMDU1MTU="
|
|
3
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
{
|
|
2
|
+
"password": "b27e2f1ffc26289d5d088068c6c1e3a8641dc9d2d285ba1376c9d3b651401d1e4cb007df7fc992cdb5d85637c8a1a1252c27ee8c5755fc543b10d8683e88c2eb0fe698c58a03b53275fbf2bad4964938500817602446b23b4dbf4d7f79057abbbcf437075dec3b89ff2a235041de3aad625250cdee723d909cdb0a37e7afcbfd459cdb1e33b6ae0a745b3ddded56292f896e88459b2cb50e9af9effd584d98ca85bf050d0a5aaf1918fff61db187cc97b0fb72410b9411139ebf5b47ba8338c7606768517bab81f4c6f0aa18d5c2c9b3099839935c65c50a1835b265b2b5ae1f46ced68a96f127f09b13ab207a574ae87de4f216ac12b52890751dcab38d7e8a94fb832be3ad8dd5356cf276c57f7fa0b047e1b263b49b1521c77895bc7c8a7b5f8f32cb2fee906ca33a340c898e43f3e5f0a9ad12f8eea7b4e5d593b17a0737848e01ef4028537ee47748cc76b674ce34d440c56e92583036fe97be71284cb9"
|
|
3
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
{
|
|
2
|
+
"password": "b1512310be1b4ae516a92bab1f857fc6018abe6e8199622db77a621b21ab1d7b0aeede946829ad6d46ec4d8f349e0a27452abe8fd0f7f035a309627e80a066a400ad06456ae6e6202287c7259b5703e8df768e76708c0f8494c2245eee5a841e1ab4ecd909347561cb92eba4ff53f7e288a31d295f475b1a6a00b804090d7bc15eb2108f6ce842fdee574d95c8fa562f4a927aaaea77c5eaf66330bfcb6445ee55c58815d30eb94845a19f3080e89a96cb9fcacfc51a1043dff1a99086d3be86e4529e9ddd381086a167703d5bff19e3060fec0e59b6a2d3d383c731bff89e26cc322d5436c5f654aa4df99977c770580220cad7075fc786a5d6310e49881b8ee9e3614339ce3d7f991d801f6e469ebff38cbda7fa479e6949a71580c8cd53816f72765dd0fe15feeab30424e950b37b8cfa0900d36295208b900d0923ac9b99f8bd5707a6095bdb4c995286787dc3fa058c462f041879061afd5157a207eca7"
|
|
3
|
+
}
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
"DUMMY310be1b4ae516a92bab1f857fc6018abe6e8199622db77a621b21ab1d7b0aeede946829ad6d46ec4d8f349e0a27452abe8fd0f7f035a309627e80a066a400ad06456ae6e6202287c7259b5703e8df768e76708c0f8494c2245eee5a841e1ab4ecd909347561cb92eba4ff53f7e288a31d295f475b1a6a00b804090d7bc15eb2108f6ce842fdee574d95c8fa562f4a927aaaea77c5eaf66330bfcb6445ee55c58815d30eb94845a19f3080e89a96cb9fcacfc51a1043dff1a99086d3be86e4529e9ddd381086a167703d5bff19e3060fec0e59b6a2d3d383c731bff89e26cc322d5436c5f654aa4df99977c770580220cad7075fc786a5d6310e49881b8ee9e3614339ce3d7f991d801f6e469ebff38cbda7fa479e6949a71580c8cd53816f72765dd0fe15feeab30424e950b37b8cfa0900d36295208b900d0923ac9b99f8bd5707a6095bdb4c995286787dc3fa058c462f041879061afd5157a207eca7",
|
|
13
13
|
"b1512310be1b4ae516a92bab1f857fc6018abe6e8199622db77a621b21ab1d7b0aeede946829ad6d46ec4d8f349e0a27452abe8fd0f7f035a309627e80a066a400ad06456ae6e6202287c7259b5703e8df768e76708c0f8494c2245eee5a841e1ab4ecd909347561cb92eba4ff53f7e288a31d295f475b1a6a00b804090d7bc15eb2108f6ce842fdee574d95c8fa562f4a927aaaea77c5eaf66330bfcb6445ee55c58815d30eb94845a19f3080e89a96cb9fcacfc51a1043dff1a99086d3be86e4529e9ddd381086a167703d5bff19e3060fec0e59b6a2d3d383c731bff89e26cc322d5436c5f654aa4df99977c770580220cad7075fc786a5d6310e49881b8ee9e3614339ce3d7f991d801f6e469ebff38cbda7fa479e6949a71580c8cd53816f72765dd0fe15feeab30424e950b37b8cfa0900d36295208b900d0923ac9b99f8bd5707a6095bdb4c995286787dc3fa058c462f041879061afd5157a207eca7"
|
|
14
14
|
]
|
|
15
|
-
}
|
|
15
|
+
}
|
|
@@ -1,15 +1,68 @@
|
|
|
1
|
-
describe("data - decrypt", function() {
|
|
1
|
+
describe("data - decrypt", function () {
|
|
2
|
+
let decrypted;
|
|
3
|
+
const data = util.data.getData("decrypt.secure");
|
|
4
|
+
|
|
5
|
+
it("Execution", function () {
|
|
6
|
+
decrypted = util.data.decrypt(data.password);
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
it("Verification", function () {
|
|
10
|
+
const dataExp = "super-duper-sensitive-pw";
|
|
11
|
+
common.assertion.expectEqual(decrypted, dataExp);
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
describe("data - decrypt - includeRepoUrl: false", function () {
|
|
16
|
+
let decrypted;
|
|
17
|
+
const data = util.data.getData("decrypt.noRepo.secure");
|
|
18
|
+
|
|
19
|
+
it("Execution", function () {
|
|
20
|
+
const options = { includeRepoUrl: false };
|
|
21
|
+
decrypted = util.data.decrypt(data.password, options);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it("Verification", function () {
|
|
25
|
+
const dataExp = "super-duper-sensitive-pw";
|
|
26
|
+
common.assertion.expectEqual(decrypted, dataExp);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
2
29
|
|
|
30
|
+
describe("data - decrypt - useBase64Output: true", function () {
|
|
3
31
|
let decrypted;
|
|
4
|
-
const data = util.data.getData("
|
|
32
|
+
const data = util.data.getData("decrypt.secure");
|
|
5
33
|
|
|
6
34
|
it("Execution", function () {
|
|
7
|
-
|
|
35
|
+
const options = { useBase64Output: true };
|
|
36
|
+
decrypted = util.data.decrypt(data.password, options);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it("Verification", function () {
|
|
40
|
+
const dataExp = "c3VwZXItZHVwZXItc2Vuc2l0aXZlLXB3";
|
|
41
|
+
common.assertion.expectEqual(decrypted, dataExp);
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
describe("data - decrypt - useBase64Input: true", function () {
|
|
46
|
+
let decrypted;
|
|
47
|
+
const data = util.data.getData("decrypt.base64.secure");
|
|
48
|
+
|
|
49
|
+
it("Execution", function () {
|
|
50
|
+
const options = { useBase64Input: true };
|
|
51
|
+
decrypted = util.data.decrypt(data.password, options);
|
|
8
52
|
});
|
|
9
53
|
|
|
10
54
|
it("Verification", function () {
|
|
11
55
|
const dataExp = "super-duper-sensitive-pw";
|
|
12
56
|
common.assertion.expectEqual(decrypted, dataExp);
|
|
13
57
|
});
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
describe("data - decrypt - error case (bad decrypt)", function () {
|
|
61
|
+
const data = util.data.getData("decrypt.secure");
|
|
14
62
|
|
|
15
|
-
|
|
63
|
+
it("Execution & Verification", function () {
|
|
64
|
+
const errorMessageExp = "Function 'decrypt' failed: Decryption failed: None of the given data values could be decrypted using the given private key";
|
|
65
|
+
const options = { includeRepoUrl: false };
|
|
66
|
+
expect(() => util.data.decrypt(data.password, options)).toThrow(errorMessageExp);
|
|
67
|
+
});
|
|
68
|
+
});
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
describe("data - getSecureData - default source", function() {
|
|
2
|
-
|
|
1
|
+
describe("data - getSecureData - default source", function () {
|
|
3
2
|
let data;
|
|
4
3
|
|
|
5
4
|
it("Execution", function () {
|
|
6
|
-
data = util.data.getSecureData("
|
|
5
|
+
data = util.data.getSecureData("getSecureData");
|
|
7
6
|
});
|
|
8
7
|
|
|
9
8
|
it("Verification 1 - hashed value", function () {
|
|
@@ -29,16 +28,14 @@ describe("data - getSecureData - default source", function() {
|
|
|
29
28
|
const dataAct = data.alternatives;
|
|
30
29
|
common.assertion.expectEqual(dataAct, dataExp);
|
|
31
30
|
});
|
|
32
|
-
|
|
33
31
|
});
|
|
34
32
|
|
|
35
|
-
describe("data - getSecureData - custom source", function() {
|
|
36
|
-
|
|
33
|
+
describe("data - getSecureData - custom source", function () {
|
|
37
34
|
let data;
|
|
38
35
|
|
|
39
36
|
it("Execution", function () {
|
|
40
37
|
const source = "customSourceData";
|
|
41
|
-
data = util.data.getSecureData("
|
|
38
|
+
data = util.data.getSecureData("getSecureData", source);
|
|
42
39
|
});
|
|
43
40
|
|
|
44
41
|
it("Verification", function () {
|
|
@@ -46,29 +43,28 @@ describe("data - getSecureData - custom source", function() {
|
|
|
46
43
|
const dataAct = data.session.password;
|
|
47
44
|
common.assertion.expectEqual(dataAct, dataExp);
|
|
48
45
|
});
|
|
49
|
-
|
|
50
46
|
});
|
|
51
47
|
|
|
52
|
-
// =================================== KEEP DISABLED ===================================
|
|
48
|
+
// =================================== KEEP DISABLED FOR PIPELINE EXECUTION ===================================
|
|
53
49
|
// Can't be executed in pipeline because file is missing. Add the following to "data" folder to execute locally:
|
|
54
50
|
|
|
55
|
-
//
|
|
51
|
+
// getSecureData.local.json
|
|
56
52
|
// {
|
|
57
53
|
// "session": {
|
|
58
54
|
// "password": "super-duper-sensitive-pw"
|
|
59
55
|
// }
|
|
60
56
|
// }
|
|
57
|
+
// ============================================================================================================
|
|
61
58
|
|
|
62
|
-
// describe("data - getSecureData - local fallback", function() {
|
|
63
|
-
|
|
59
|
+
// describe("data - getSecureData - local fallback", function () {
|
|
64
60
|
// let data;
|
|
65
61
|
|
|
66
62
|
// it("Preparation", function () {
|
|
67
|
-
//
|
|
63
|
+
// global.util.data.privateKeyFound = false;
|
|
68
64
|
// });
|
|
69
65
|
|
|
70
66
|
// it("Execution", function () {
|
|
71
|
-
// data = util.data.getSecureData("
|
|
67
|
+
// data = util.data.getSecureData("getSecureData");
|
|
72
68
|
// });
|
|
73
69
|
|
|
74
70
|
// it("Verification", function () {
|
|
@@ -77,4 +73,4 @@ describe("data - getSecureData - custom source", function() {
|
|
|
77
73
|
// common.assertion.expectEqual(dataAct, dataExp);
|
|
78
74
|
// });
|
|
79
75
|
// });
|
|
80
|
-
//
|
|
76
|
+
// ============================================================================================================
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Test that if data is imported again in another test file, the data is not decrypted again.
|
|
2
|
+
|
|
3
|
+
describe("data - getSecureData - external import", function () {
|
|
4
|
+
const data = util.data.getSecureData("getSecureData");
|
|
5
|
+
|
|
6
|
+
it("Verification", function () {
|
|
7
|
+
const dataExp = "super-duper-sensitive-pw";
|
|
8
|
+
const dataAct = data.session.password;
|
|
9
|
+
common.assertion.expectEqual(dataAct, dataExp);
|
|
10
|
+
});
|
|
11
|
+
});
|
|
@@ -16,7 +16,10 @@ exports.config = merge(profile.config, {
|
|
|
16
16
|
},
|
|
17
17
|
|
|
18
18
|
specs: [
|
|
19
|
-
path.resolve(__dirname, "
|
|
20
|
-
|
|
19
|
+
path.resolve(__dirname, "decrypt.spec.js"),
|
|
20
|
+
[
|
|
21
|
+
path.resolve(__dirname, "getSecureData1.spec.js"),
|
|
22
|
+
path.resolve(__dirname, "getSecureData2.spec.js")
|
|
23
|
+
]
|
|
21
24
|
]
|
|
22
25
|
});
|
/package/test/reuse/util/data/customSourceData/{test.secure.json → getSecureData.secure.json}
RENAMED
|
File without changes
|