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

#61 Session header authentication #63

Merged
merged 1 commit into from
Oct 21, 2021
Merged

Conversation

banko-marton
Copy link
Contributor

Fixes #61

Added ability to connect to IQS instance with authentication header (name & value).
Extended IQS Connection Widget with multiple auth options.

…nded IQS Connection Widget to accommodate
@banko-marton banko-marton self-assigned this Oct 12, 2021
@pappist pappist requested a review from bergmanngabor October 15, 2021 13:20
password_label='Password:',
oidc_checkbox_label='Use OpenID Connect',
token_label='OIDC Token:',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we always want to display this field? I think we should at least add some label to say that this is optional to provide. Same for the Auth header name/value (which already has a checkbox).

Comment on lines 24 to +26
default_use_oidc: bool = False
default_use_password: bool = True
default_use_auth_header: bool = False
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 3 should be modified to use the default_IQS_ prefix - after all, they relate to the connection to the IQS, as opposed to e.g. MMS. (probably we can keep the old names in deprecated form, to retain compatibility, and use their value if the newer environment variable name is not present)

Sorry for not catching this in earlier reviews.

fields = [self.address_field,
self.ask_for_user_pw_checkbox, self.user_field, self.password_field,
self.oidc_checkbox, self.token_field,
self.auth_header_checkbox, self.auth_header_name_field, self.auth_header_value_field]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are these in the ask_for_user_pw branch? I though we do not ask for user/pass when we ask for auth header fields; also, should we not branch on the value of self.auth_header_checkbox to determine whether we should display these fields?


self.auth_header_checkbox = widgets.Checkbox(value=use_auth_header, description=auth_header_checkbox_label)
self.auth_header_name_field = widgets.Text(value=initial_auth_header_name, description=auth_header_name_label)
self.auth_header_value_field = widgets.Text(value=initial_auth_header_value, description=auth_header_value_label)

self.iqs_client = None

if ask_for_user_pw:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??? if there is a ask_for_user_pw_checkbox why do you use its (possibly obsolete) initial value, as opposed to its actual value? will the set of displayed widgets change if I check/uncheck the checkbox?

Same with auth_header_checkbox

@FuzesiMate
Copy link
Contributor

@bergmanngabor Since your change requests are widget specific and cleaning-up the connection widget is not in the scope of this issue I created a follow-up: #64

@bergmanngabor bergmanngabor mentioned this pull request Oct 21, 2021
3 tasks
@FuzesiMate FuzesiMate merged commit 40072eb into master Oct 21, 2021
@FuzesiMate FuzesiMate deleted the issues/61/auth-header branch October 21, 2021 09:52
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

Successfully merging this pull request may close these issues.

Enable configuring access token for IQS jupyter extension
4 participants