Skip to content
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

check_connection fails in non SAAS -> PCE 22.2 due to invalid workload settings endpoint call #24

Open
RonGonz-illumio opened this issue Dec 5, 2022 · 2 comments
Assignees

Comments

@RonGonz-illumio
Copy link
Contributor

RonGonz-illumio commented Dec 5, 2022

workload settings endpoints only works if there are workloads defined

Expected Result

should use workloads endpoint instead:
self.get('/workloads', **{**kwargs, **{'include_org': True}})

Actual Result

self.get('/settings/workloads', **{**kwargs, **{'include_org': True}})

404

Steps to reproduce

Empty PCE (any vers)

System Information

https://docs.illumio.com/core/22.2/API-Reference/index.html#get-workloads-settings
- vs -
https://docs.illumio.com/core/22.2/API-Reference/index.html#Illumio-Core-workloads

@dsommerville-illumio
Copy link
Contributor

Is there a specific condition beyond no workloads that needs to be met here? I've tested against both SaaS and on-prem PCEs and haven't run into a 404 calling /settings/workloads.

Tested just now with a freshly spun up 19.3.0 SNC and it resolves just fine.

@dsommerville-illumio
Copy link
Contributor

After discussion, this error seems to be due to a difference in permissions between a Service Account API key vs a User API key - service account keys return a 403 forbidden when hitting the /settings/workloads endpoint. It's not clear whether this is intentional or is part of restricting permissions on user/service account endpoints.

I'll add a note to the documentation about this and see if there's a better option for the orgs call in check_connection().

@dsommerville-illumio dsommerville-illumio self-assigned this Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants