iris
iris copied to clipboard
Error running "make targets"
I am getting below error while running make targets on iris.
File "/iris/src/iris/bin/sync_targets.py", line 145, in
Below are the logs from oncall server.
[10/Jan/2019:04:24:05 +0000] "GET /api/v0/users?fields=name&fields=contacts&fields=active HTTP/1.1" 401 85 "-" "python-requests/2.20.0"
Originally posted by @adityavijjanT in https://github.com/linkedin/iris/pull/333#issuecomment-452990413
Moving discussion to this issue. It looks like Oncall is giving you a 401, so I'd check the settings you've enabled for auth in Oncall. I'm guessing that you've toggled requirements for login before read in Oncall, which might be where the script is running into issues. Check that the script is configured with the right Oncall API key etc to allow authorization.
Thanks for the quick reply, I have used default config file from both oncall and iris repo, have only changed db information nd ldap integration oncall config files.
oncall config:-
auth: debug: False module: 'oncall.auth.modules.ldap_import' # for automatically import user at first connexion ldap_url: 'ldap://test.local' ldap_user_suffix: '@test.local' ldap_bind_user: 'CN=testuser,OU=Service,OU=Accounts,DC=Test,DC=Local' ldap_bind_password: 'password' ldap_base_dn: 'dc=Test,dc=local' ldap_search_filter: '(sAMAccountName=%s)' import_user: True attrs: username: 'sAMAccountName' full_name: 'cn' email: 'mail' call: 'mobile' sms: 'mobile' slack: 'cn'
- type: dummy application: oncall iris_api_key: magic
############################ Oncall frontend settings ############################ supported_timezones:
- 'US/Pacific'
- 'US/Eastern'
- 'US/Central'
- 'US/Mountain'
- 'US/Alaska'
- 'US/Hawaii'
- 'Asia/Kolkata'
- 'Asia/Shanghai'
- 'UTC'
index_content_setting: Page footer contents footer: |
- Oncall © LinkedIn 2017
- Feedback
- About
Integration with Iris, allowing for escalation from Oncall iris_plan_integration: activated: True Iris app and key settings app: oncall api_key: magic api_host: http://iris:16649
Iris Config Enabled modules for resolving complex user roles to individual usernames, processed in the order listed here. role_lookups:
- user # support for 'role' being username
- mailing_list # mailing list config; see bottom of file
- oncall # oncall service integration
- dummy # dummy role lookup used for testing purposes. Disable this in production.
oncall-api: http://oncall:8080 # oncall url oncall-app: oncall # application for oncall auth oncall-key: magic # API key for oncall auth
applications:
- dummy_app
Curious if this issue was resolved as I'm having the same problem.
yes this is resolved. i have sync users from oncall instead of ldap.
ldap --> oncall --> iris
https://iris.claims/docs/installation.html#integrating-iris-and-oncall
make sure your oncall api key and application are correctly configured in iris config file.
After you have edited the config, what command do you run and from where?