-
Notifications
You must be signed in to change notification settings - Fork 342
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
Using tljh-config set for properties which require tuples, lists, dicts etc. #709
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
Works just fine. Perhaps a sentence or link could be added to https://tljh.jupyter.org/en/latest/topic/authenticator-configuration.html#setting-authenticator-properties about it? Not closing the issue only for that reason, otherwise it can be closed |
To configure for LDAP authentication I had to edit the config.yaml file directly because everything I tried for setting the For example, doing
resulted in
in config.yaml, and so LDAP authentication did not work. |
Proposed change
Sometimes one needs to set a property with
tljh-config set
and the property needs to be something other than a string (e.g. a tuple). This is problematic because the shell interprets the parenthesis, brackets etc and so they need to be quoted or escaped. However it seems that even doing sotljh-config
interprets them as strings.One example is (from issue #406):
another (from current trunk of nativeauthenticator which will be released as v1.0 soon):
How could one set these non-string properties? I can think of command line switches for the
tljh-config set
command. E.g.which would be equivalent to creating the tuple
("a", "b", "c", "d")
. And similarly for lists and dictionaries (with a little more complication for the latter).Alternative options
The problem remains if any of the strings
a b c d
needs to be some other type, so perhaps a better way would be to use a different command line switch such asthe latter is obviously a quite convoluted example, but the flexibility could come handy. For my need and for simplicity, I personally prefer the option above, which simplifies the interaction with the shell itself (notice how I have a
${MY_IP}
in my example above: that is an environmental variable which would be harder to inject in this alternative option).Who would use this feature?
Everybody who will need the new nativeauthenticator v1.0 features. See for example https://native-authenticator.readthedocs.io/en/latest/options.html#allow-self-serve-approval Not released yet, but I've seen lots of interest into that.
(Optional): Suggest a solution
If there is a workaround already available, even if not as convenient as the examples above, that would be still be adequate, and the only action would be to document what to do at https://tljh.jupyter.org/en/latest/topic/authenticator-configuration.html#setting-authenticator-properties
If no other option is available, I think this must be done. If nobody is interested in doing the implementation, but you'd be ok with a PR with one of the options discussed above (or any others which we will discuss below), I could get a stab at it once we agree on the best course of action.
The text was updated successfully, but these errors were encountered: