@itentialopensource/adapter-paragon_iam 0.2.3 → 0.3.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/TAB2.md ADDED
@@ -0,0 +1,377 @@
1
+ # Paragon IAM
2
+
3
+ ## Table of Contents
4
+
5
+ - [Specific Adapter Information](#specific-adapter-information)
6
+ - [Authentication](#authentication)
7
+ - [Sample Properties](#sample-properties)
8
+ - [Swagger](#swagger)
9
+ - [Generic Adapter Information](#generic-adapter-information)
10
+
11
+ ## Specific Adapter Information
12
+ ### Authentication
13
+
14
+ This document will go through the steps for authenticating the Paragon IAM adapter with Multi Step 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>.
15
+
16
+ #### Multi Step Authentication
17
+ The Paragon IAM adapter requires Multi Step Authentication. If you change authentication methods, you should change this section accordingly and merge it back into the adapter repository.
18
+
19
+ STEPS
20
+ 1. Ensure you have access to a Paragon server and that it is running
21
+ 2. Follow the steps in the README.md to import the adapter into IAP if you have not already done so
22
+ 3. Use the properties below for the ```properties.authentication``` field
23
+ ```json
24
+ "authentication": {
25
+ "auth_method": "multi_step_authentication",
26
+ "token_timeout": 1800000,
27
+ "token_cache": "local",
28
+ "invalid_token_error": 401,
29
+ "auth_field": "header.headers.x-iam-token",
30
+ "auth_field_format": "{tokenp2}",
31
+ "auth_logging": false,
32
+ "multiStepAuthCalls": [
33
+ {
34
+ "name": "getFirstToken",
35
+ "requestFields": {
36
+ "user": {
37
+ "domain": "",
38
+ "name": ""
39
+ },
40
+ "password": "",
41
+ "methods": [
42
+ "PASSWORD"
43
+ ]
44
+ },
45
+ "responseFields": {
46
+ "firstIdToken": "id_token",
47
+ "scopeId": "scopes.0.id"
48
+ },
49
+ "successfullResponseCode": 200
50
+ },
51
+ {
52
+ "name": "getSecondToken",
53
+ "requestFields": {
54
+ "token": "{getFirstToken.responseFields.firstIdToken}",
55
+ "scopeId": "{getFirstToken.responseFields.scopeId}",
56
+ "methods": [
57
+ "TOKEN"
58
+ ]
59
+ },
60
+ "responseFields": {
61
+ "tokenp2": "id_token"
62
+ },
63
+ "successfullResponseCode": 200
64
+ }
65
+ ]
66
+ }
67
+ ```
68
+ you can leave all of the other properties in the authentication section, they will not be used when the auth_method is multi_step_authentication. <br>
69
+ 4. Restart the adapter. If your properties were set correctly, the adapter should go online.
70
+
71
+ #### Troubleshooting
72
+ - Make sure you copied over the correct username and password.
73
+ - Turn on debug level logs for the adapter in IAP Admin Essentials.
74
+ - Turn on auth_logging for the adapter in IAP Admin Essentials (adapter properties).
75
+ - Investigate the logs - in particular:
76
+ - The FULL REQUEST log to make sure the proper headers are being sent with the request.
77
+ - The FULL BODY log to make sure the payload is accurate.
78
+ - The CALL RETURN log to see what the other system is telling us.
79
+ - 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.
80
+ - Remember when you are done to turn auth_logging off as you do not want to log credentials.
81
+
82
+ ### Sample Properties
83
+
84
+ Sample Properties can be used to help you configure the adapter in the Itential Automation Platform. You will need to update connectivity information such as the host, port, protocol and credentials.
85
+
86
+ ```json
87
+ "properties": {
88
+ "host": "localhost",
89
+ "port": 443,
90
+ "choosepath": "",
91
+ "base_path": "/",
92
+ "version": "",
93
+ "cache_location": "none",
94
+ "encode_pathvars": true,
95
+ "encode_queryvars": true,
96
+ "save_metric": false,
97
+ "stub": true,
98
+ "protocol": "https",
99
+ "authentication": {
100
+ "auth_method": "multi_step_authentication",
101
+ "username": "admin",
102
+ "password": "pass",
103
+ "token": "token",
104
+ "token_timeout": 1800000,
105
+ "token_cache": "local",
106
+ "invalid_token_error": 401,
107
+ "auth_field": "header.headers.x-iam-token",
108
+ "auth_field_format": "{tokenp2}",
109
+ "auth_logging": false,
110
+ "client_id": "",
111
+ "client_secret": "",
112
+ "grant_type": "",
113
+ "sensitive": [],
114
+ "sso": {
115
+ "protocol": "",
116
+ "host": "",
117
+ "port": 0
118
+ },
119
+ "multiStepAuthCalls": [
120
+ {
121
+ "name": "getFirstToken",
122
+ "requestFields": {
123
+ "user": {
124
+ "domain": "",
125
+ "name": ""
126
+ },
127
+ "password": "",
128
+ "methods": [
129
+ "PASSWORD"
130
+ ]
131
+ },
132
+ "responseFields": {
133
+ "firstIdToken": "id_token",
134
+ "scopeId": "scopes.0.id"
135
+ },
136
+ "successfullResponseCode": 200
137
+ },
138
+ {
139
+ "name": "getSecondToken",
140
+ "requestFields": {
141
+ "token": "{getFirstToken.responseFields.firstIdToken}",
142
+ "scopeId": "{getFirstToken.responseFields.scopeId}",
143
+ "methods": [
144
+ "TOKEN"
145
+ ]
146
+ },
147
+ "responseFields": {
148
+ "tokenp2": "id_token"
149
+ },
150
+ "successfullResponseCode": 200
151
+ }
152
+ ]
153
+ },
154
+ "healthcheck": {
155
+ "type": "none",
156
+ "frequency": 60000,
157
+ "query_object": {},
158
+ "addlHeaders": {}
159
+ },
160
+ "throttle": {
161
+ "throttle_enabled": false,
162
+ "number_pronghorns": 1,
163
+ "sync_async": "sync",
164
+ "max_in_queue": 1000,
165
+ "concurrent_max": 1,
166
+ "expire_timeout": 0,
167
+ "avg_runtime": 200,
168
+ "priorities": [
169
+ {
170
+ "value": 0,
171
+ "percent": 100
172
+ }
173
+ ]
174
+ },
175
+ "request": {
176
+ "number_redirects": 0,
177
+ "number_retries": 3,
178
+ "limit_retry_error": [
179
+ 0
180
+ ],
181
+ "failover_codes": [],
182
+ "attempt_timeout": 5000,
183
+ "global_request": {
184
+ "payload": {},
185
+ "uriOptions": {},
186
+ "addlHeaders": {},
187
+ "authData": {}
188
+ },
189
+ "healthcheck_on_timeout": true,
190
+ "return_raw": false,
191
+ "archiving": false,
192
+ "return_request": false
193
+ },
194
+ "proxy": {
195
+ "enabled": false,
196
+ "host": "",
197
+ "port": 1,
198
+ "protocol": "http",
199
+ "username": "",
200
+ "password": ""
201
+ },
202
+ "ssl": {
203
+ "ecdhCurve": "",
204
+ "enabled": false,
205
+ "accept_invalid_cert": false,
206
+ "ca_file": "",
207
+ "key_file": "",
208
+ "cert_file": "",
209
+ "secure_protocol": "",
210
+ "ciphers": ""
211
+ },
212
+ "mongo": {
213
+ "host": "",
214
+ "port": 0,
215
+ "database": "",
216
+ "username": "",
217
+ "password": "",
218
+ "replSet": "",
219
+ "db_ssl": {
220
+ "enabled": false,
221
+ "accept_invalid_cert": false,
222
+ "ca_file": "",
223
+ "key_file": "",
224
+ "cert_file": ""
225
+ }
226
+ },
227
+ "devicebroker": {
228
+ "enabled": false,
229
+ "getDevice": [
230
+ {
231
+ "path": "/not/mapped",
232
+ "method": "GET",
233
+ "query": {},
234
+ "body": {},
235
+ "headers": {},
236
+ "handleFailure": "ignore",
237
+ "requestFields": {
238
+ "insample": "{port}"
239
+ },
240
+ "responseDatakey": "",
241
+ "responseFields": {
242
+ "name": "{this}{||}{that}",
243
+ "ostype": "{osfield}",
244
+ "ostypePrefix": "meraki-",
245
+ "port": "{port}",
246
+ "ipaddress": "{ip_addr}",
247
+ "serial": "{serial}"
248
+ }
249
+ }
250
+ ],
251
+ "getDevicesFiltered": [
252
+ {
253
+ "path": "/not/mapped",
254
+ "method": "GET",
255
+ "pagination": {
256
+ "offsetVar": "",
257
+ "limitVar": "",
258
+ "incrementBy": "limit",
259
+ "requestLocation": "query"
260
+ },
261
+ "query": {},
262
+ "body": {},
263
+ "headers": {},
264
+ "handleFailure": "ignore",
265
+ "requestFields": {},
266
+ "responseDatakey": "",
267
+ "responseFields": {
268
+ "name": "{this}{||}{that}",
269
+ "ostype": "{osfield}",
270
+ "ostypePrefix": "meraki-",
271
+ "port": "{port}",
272
+ "ipaddress": "{ip_addr}",
273
+ "serial": "{serial}",
274
+ "id": "{myid}"
275
+ }
276
+ }
277
+ ],
278
+ "isAlive": [
279
+ {
280
+ "path": "/not/mapped/{devID}",
281
+ "method": "GET",
282
+ "query": {},
283
+ "body": {},
284
+ "headers": {},
285
+ "handleFailure": "ignore",
286
+ "requestFields": {
287
+ "devID": "{id}"
288
+ },
289
+ "responseDatakey": "",
290
+ "responseFields": {
291
+ "status": "return2xx",
292
+ "statusValue": "AD.200"
293
+ }
294
+ }
295
+ ],
296
+ "getConfig": [
297
+ {
298
+ "path": "/not/mapped/{devID}",
299
+ "method": "GET",
300
+ "query": {},
301
+ "body": {},
302
+ "headers": {},
303
+ "handleFailure": "ignore",
304
+ "requestFields": {
305
+ "devID": "{id}"
306
+ },
307
+ "responseDatakey": "",
308
+ "responseFields": {}
309
+ }
310
+ ],
311
+ "getCount": [
312
+ {
313
+ "path": "/not/mapped",
314
+ "method": "GET",
315
+ "query": {},
316
+ "body": {},
317
+ "headers": {},
318
+ "handleFailure": "ignore",
319
+ "requestFields": {},
320
+ "responseDatakey": "",
321
+ "responseFields": {}
322
+ }
323
+ ]
324
+ },
325
+ "cache": {
326
+ "enabled": false,
327
+ "entities": [
328
+ {
329
+ "entityType": "device",
330
+ "frequency": 3600,
331
+ "flushOnFail": false,
332
+ "limit": 10000,
333
+ "retryAttempts": 5,
334
+ "sort": true,
335
+ "populate": [
336
+ {
337
+ "path": "/not/mapped",
338
+ "method": "GET",
339
+ "pagination": {
340
+ "offsetVar": "",
341
+ "limitVar": "",
342
+ "incrementBy": "limit",
343
+ "requestLocation": "query"
344
+ },
345
+ "query": {},
346
+ "body": {},
347
+ "headers": {},
348
+ "handleFailure": "ignore",
349
+ "requestFields": {},
350
+ "responseDatakey": "",
351
+ "responseFields": {
352
+ "name": "{this}{||}{that}",
353
+ "ostype": "{osfield}",
354
+ "ostypePrefix": "meraki-",
355
+ "port": "{port}",
356
+ "ipaddress": "{ip_addr}",
357
+ "serial": "{serial}",
358
+ "id": "{myid}"
359
+ }
360
+ }
361
+ ],
362
+ "cachedTasks": [
363
+ {
364
+ "name": "",
365
+ "filterField": "",
366
+ "filterLoc": ""
367
+ }
368
+ ]
369
+ }
370
+ ]
371
+ }
372
+ }
373
+ ```
374
+ ### [Swagger](https://gitlab.com/itentialopensource/adapters/security/adapter-paragon_iam/-/blob/master/report/adapter-openapi.json)
375
+
376
+ ## [Generic Adapter Information](https://gitlab.com/itentialopensource/adapters/security/adapter-paragon_iam/-/blob/master/README.md)
377
+
@@ -25,6 +25,46 @@
25
25
  }
26
26
  ]
27
27
  },
28
+ {
29
+ "name": "MFA_Step_1",
30
+ "protocol": "REST",
31
+ "method": "POST",
32
+ "entitypath": "{base_path}/{version}/iam/authenticate",
33
+ "requestSchema": "schemaTokenReq_MFA_Step_1.json",
34
+ "responseSchema": "schemaTokenResp_MFA_Step_1.json",
35
+ "timeout": 0,
36
+ "sendEmpty": false,
37
+ "requestDatatype": "JSON",
38
+ "responseDatatype": "JSON",
39
+ "headers": {},
40
+ "responseObjects": [
41
+ {
42
+ "type": "default",
43
+ "key": "",
44
+ "mockFile": "mockdatafiles/MFA_Step_1-default.json"
45
+ }
46
+ ]
47
+ },
48
+ {
49
+ "name": "MFA_Step_2",
50
+ "protocol": "REST",
51
+ "method": "POST",
52
+ "entitypath": "{base_path}/{version}/iam/authenticate",
53
+ "requestSchema": "schemaTokenReq_MFA_Step_2.json",
54
+ "responseSchema": "schemaTokenResp_MFA_Step_2.json",
55
+ "timeout": 0,
56
+ "sendEmpty": false,
57
+ "requestDatatype": "JSON",
58
+ "responseDatatype": "JSON",
59
+ "headers": {},
60
+ "responseObjects": [
61
+ {
62
+ "type": "default",
63
+ "key": "",
64
+ "mockFile": "mockdatafiles/MFA_Step_2-default.json"
65
+ }
66
+ ]
67
+ },
28
68
  {
29
69
  "name": "healthcheck",
30
70
  "protocol": "REST",
@@ -0,0 +1,31 @@
1
+ {
2
+ "status": "AUTHENTICATED",
3
+ "user_id": "string",
4
+ "id_token": "eyJh",
5
+ "token": {
6
+ "user_id": "string",
7
+ "user_name": "admin",
8
+ "iat": "string",
9
+ "exp": "string",
10
+ "unique_identifier": "string",
11
+ "identity_provider_type": "Local"
12
+ },
13
+ "scopes": [
14
+ {
15
+ "id": "string",
16
+ "name": "default",
17
+ "display_name": "default",
18
+ "type": "string"
19
+ },
20
+ {
21
+ "id": "string",
22
+ "name": "string",
23
+ "display_name": "string",
24
+ "type": "Tenant",
25
+ "parent_id": "string",
26
+ "parent_name": "default",
27
+ "parent_type": "string"
28
+ }
29
+ ],
30
+ "identity_provider_type": "Local"
31
+ }
@@ -0,0 +1,107 @@
1
+ {
2
+ "status": "AUTHENTICATED",
3
+ "user_id": "string",
4
+ "id_token": "eyJhbGc",
5
+ "token": {
6
+ "user_id": "string",
7
+ "user_name": "admin",
8
+ "iat": "string",
9
+ "exp": "string",
10
+ "roles": [
11
+ {
12
+ "id": "string",
13
+ "name": "string",
14
+ "type": "string",
15
+ "predefined": true
16
+ }
17
+ ],
18
+ "intents": [],
19
+ "scope": {
20
+ "id": "string",
21
+ "name": "default",
22
+ "type": "string",
23
+ "display_name": "default"
24
+ },
25
+ "capabilities": [
26
+ {
27
+ "service": "string",
28
+ "methods": []
29
+ },
30
+ {
31
+ "service": "string",
32
+ "methods": []
33
+ },
34
+ {
35
+ "service": "string",
36
+ "methods": []
37
+ },
38
+ {
39
+ "service": "string",
40
+ "methods": []
41
+ },
42
+ {
43
+ "service": "string",
44
+ "methods": []
45
+ },
46
+ {
47
+ "service": "string",
48
+ "methods": []
49
+ },
50
+ {
51
+ "service": "string",
52
+ "methods": []
53
+ },
54
+ {
55
+ "service": "string",
56
+ "methods": []
57
+ },
58
+ {
59
+ "service": "string",
60
+ "methods": []
61
+ },
62
+ {
63
+ "service": "string",
64
+ "methods": []
65
+ },
66
+ {
67
+ "service": "string",
68
+ "methods": []
69
+ },
70
+ {
71
+ "service": "string",
72
+ "methods": []
73
+ },
74
+ {
75
+ "service": "string",
76
+ "methods": []
77
+ },
78
+ {
79
+ "service": "string",
80
+ "methods": []
81
+ },
82
+ {
83
+ "service": "string",
84
+ "methods": []
85
+ },
86
+ {
87
+ "service": "string",
88
+ "methods": []
89
+ },
90
+ {
91
+ "service": "string",
92
+ "methods": []
93
+ },
94
+ {
95
+ "service": "string",
96
+ "methods": []
97
+ },
98
+ {
99
+ "service": "string",
100
+ "methods": []
101
+ }
102
+ ],
103
+ "unique_identifier": "string",
104
+ "identity_provider_type": "Local"
105
+ },
106
+ "identity_provider_type": "Local"
107
+ }
@@ -23,7 +23,7 @@
23
23
  "type": "AES",
24
24
  "key": ""
25
25
  },
26
- "external_name": "username"
26
+ "external_name": "userName"
27
27
  },
28
28
  "password": {
29
29
  "type": "string",
@@ -0,0 +1,19 @@
1
+ {
2
+ "$id": ".system-schemaTokenReq_MFA_Step_1.json",
3
+ "type": "object",
4
+ "schema": "http://json-schema.org/draft-07/schema#",
5
+ "translate": true,
6
+ "dynamicfields": true,
7
+ "properties": {
8
+ "ph_request_type": {
9
+ "type": "string",
10
+ "description": "type of request (internal to adapter)",
11
+ "default": "MFA_Step_1",
12
+ "enum": [
13
+ "MFA_Step_1"
14
+ ],
15
+ "external_name": "ph_request_type"
16
+ }
17
+ },
18
+ "definitions": {}
19
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$id": ".system-schemaTokenReq_MFA_Step_2.json",
3
+ "type": "object",
4
+ "schema": "http://json-schema.org/draft-07/schema#",
5
+ "translate": true,
6
+ "dynamicfields": true,
7
+ "properties": {
8
+ "ph_request_type": {
9
+ "type": "string",
10
+ "description": "type of request (internal to adapter)",
11
+ "default": "MFA_Step_2",
12
+ "enum": [
13
+ "MFA_Step_2"
14
+ ],
15
+ "external_name": "ph_request_type"
16
+ },
17
+ "scopeId": {
18
+ "type": "string",
19
+ "description": "scopeId",
20
+ "external_name": "scope_id"
21
+ }
22
+ },
23
+ "definitions": {}
24
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "$id": ".system-schemaTokenResp_MFA_Step_1.json",
3
+ "type": "object",
4
+ "schema": "http://json-schema.org/draft-07/schema#",
5
+ "translate": true,
6
+ "dynamicfields": false,
7
+ "properties": {
8
+ "ph_request_type": {
9
+ "type": "string",
10
+ "description": "type of request (internal to adapter)",
11
+ "default": "MFA_Step_1",
12
+ "enum": [
13
+ "MFA_Step_1"
14
+ ],
15
+ "external_name": "ph_request_type"
16
+ },
17
+ "token": {
18
+ "description": "token returned by system",
19
+ "parse": false,
20
+ "encode": false,
21
+ "placement": "BODY",
22
+ "external_name": "id_token"
23
+ },
24
+ "tokenp2": {
25
+ "description": "token returned by system",
26
+ "parse": false,
27
+ "encode": false,
28
+ "placement": "BODY",
29
+ "encrypt": {
30
+ "type": "AES",
31
+ "key": ""
32
+ },
33
+ "external_name": "scopes.0.id"
34
+ }
35
+
36
+ },
37
+ "definitions": {}
38
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "$id": ".system-schemaTokenResp_MFA_Step_2.json",
3
+ "type": "object",
4
+ "schema": "http://json-schema.org/draft-07/schema#",
5
+ "translate": true,
6
+ "dynamicfields": true,
7
+ "properties": {
8
+ "ph_request_type": {
9
+ "type": "string",
10
+ "description": "type of request (internal to adapter)",
11
+ "default": "MFA_Step_2",
12
+ "enum": [
13
+ "MFA_Step_2"
14
+ ],
15
+ "external_name": "ph_request_type"
16
+ },
17
+ "token": {
18
+ "description": "token returned by system",
19
+ "parse": false,
20
+ "encode": false,
21
+ "placement": "BODY",
22
+ "external_name": "token"
23
+ },
24
+ "tokenp2": {
25
+ "description": "token returned by system",
26
+ "parse": false,
27
+ "encode": false,
28
+ "placement": "BODY",
29
+ "external_name": "id_token"
30
+ }
31
+ },
32
+ "definitions": {}
33
+ }