tarantool / nginx_upstream_module

Tarantool NginX upstream module (REST, JSON API, websockets, load balancing)
Other
174 stars 18 forks source link

URL (UUID) auth mechanizm #73

Open unera opened 7 years ago

unera commented 7 years ago

It would be nice to have UUID-auth mechanism, example

client make request to

GET http(s)://host:port/$uuid/select?space=sname&index=iname&key=keypart1&key=keypart2

or

POST http(s)://host:port/$uuid/select
Content-Type: application/x-www-form-urlencoded

space=sname&index=iname&key=keypart1&key=keypart2

And the module seeks user that have uuid=$uuid in his options and does request using user's permits/grants.

So I think that module should reload user's list if _user space is changed.

So tarantool's commands can be like:

box.schema.user.create('my_api_client', {
     password = 'X',
     uuid = {
          '603591fc-d65e-11e6-b9b7-a7b588e37971',
          '799effca-d65e-11e6-b39d-13a549da136c'
     }
)

So an admin can maintain uuid list for each user.

Also module can use basic http-auth mechianizm: $username:$password - from http-headers.