-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
No admin #126
No admin #126
Conversation
@enolfc can you remove the second commit? This is not needed anymore. |
caso/extract/manager.py
Outdated
project = self.keystone.projects.get(project_id) | ||
except (EmptyCatalog, Forbidden): | ||
# we may need scoping here, retrying | ||
LOG.warning(f"Scoping the keystone client to the current project {project_id}") |
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.
This will make flake8 complain
caso/extract/manager.py
Outdated
client = keystone_client.get_client(CONF, system_scope="all") | ||
if project: | ||
system_scope = None | ||
client = keystone_client.get_client(CONF, |
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.
This will make black unhappy
caso/extract/openstack/base.py
Outdated
@@ -92,7 +92,7 @@ def _get_keystone_session(self): | |||
|
|||
def _get_keystone_client(self): | |||
"""Get a Keystone Client for the configured project in the object.""" | |||
client = keystone_client.get_client(CONF, system_scope="all") | |||
client = keystone_client.get_client(CONF, project=self.project, system_scope="all") |
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.
This will make flake8 cry
Avoid issues when running cASO with a low privileges account that cannot list all projects and scope the tokens to the projects that are to be accounted. This allows to run cASO and generate records for non-admin users.
Fixed linter issues. Coverage still fails |
731c2ed
to
fc85fad
Compare
(shamelessly taken from #123 as this could not be reopened)
Description
Avoid issues when running cASO with a low privileges account that cannot
list all projects and scope the tokens to the projects that are to be
accounted. This allows to run cASO and generate records for non-admin
users.
Fixes #124
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details for
your test configuration
caso-extract
usingv3oidcaccesstoken
authentication with an EGI Check-in access token in 2 projects at IFCA-LCG2. Configuration:Checklist: