@itentialopensource/adapter-zscaler 0.10.12 → 0.11.1

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.
Files changed (46) hide show
  1. package/.eslintrc.js +1 -0
  2. package/AUTH.md +4 -4
  3. package/BROKER.md +4 -4
  4. package/CALLS.md +9 -9
  5. package/ENHANCE.md +3 -3
  6. package/PROPERTIES.md +24 -9
  7. package/README.md +24 -23
  8. package/SUMMARY.md +2 -2
  9. package/SYSTEMINFO.md +1 -1
  10. package/TAB1.md +2 -2
  11. package/TAB2.md +15 -10
  12. package/TROUBLESHOOT.md +10 -1
  13. package/UTILITIES.md +473 -0
  14. package/adapter.js +206 -106
  15. package/adapterBase.js +52 -16
  16. package/entities/.system/schemaTokenReq.json +11 -0
  17. package/package.json +24 -28
  18. package/pronghorn.json +113 -111
  19. package/propertiesSchema.json +73 -7
  20. package/report/adapterInfo.json +7 -7
  21. package/report/auto-adapter-openapi.json +55355 -0
  22. package/report/updateReport1748556249696.json +120 -0
  23. package/sampleProperties.json +10 -5
  24. package/test/integration/adapterTestBasicGet.js +88 -54
  25. package/test/integration/adapterTestConnectivity.js +15 -16
  26. package/test/integration/adapterTestIntegration.js +2 -40
  27. package/test/unit/adapterBaseTestUnit.js +641 -39
  28. package/test/unit/adapterTestUnit.js +17 -54
  29. package/utils/adapterInfo.js +114 -164
  30. package/utils/argParser.js +44 -0
  31. package/utils/checkMigrate.js +77 -38
  32. package/utils/entitiesToDB.js +53 -42
  33. package/utils/logger.js +26 -0
  34. package/utils/modify.js +56 -55
  35. package/utils/mongoDbConnection.js +79 -0
  36. package/utils/mongoUtils.js +162 -0
  37. package/utils/taskMover.js +31 -32
  38. package/utils/tbScript.js +36 -172
  39. package/utils/tbUtils.js +84 -226
  40. package/utils/troubleshootingAdapter.js +68 -84
  41. package/utils/updateAdapterConfig.js +158 -0
  42. package/utils/addAuth.js +0 -94
  43. package/utils/artifactize.js +0 -146
  44. package/utils/basicGet.js +0 -50
  45. package/utils/packModificationScript.js +0 -35
  46. package/utils/patches2bundledDeps.js +0 -90
@@ -279,6 +279,11 @@
279
279
  "description": "The grant type for OAuth requests - can also provide in schema",
280
280
  "default": ""
281
281
  },
282
+ "audience": {
283
+ "type": "string",
284
+ "description": "The audience for OAuth requests",
285
+ "default": "https://api.zscaler.com"
286
+ },
282
287
  "sensitive": {
283
288
  "type": "array",
284
289
  "description": "List of sensitive keys to search and hide values from being logged",
@@ -769,6 +774,14 @@
769
774
  "security/ca.pem"
770
775
  ]
771
776
  },
777
+ "ca_file_content": {
778
+ "type": "string",
779
+ "description": "The content of the CA file used for SSL",
780
+ "default": "",
781
+ "examples": [
782
+ "-----BEGIN CERTIFICATE-----"
783
+ ]
784
+ },
772
785
  "key_file": {
773
786
  "type": "string",
774
787
  "description": "The fully qualified path name to the key file used for SSL",
@@ -858,32 +871,48 @@
858
871
  "mongo": {
859
872
  "type": "object",
860
873
  "properties": {
874
+ "url": {
875
+ "type": "string",
876
+ "description": "Mongo's complete connection URL. This property overrides host, port, database, username, password and replSet settings.",
877
+ "examples": [
878
+ "mongodb://[username:password@]host1[:port1][,...hostN[:portN]][/[defaultauthdb][?options]]",
879
+ "mongodb+srv://[username:password@]cluster0.xxxxx.mongodb.net/[defaultauthdb][?options]",
880
+ "mongodb+srv://cluster0.xxxxx.mongodb.net/[defaultauthdb][?options]"
881
+ ]
882
+ },
861
883
  "host": {
862
884
  "type": "string",
863
- "description": "host where mongo database can be found",
885
+ "description": "Host information for the Mongo server",
864
886
  "default": "",
865
887
  "examples": [
866
- "localhost"
888
+ "localhost",
889
+ "cluster0.xxxxx.mongodb.net",
890
+ "my-cluster.example.com"
867
891
  ]
868
892
  },
869
893
  "port": {
870
894
  "type": "integer",
871
- "description": "port on which to connect to the mongo database",
895
+ "description": "Port information for the Mongo server. Not used when using mongodb+srv:// protocol",
872
896
  "default": 443,
873
897
  "minimum": 0,
874
898
  "maximum": 65535
875
899
  },
876
900
  "database": {
877
901
  "type": "string",
878
- "description": "The name of the database to store adapter information in",
902
+ "description": "The database for the adapter to use for its data.",
879
903
  "default": "",
880
904
  "examples": [
881
905
  "adapter-xyz"
882
906
  ]
883
907
  },
908
+ "dbAuth": {
909
+ "type": "boolean",
910
+ "description": "Whether to use authentication for MongoDB connection. Default is false.",
911
+ "default": false
912
+ },
884
913
  "username": {
885
914
  "type": "string",
886
- "description": "The user to connect to the database with",
915
+ "description": "If credentials are required to access Mongo, this is the user to login as.",
887
916
  "default": "",
888
917
  "examples": [
889
918
  "username"
@@ -891,7 +920,7 @@
891
920
  },
892
921
  "password": {
893
922
  "type": "string",
894
- "description": "The password to connect to the database with",
923
+ "description": "If credentials are required to access Mongo, this is the password to login with.",
895
924
  "default": "",
896
925
  "examples": [
897
926
  "password"
@@ -899,12 +928,17 @@
899
928
  },
900
929
  "replSet": {
901
930
  "type": "string",
902
- "description": "The replica set for the database",
931
+ "description": "If the database is set up to use replica sets, define it here so it can be added to the database connection. Not used when using mongodb+srv:// protocol",
903
932
  "default": "",
904
933
  "examples": [
905
934
  "my_repolica_set"
906
935
  ]
907
936
  },
937
+ "addSrv": {
938
+ "type": "boolean",
939
+ "description": "Whether the connection requires the mongodb+srv:// protocol. If true, uses mongodb+srv:// protocol. Note: mongodb+srv:// can also be used for non-Atlas deployments that support DNS SRV records",
940
+ "default": false
941
+ },
908
942
  "db_ssl": {
909
943
  "type": "object",
910
944
  "description": "SSL for mongo database connection",
@@ -945,6 +979,38 @@
945
979
  }
946
980
  }
947
981
  }
982
+ },
983
+ "dependencies": {
984
+ "dbAuth": {
985
+ "oneOf": [
986
+ {
987
+ "properties": {
988
+ "dbAuth": {
989
+ "const": false
990
+ }
991
+ }
992
+ },
993
+ {
994
+ "properties": {
995
+ "dbAuth": {
996
+ "const": true
997
+ },
998
+ "username": {
999
+ "type": "string",
1000
+ "minLength": 1
1001
+ },
1002
+ "password": {
1003
+ "type": "string",
1004
+ "minLength": 1
1005
+ }
1006
+ },
1007
+ "required": [
1008
+ "username",
1009
+ "password"
1010
+ ]
1011
+ }
1012
+ ]
1013
+ }
948
1014
  }
949
1015
  },
950
1016
  "devicebroker": {
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "0.10.11",
3
- "configLines": 26532,
4
- "scriptLines": 1783,
5
- "codeLines": 31070,
6
- "testLines": 19661,
7
- "testCases": 1020,
8
- "totalCodeLines": 52514,
2
+ "version": "0.11.0",
3
+ "configLines": 35632,
4
+ "scriptLines": 2498,
5
+ "codeLines": 31206,
6
+ "testLines": 20221,
7
+ "testCases": 1033,
8
+ "totalCodeLines": 53925,
9
9
  "wfTasks": 369
10
10
  }