-
Notifications
You must be signed in to change notification settings - Fork 66
Log a meaningful error if Okta connector isn't invoked correctly #416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@shasibhusanJena - I see that I assigned this to you, but I don't remember if we've discussed it. Do you mind handling it? Should be a pretty easy fix. Let me know if you're able to and if you have any questions. |
yesterday I was trying to find the line or places those have to make changes on the code, and formatting new string/ msg for the log. we can discuss and commit changes. |
I could reproduce this error on my local, as per my understanding when I comment out ldap: "connector-ldap.yml" or # okta: "connector-okta.yml"we are getting a common error like "value not found for key: host in LDAP configuration" so we could have different error stmt for different error types like for # ldap: "connector-ldap.yml" for # okta: "connector-okta.yml" @adorton-adobe plz suggest me if any better way of representation of log |
it look like this is the only line will get updated. user-sync.py/user_sync/config.py Line 742 in 2112484
|
The condition to get the error is pretty specific -
To detect the condition in the code and report the error, I would check that the right connector config is enabled for the value of the "connector_type" option. In this case, it would still be set to LDAP (the default). So the error message would be something like "LDAP config must be enabled for the connector type 'ldap'" |
You don't want to modify that line. It's a generic check to ensure that required keys are present in the config. You need to raise the error prior to the config processor getting there. |
below are my observations -c C:/User_sync_Integration_16-01-2019/user-sync-config.yml --process-groups --users mapped --connector ldap -c C:/User_sync_Integration_16-01-2019/user-sync-config.yml --process-groups --users mapped --connector okta -c C:/User_sync_Integration_16-01-2019/user-sync-config.yml --process-groups --users mapped --connector |
raised a fresh pull req from my branch, instead of from default one. please verify it. |
yes I had to do an additional change, so that I don't have to run my code in a loop, kind of optimizing |
#443 merged |
If the Okta config file is enabled and the
--connector
CLI param or invocation default is not specified, log an error that this option is required. Right now the error message produced by the UST mentions that the "host" key can't be found in the LDAP config - this is inaccurate and misleading.The text was updated successfully, but these errors were encountered: