@itentialopensource/adapter-viptela 0.10.7 → 0.11.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,39 +1,46 @@
1
- ## Authenticating Viptela Adapter
1
+ ## Authenticating Viptela Adapter
2
2
 
3
- This document will go through the steps for authenticating the Viptela 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 Viptela adapter with Dynamic Token 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://docs.itential.com/opensource/docs/authentication" target="_blank">HERE</a>.
4
4
 
5
- ### Basic Authentication
6
- The Viptela 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.
7
6
 
8
- STEPS
7
+ ### Dynamic Token Authentication
8
+ The Viptela adapter authenticates with a dynamic token.
9
+
10
+ STEPS
9
11
  1. Ensure you have access to a Viptela 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",
16
+ "auth_method": "request_token",
15
17
  "username": "<username>",
16
18
  "password": "<password>",
17
- "token": "",
18
- "token_timeout": 1800000,
19
+ "token_timeout": 180000,
19
20
  "token_cache": "local",
20
21
  "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": ""
22
+ "auth_field": [
23
+ "header.headers.Cookie",
24
+ "header.headers.X-XSRF-TOKEN",
25
+ "header.headers.Authorization"
26
+ ],
27
+ "auth_field_format": [
28
+ "JSESSIONID={token}",
29
+ "{tokenp2}",
30
+ "Basic {b64}{username}:{password}{/b64}"
31
+ ],
27
32
  }
28
33
  ```
29
- 4. Restart the adapter. If your properties were set correctly, the adapter should go online.
34
+ you can leave all of the other properties in the authentication section, they will not be used for Viptela dynamic token authentication.
35
+ 4. Restart the adapter. If your properties were set correctly, the adapter should go online.
30
36
 
31
37
  ### Troubleshooting
32
- - Make sure you copied over the correct username and password.
38
+ - Make sure you copied over the correct username and password as these are used to retrieve the token.
33
39
  - Turn on debug level logs for the adapter in IAP Admin Essentials.
34
40
  - Turn on auth_logging for the adapter in IAP Admin Essentials (adapter properties).
35
41
  - Investigate the logs - in particular:
36
42
  - The FULL REQUEST log to make sure the proper headers are being sent with the request.
37
43
  - The FULL BODY log to make sure the payload is accurate.
38
44
  - The CALL RETURN log to see what the other system is telling us.
45
+ - 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
46
  - Remember when you are done to turn auth_logging off as you do not want to log credentials.