@@ -58,7 +58,7 @@ def _validate_prefix(self, proposal):
58
58
prefix = prefix [:- 1 ]
59
59
return prefix
60
60
61
- skip_authentication = Bool (
61
+ no_authentication = Bool (
62
62
default = False ,
63
63
help = """
64
64
Do not authenticate access to the server via JupyterHub. When set,
@@ -146,11 +146,16 @@ def __init__(self, **kwargs):
146
146
{"ServerProcess" : {"raw_socket_proxy" : True }},
147
147
dedent (ServerProcess .raw_socket_proxy .help ),
148
148
),
149
- "skip -authentication" : (
150
- {"StandaloneProxyServer" : {"skip_authentication " : True }},
151
- dedent (self .__class__ .skip_authentication .help ),
149
+ "no -authentication" : (
150
+ {"StandaloneProxyServer" : {"no_authentication " : True }},
151
+ dedent (self .__class__ .no_authentication .help ),
152
152
),
153
153
}
154
+ self .flags .pop ("y" )
155
+
156
+ # Some traits in ServerProcess are not defined to be configurable, but we need that for the standalone proxy
157
+ for name , trait in ServerProcess .class_own_traits ().items ():
158
+ trait .tag (config = True )
154
159
155
160
# Create an Alias to all Traits defined in ServerProcess, with some
156
161
# exceptions we do not need, for easier use of the CLI
@@ -164,20 +169,20 @@ def __init__(self, **kwargs):
164
169
"command" ,
165
170
]
166
171
server_process_aliases = {
167
- trait : f"StandaloneProxyServer.{ trait } "
172
+ trait . replace ( "_" , "-" ) : f"StandaloneProxyServer.{ trait } "
168
173
for trait in ServerProcess .class_traits (config = True )
169
174
if trait not in ignore_traits and trait not in self .flags
170
175
}
171
176
172
177
self .aliases = {
173
178
** super ().aliases ,
174
179
** server_process_aliases ,
175
- "base_url " : "StandaloneProxyServer.base_url" ,
180
+ "base-url " : "StandaloneProxyServer.base_url" ,
176
181
"address" : "StandaloneProxyServer.address" ,
177
182
"port" : "StandaloneProxyServer.port" ,
178
- "server_port " : "StandaloneProxyServer.server_port" ,
179
- "activity_interval " : "StandaloneProxyServer.activity_interval" ,
180
- "websocket_max_message_size " : "StandaloneProxyServer.websocket_max_message_size" ,
183
+ "server-port " : "StandaloneProxyServer.server_port" ,
184
+ "activity-interval " : "StandaloneProxyServer.activity_interval" ,
185
+ "websocket-max-message-size " : "StandaloneProxyServer.websocket_max_message_size" ,
181
186
}
182
187
183
188
def emit_alias_help (self ):
@@ -206,7 +211,7 @@ def get_proxy_attributes(self) -> dict:
206
211
attributes ["proxy_base" ] = "/"
207
212
208
213
attributes ["requested_port" ] = self .server_port
209
- attributes ["skip_authentication " ] = self .skip_authentication
214
+ attributes ["no_authentication " ] = self .no_authentication
210
215
211
216
return attributes
212
217
@@ -278,7 +283,7 @@ def _configure_ssl(self) -> dict | None:
278
283
return ssl_options
279
284
280
285
def start (self ):
281
- if self .skip_authentication :
286
+ if self .no_authentication :
282
287
self .log .warn ("Disabling Authentication with JuypterHub Server!" )
283
288
284
289
app = self .create_app ()
0 commit comments