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
Enable to specify project id in OpenStack OIDC auth #1293
Conversation
Codecov Report
@@ Coverage Diff @@
## trunk #1293 +/- ##
==========================================
+ Coverage 85.95% 85.95% +<.01%
==========================================
Files 359 359
Lines 73911 73916 +5
Branches 6705 6708 +3
==========================================
+ Hits 63530 63535 +5
+ Misses 7699 7698 -1
- Partials 2682 2683 +1
Continue to review full report at Codecov.
|
Thanks for the contribution. Can you please also open a PR with a corresponding documentation change (ideally with a code example on how to specify a project)? |
return (httplib.OK, body, self.json_content_headers, httplib.responses[httplib.OK]) | ||
raise NotImplementedError() | ||
|
||
def _v3_auth_projects(self, method, url, body, headers): | ||
if method == 'GET': | ||
# get user projects | ||
body = json.dumps({"projects": [{"id": "project_id"}]}) | ||
body = json.dumps({"projects": [{"id": "project_id", "name": "project_name"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would also be good to add a test case for scenario where invalid project id is specified.
I went ahead and merged it into trunk, but I would appreciate if you can open a new PR with corresponding documentation and tests change. |
Enable to specify project id in OpenStack OIDC auth
Description
In current implementation the OpenStack OIDC auth the first project available is selected.
This PR enables to specify the project id using the domain_name (as the tenant_name attribute is used to specify the protocol). The domain_name attribute can be used either to select the domain name in case of domain scoped token or to select the project name in case of project scoped token
Status
Checklist (tick everything that applies)