@itentialopensource/adapter-azure_devops 0.1.11 → 0.2.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/AUTH.md +11 -13
  2. package/CALLS.md +797 -22
  3. package/CHANGELOG.md +16 -0
  4. package/CONTRIBUTING.md +1 -160
  5. package/ENHANCE.md +2 -2
  6. package/README.md +32 -23
  7. package/SYSTEMINFO.md +13 -5
  8. package/adapter.js +162 -333
  9. package/adapterBase.js +549 -879
  10. package/changelogs/CHANGELOG.md +88 -0
  11. package/metadata.json +73 -0
  12. package/package.json +24 -25
  13. package/pronghorn.json +980 -641
  14. package/propertiesSchema.json +431 -31
  15. package/refs?service=git-upload-pack +0 -0
  16. package/report/adapter-openapi.json +29422 -0
  17. package/report/adapter-openapi.yaml +10963 -0
  18. package/report/adapterInfo.json +8 -8
  19. package/report/updateReport1691507719192.json +120 -0
  20. package/report/updateReport1692202716318.json +120 -0
  21. package/report/updateReport1694455416503.json +120 -0
  22. package/report/updateReport1694457083247.json +120 -0
  23. package/report/updateReport1694462876098.json +120 -0
  24. package/report/updateReport1698421291981.json +120 -0
  25. package/sampleProperties.json +63 -2
  26. package/test/integration/adapterTestBasicGet.js +2 -4
  27. package/test/integration/adapterTestConnectivity.js +91 -42
  28. package/test/integration/adapterTestIntegration.js +130 -2
  29. package/test/unit/adapterBaseTestUnit.js +388 -313
  30. package/test/unit/adapterTestUnit.js +338 -112
  31. package/utils/adapterInfo.js +1 -1
  32. package/utils/addAuth.js +1 -1
  33. package/utils/artifactize.js +1 -1
  34. package/utils/checkMigrate.js +1 -1
  35. package/utils/entitiesToDB.js +2 -2
  36. package/utils/findPath.js +1 -1
  37. package/utils/methodDocumentor.js +273 -0
  38. package/utils/modify.js +13 -15
  39. package/utils/packModificationScript.js +1 -1
  40. package/utils/pre-commit.sh +2 -0
  41. package/utils/taskMover.js +309 -0
  42. package/utils/tbScript.js +89 -34
  43. package/utils/tbUtils.js +41 -21
  44. package/utils/testRunner.js +1 -1
  45. package/utils/troubleshootingAdapter.js +9 -6
  46. package/workflows/README.md +0 -3
package/AUTH.md CHANGED
@@ -1,9 +1,9 @@
1
1
  ## Authenticating Microsoft Azure DevOps Adapter
2
2
 
3
- This document will go through the steps for authenticating the Microsoft Azure DevOps 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 Microsoft Azure DevOps 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 Microsoft Azure DevOps adapter requires Basic Authentication. If you change authentication methods, you should change this section accordingly and merge it back into the adapter repository.
5
+ ### Static Token Authentication
6
+ The Microsoft Azure DevOps adapter requires Static Token Authentication. If you change authentication methods, you should change this section accordingly and merge it back into the adapter repository.
7
7
 
8
8
  STEPS
9
9
  1. Ensure you have access to a Microsoft Azure DevOps server and that it is running
@@ -11,21 +11,18 @@ STEPS
11
11
  3. Use the properties below for the ```properties.authentication``` field
12
12
  ```json
13
13
  "authentication": {
14
- "auth_method": "basic user_password",
15
- "username": "<username>",
16
- "password": "<password>",
17
- "token": "",
18
- "token_timeout": 1800000,
14
+ "auth_method": "static_token",
15
+ "token": "<PAT>",
16
+ "token_timeout": 600000,
19
17
  "token_cache": "local",
20
18
  "invalid_token_error": 401,
21
19
  "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": ""
20
+ "auth_field_format": "Basic {b64}Basic:{token}{/b64}",
21
+ "auth_logging": false
27
22
  }
28
23
  ```
24
+ you can leave all of the other properties in the authentication section, they will not be used when the auth_method is static_token.
25
+
29
26
  4. Restart the adapter. If your properties were set correctly, the adapter should go online.
30
27
 
31
28
  ### Troubleshooting
@@ -36,4 +33,5 @@ STEPS
36
33
  - The FULL REQUEST log to make sure the proper headers are being sent with the request.
37
34
  - The FULL BODY log to make sure the payload is accurate.
38
35
  - The CALL RETURN log to see what the other system is telling us.
36
+ - 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
37
  - Remember when you are done to turn auth_logging off as you do not want to log credentials.