[the-datatank] RFC: multiple users with Basic Auth
Pieter Colpaert
pieter.colpaert at okfn.org
Thu Apr 18 08:46:06 UTC 2013
Hi all,
A problem right now happens when you want a different username /
password to handle the tdt/input admin interface than the tdt/core admin
interface, or when you would want a different user for the Worker than
for the job admin.
A possible way to fix it is to implement basic auth in tdt/start by
adding something optional to cores.json. For instance:
{
"input" : {
"namespace" : "tdt\\input",
"routes" : {
"GET | TDTInput/Worker/?" : "scheduler\\controllers\\Worker",
"GET | TDTInput/?(?P<format>\\.[a-zA-Z]+)?" :
"scheduler\\controllers\\InputResourceController",
"GET | TDTInput/(?P<resource>.*)\\.(?P<format>[a-zA-Z]+)" :
"scheduler\\controllers\\InputResourceController",
"GET | TDTInput/(?P<resource>.*?)(?P<test>/test)?" :
"scheduler\\controllers\\InputResourceController",
"PUT | TDTInput/(?P<resource>.*)" :
"scheduler\\controllers\\InputResourceController",
"POST | TDTInput/?" : "scheduler\\controllers\\InputResourceController",
"DELETE | TDTInput/(?P<resource>.*)" :
"scheduler\\controllers\\InputResourceController"
},
"auth":[
"username1" : {
"password" : "******",
"routes" : [ //just type the beginning of one or multiple routes defined ↑
"PUT | ", "POST | " , "DELETE", "GET | TDTInput/?","GET | TDTInput/("
]
},
"username2" : {
"password" : "******",
"routes" : [
"GET | TDTInput/Worker"
]
}
]
},
... //same for tdt/core
}
What do you think?
https://github.com/tdt/start/issues/7
Kind regards,
Pieter
More information about the the-datatank
mailing list