@itentialopensource/adapter-iap 0.9.0 → 0.10.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/AUTH.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ## Authenticating Itential Automation Platform Adapter
2
2
 
3
- This document will go through the steps for authenticating the Itential Automation Platform adapter with Two Step Token Authentication. Properly configuring the properties for an adapter in Itential Platform 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>.
3
+ This document will go through the steps for authenticating the Itential Automation Platform adapter with Two Step Token Authentication and OAuth Authentication. Properly configuring the properties for an adapter in Itential Platform 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
5
  ### Two Step Token Authentication
6
6
  The Itential Automation Platform adapter requires Two Step Token Authentication. If you change authentication methods, you should change this section accordingly and merge it back into the adapter repository.
@@ -21,7 +21,35 @@ STEPS
21
21
  "auth_field_format": "token={token}"
22
22
  }
23
23
  ```
24
- 4. Restart the adapter. If your properties were set correctly, the adapter should go online.
24
+ 4. Restart the adapter. If your properties were set correctly, the adapter should go online.
25
+
26
+ ### OAuth Authentication
27
+ The Itential Automation Platform adapter supports OAuth.
28
+
29
+ STEPS
30
+ 1. Ensure you have access to a Itential Automation Platform server and that it is running
31
+ 2. Follow the steps in the README.md to import the adapter into IAP if you have not already done so
32
+ 3. Use the properties below for the properties.authentication field
33
+ ```json
34
+ "authentication": {
35
+ "auth_method": "request_token",
36
+ "token_timeout": 1800000,
37
+ "token_cache": "local",
38
+ "token_URI_path": "/oauth/token",
39
+ "invalid_token_error": 401,
40
+ "auth_field": "header.headers.Authorization",
41
+ "auth_field_format": "Bearer {token}",
42
+ "auth_request_datatype": "URLENCODE",
43
+ "auth_response_datatype": "JSON",
44
+ "token_result_field": "access_token",
45
+ "token_response_placement": "BODY",
46
+ "client_id": "<client_id>",
47
+ "client_secret": "<client_secret",
48
+ "grant_type": "client_credentials",
49
+ "addCreds": false,
50
+ }
51
+ ```
52
+ 4. Restart the adapter. If your properties were set correctly, the adapter should go online.
25
53
 
26
54
  ### Troubleshooting
27
55
  - Make sure you copied over the correct username and password.
package/TAB2.md CHANGED
@@ -11,7 +11,7 @@
11
11
  ## Specific Adapter Information
12
12
  ### Authentication
13
13
 
14
- This document will go through the steps for authenticating the Itential Automation Platform adapter with Two Step Token Authentication. Properly configuring the properties for an adapter in Itential Platform 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>.
14
+ This document will go through the steps for authenticating the Itential Automation Platform adapter with Two Step Token Authentication and OAuth Authentication. Properly configuring the properties for an adapter in Itential Platform 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>.
15
15
 
16
16
  #### Two Step Token Authentication
17
17
  The Itential Automation Platform adapter requires Two Step Token Authentication. If you change authentication methods, you should change this section accordingly and merge it back into the adapter repository.
@@ -32,7 +32,35 @@ STEPS
32
32
  "auth_field_format": "token={token}"
33
33
  }
34
34
  ```
35
- 4. Restart the adapter. If your properties were set correctly, the adapter should go online.
35
+ 4. Restart the adapter. If your properties were set correctly, the adapter should go online.
36
+
37
+ #### OAuth Authentication
38
+ The Itential Automation Platform adapter supports OAuth.
39
+
40
+ STEPS
41
+ 1. Ensure you have access to a Itential Automation Platform server and that it is running
42
+ 2. Follow the steps in the README.md to import the adapter into IAP if you have not already done so
43
+ 3. Use the properties below for the properties.authentication field
44
+ ```json
45
+ "authentication": {
46
+ "auth_method": "request_token",
47
+ "token_timeout": 1800000,
48
+ "token_cache": "local",
49
+ "token_URI_path": "/oauth/token",
50
+ "invalid_token_error": 401,
51
+ "auth_field": "header.headers.Authorization",
52
+ "auth_field_format": "Bearer {token}",
53
+ "auth_request_datatype": "URLENCODE",
54
+ "auth_response_datatype": "JSON",
55
+ "token_result_field": "access_token",
56
+ "token_response_placement": "BODY",
57
+ "client_id": "<client_id>",
58
+ "client_secret": "<client_secret",
59
+ "grant_type": "client_credentials",
60
+ "addCreds": false,
61
+ }
62
+ ```
63
+ 4. Restart the adapter. If your properties were set correctly, the adapter should go online.
36
64
 
37
65
  #### Troubleshooting
38
66
  - Make sure you copied over the correct username and password.
@@ -76,6 +104,9 @@ Sample Properties can be used to help you configure the adapter in the Itential
76
104
  "client_id": "",
77
105
  "client_secret": "",
78
106
  "grant_type": "",
107
+ "auth_request_datatype": "",
108
+ "auth_response_datatype": "",
109
+ "token_response_placement": "",
79
110
  "sensitive": [],
80
111
  "sso": {
81
112
  "protocol": "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-iap",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "This adapter integrates with system described as: iap.",
5
5
  "main": "adapter.js",
6
6
  "systemName": "Itential Automation Platform",
@@ -47,7 +47,7 @@
47
47
  "author": "Itential",
48
48
  "homepage": "https://gitlab.com/itentialopensource/adapters/adapter-iap#readme",
49
49
  "dependencies": {
50
- "@itentialopensource/adapter-utils": "6.0.2",
50
+ "@itentialopensource/adapter-utils": "6.0.3",
51
51
  "acorn": "8.14.1",
52
52
  "ajv": "8.17.1",
53
53
  "axios": "1.12.2",
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "0.6.2",
3
- "configLines": 30135,
4
- "scriptLines": 1783,
5
- "codeLines": 47398,
6
- "testLines": 34369,
7
- "testCases": 1839,
8
- "totalCodeLines": 83550,
2
+ "version": "0.9.1",
3
+ "configLines": 44156,
4
+ "scriptLines": 2498,
5
+ "codeLines": 47472,
6
+ "testLines": 34936,
7
+ "testCases": 1852,
8
+ "totalCodeLines": 84906,
9
9
  "wfTasks": 585
10
10
  }