@itentialopensource/adapter-meraki 1.0.3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. package/AUTH.md +14 -18
  2. package/CALLS.md +4264 -0
  3. package/CHANGELOG.md +16 -0
  4. package/CONTRIBUTING.md +1 -160
  5. package/ENHANCE.md +2 -2
  6. package/README.md +23 -18
  7. package/SYSTEMINFO.md +15 -2
  8. package/adapter.js +164 -335
  9. package/adapterBase.js +411 -920
  10. package/changelogs/changelog.md +198 -0
  11. package/metadata.json +61 -0
  12. package/package.json +24 -24
  13. package/pronghorn.json +470 -138
  14. package/propertiesSchema.json +358 -31
  15. package/refs?service=git-upload-pack +0 -0
  16. package/report/adapterInfo.json +8 -8
  17. package/report/updateReport1690417926405.json +119 -0
  18. package/sampleProperties.json +74 -27
  19. package/test/integration/adapterTestBasicGet.js +2 -4
  20. package/test/integration/adapterTestConnectivity.js +91 -42
  21. package/test/integration/adapterTestIntegration.js +130 -2
  22. package/test/unit/adapterBaseTestUnit.js +388 -313
  23. package/test/unit/adapterTestUnit.js +332 -112
  24. package/utils/adapterInfo.js +1 -1
  25. package/utils/addAuth.js +1 -1
  26. package/utils/artifactize.js +1 -1
  27. package/utils/checkMigrate.js +1 -1
  28. package/utils/entitiesToDB.js +2 -2
  29. package/utils/findPath.js +1 -1
  30. package/utils/methodDocumentor.js +225 -0
  31. package/utils/modify.js +13 -15
  32. package/utils/packModificationScript.js +1 -1
  33. package/utils/pre-commit.sh +2 -0
  34. package/utils/taskMover.js +309 -0
  35. package/utils/tbScript.js +89 -34
  36. package/utils/tbUtils.js +41 -21
  37. package/utils/testRunner.js +1 -1
  38. package/utils/troubleshootingAdapter.js +9 -6
  39. package/versions.json +0 -542
  40. package/workflows/README.md +0 -3
package/AUTH.md CHANGED
@@ -1,31 +1,26 @@
1
- ## Authenticating Meraki Adapter
1
+ ## Authenticating Cisco Meraki Adapter
2
2
 
3
- This document will go through the steps for authenticating the Meraki adapter with Basic Authentication. Properly configuring the properties for an adapter in IAP is critical for getting the adapter online. You can read more about adapter authentication <a href="https://www.itential.com/automation-platform/integrations/adapters-resources/authentication/" target="_blank">HERE</a>.
3
+ This document will go through the steps for authenticating the Cisco Meraki adapter with the authentication methods we have worked with in the past. Properly configuring the properties for an adapter in IAP is critical for getting the adapter online. You can read more about adapter authentication <a href="https://docs.itential.com/opensource/docs/authentication" target="_blank">HERE</a>.
4
4
 
5
- ### Basic Authentication
6
- The Meraki adapter requires Basic Authentication. If you change authentication methods, you should change this section accordingly and merge it back into the adapter repository.
5
+ Companies periodically change authentication methods to provide better security. As this happens this section should be updated and contributed/merge back into the adapter repository.
6
+
7
+ ### Static Token (APIKEY) Authentication
8
+ The Cisco Meraki adapter authenticates with a static token or api-key.
7
9
 
8
10
  STEPS
9
- 1. Ensure you have access to a Meraki server and that it is running
11
+ 1. Ensure you have access to a Cisco Meraki server and that it is running
10
12
  2. Follow the steps in the README.md to import the adapter into IAP if you have not already done so
11
13
  3. Use the properties below for the ```properties.authentication``` field
12
14
  ```json
13
15
  "authentication": {
14
- "auth_method": "basic user_password",
15
- "username": "<username>",
16
- "password": "<password>",
17
- "token": "",
18
- "token_timeout": 1800000,
19
- "token_cache": "local",
20
- "invalid_token_error": 401,
21
- "auth_field": "header.headers.Authorization",
22
- "auth_field_format": "Basic {b64}{username}:{password}{/b64}",
23
- "auth_logging": false,
24
- "client_id": "",
25
- "client_secret": "",
26
- "grant_type": ""
16
+ "auth_method": "static_token",
17
+ "token": "$ENCd0bfd12e1273f41189835144cbd02517d08573dfa6d215cf09598a17ee4145950289e0e6630b609d77cb2ef7e8726c2697d230c8e7f6d295",
18
+ "auth_field": "header.headers.X-Cisco-Meraki-API-Key",
19
+ "auth_field_format": "{token}",
20
+ "auth_logging": false
27
21
  }
28
22
  ```
23
+ you can leave all of the other properties in the authentication section, they will not be used when the auth_method is static_token.
29
24
  4. Restart the adapter. If your properties were set correctly, the adapter should go online.
30
25
 
31
26
  ### Troubleshooting
@@ -36,4 +31,5 @@ STEPS
36
31
  - The FULL REQUEST log to make sure the proper headers are being sent with the request.
37
32
  - The FULL BODY log to make sure the payload is accurate.
38
33
  - The CALL RETURN log to see what the other system is telling us.
34
+ - Credentials should be ** masked ** by the adapter so make sure you verify the username and password - including that there are erroneous spaces at the front or end.
39
35
  - Remember when you are done to turn auth_logging off as you do not want to log credentials.