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

OAuth2/OIDC: fix Rucio Client import with auth_type oidc in 1.22.6 #3609

Closed
gumond opened this issue May 19, 2020 · 0 comments
Closed

OAuth2/OIDC: fix Rucio Client import with auth_type oidc in 1.22.6 #3609

gumond opened this issue May 19, 2020 · 0 comments

Comments

@gumond
Copy link
Contributor

gumond commented May 19, 2020

Motivation

For rucio.cfg file config:

[client]
auth_type = oidc
[...]

Doing:
from rucio.client import Client
crashes with

if self.creds['oidc_refresh_lifetime'] is None:
TypeError: 'NoneType' object is not subscriptable

Modification

rucio/client/baseclient.py

Default creds dictionary of the baseclient.py is accessible only if rucio/rucio-admin CLI is used. If Client is imported, it reads the auth_type to be oidc and looks for the self.creds dictionary which will be None in this case. The client needs to read the config from the rucio.cfg if self.creds == None.

@gumond gumond self-assigned this May 19, 2020
gumond added a commit to gumond/rucio that referenced this issue May 19, 2020
gumond added a commit to gumond/rucio that referenced this issue May 19, 2020
@bari12 bari12 added this to the 1.22.7-clients milestone May 26, 2020
@bari12 bari12 closed this as completed May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants