Skip to content

Commit bedae75

Browse files
Merge pull request #585 from vossen-adobe/ssl_vrfy
Ability to disable SSL verify for umapi
2 parents 66e0d2d + 89c7d4d commit bedae75

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

docs/en/user-manual/deployment_best_practices.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,29 @@ logging:
244244
log_file_name_format: "user-sync.log"
245245
```
246246
247+
### Disabling SSL Verification
248+
249+
In environments where SSL inspection is enforced at the firewall, the UMAPI client can encounter the following error:
250+
251+
`CRITICAL main - UMAPI connection to org id 'someUUIDvalue@AdobeOrg' failed: [SSL: CERTIFICATE_VERIFY_FAILED] `
252+
253+
This is because the requests module is not aware of the middle-man certificate required for SSL inspection. The recommended solution to this problem is to specify a path to the certificate bundle using the REQUESTS_CA_BUNDLE environment variable (see https://helpx.adobe.com/enterprise/kb/UMAPI-UST.html for details). However, in some cases following these steps does not solve the problem. The next logical step is to disable SSL inspection on the firewall for the UMAPI traffic. If, however, this is not permitted, you may work around the issue by disabling SSL verification for user-sync.
254+
255+
Disabling the verification is unsafe, and leaves the umapi client vulnerable to middle man attacks, so it is recommended to avoid disabling it if at all possible. The umapi client only ever targets two URLs - the usermanagement endpoint and the ims endpoint - both of which are secure Adobe URL's. In addition, since this option is only recommended for use in a secure network environment, any potential risk is further mitigated.
256+
257+
To bypass the ssl verification, update the umapi config as follows:
258+
259+
```yaml
260+
server:
261+
ssl_verify: False
262+
```
263+
264+
During the calls, you will also see a warning from requests:
265+
266+
"InsecureRequestWarning: Unverified HTTPS request is being made to host 'usermanagement-stage.adobe.io'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
267+
InsecureRequestWarning"
268+
269+
247270
---
248271

249272
[Previous Section](advanced_configuration.md) \| [Next Section](additional_tools.md)

examples/config files - basic/connector-umapi.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,24 @@
1919
# alternate values by Adobe as part of a support engagement. It is
2020
# highly recommended that you leave these values commented out
2121
# so that the default values are guaranteed to be used.
22+
23+
# (optional) ssl_verify
24+
# Allows you to disable the SSL verification used by the requests module. This can
25+
# come in handy for troubleshooting or working around network / proxy related issues when
26+
# the following error is encountered:
27+
28+
# 'UMAPI connection to org id failed: [SSL: CERTIFICATE_VERIFY_FAILED]'
29+
30+
# It is recommended to leave this set to default (True), since it leaves UST potentially
31+
# vulnerable to middle man attacks and set to False only if absolutely needed.
2232
server:
2333
#host: usermanagement.adobe.io
2434
#endpoint: /v2/usermanagement
2535
#ims_host: ims-na1.adobelogin.com
2636
#ims_endpoint_jwt: /ims/exchange/jwt
2737
#timeout: 120
2838
#retries: 3
39+
#ssl_verify: True
2940

3041
# (required) enterprise organization settings
3142
# You must specify all five of these settings. Consult the

user_sync/connector/umapi.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def __init__(self, name, caller_options):
6565
server_builder.set_string_value('ims_endpoint_jwt', '/ims/exchange/jwt')
6666
server_builder.set_int_value('timeout', 120)
6767
server_builder.set_int_value('retries', 3)
68+
server_builder.set_bool_value('ssl_verify', True)
6869
options['server'] = server_options = server_builder.get_options()
6970

7071
enterprise_config = caller_config.get_dict_config('enterprise')
@@ -98,6 +99,7 @@ def __init__(self, name, caller_options):
9899
logger=self.logger,
99100
timeout_seconds=float(server_options['timeout']),
100101
retry_max_attempts=server_options['retries'] + 1,
102+
ssl_verify=server_options['ssl_verify']
101103
)
102104
except Exception as e:
103105
raise AssertionException("Connection to org %s at endpoint %s failed: %s" % (org_id, um_endpoint, e))

0 commit comments

Comments
 (0)